I have a program that more or less tries to widdle a double down to a desired number. The output i get though, instead of being that final double is NaN
What does this mean?
I have a program that more or less tries to widdle a double down to a desired number. The output i get though, instead of being that final double is NaN
What does this mean?
Hey,
Not a Java guy, but in JS and other languages I use it's "Not a Number", meaning some operation caused it to become not a valid number.
It literally means "Not a Number." I suspect something is wrong with your conversion process.
Check out the Not A Number section at this reference
Not a valid floating-point value (e.g. the result of division by zero)
NaN
means "Not a Number" and is the result of undefined operations on floating point numbers like for example dividing zero by zero. (Note that while dividing a non-zero number by zero is also usually undefined in mathematics, it does not result in NaN but in positive or negative infinity).
NaN
means "Not a number." It's a special floating point value that means that the result of an operation was not defined or not representable as a real number.
See here for more explanation of this value.
Taken from this page:
"NaN" stands for "not a number". "Nan" is produced if a floating point operation has some input parameters that cause the operation to produce some undefined result. For example, 0.0 divided by 0.0 is arithmetically undefined. Taking the square root of a negative number is also undefined.
NaN stands for Not a Number. It is used to signify any value that is mathematically undefined. Like dividing 0.0 by 0.0. You can look here for more information: http://www.concentric.net/~Ttwang/tech/javafloat.htm
Post your program here if you need more help.
NaN
means Not a Number
and is basically a representation of a double value in IEE 754 floating point representation meaining that the data is actually not a number.
A conversion will result in this value, when unexpected the value cannot be converted (for example by converting a string that does not represent a number into a float).
Means Not a Number. It is a common representation for an impossible numeric value in many programming languages.
NaN means Not a Number, thus, the variable might not be set, or null (which is the same). Or you might have divided something by zero.