In specific:
Im doing some math operations, and the application keeps crashing because a double that is widely used happens to get the value: -1.#IND000000000000 when "some" numbers are sqrt'ed... What is this? Indefinite? Infinite? Too big to fit? Not a perfect Square Root? Is there any way to solve this? Thanks in advance! EDIT: How can i check if a double has this value ? I tried: if (x == 0x-1.#IND000000000000) and other variations but did not work. Is it possible to check to see if a variable has this value ?
some numbers
less than 0 perhaps? Tell me sir, what is the sqrt of -1 – Dioptricsqrt(-1)
butsqrt(-1E-20)
or so. This happens when two approxiamtely equal terms almost cancel, e.g.sqrt(100.0/3.0 - (50.0/3.0 + 50.0/3.0))
. Due to limited FP precision, this argument isn't exactly0.0
and may be rounded to a negative number. – Gateshead