-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Why am I getting this result?
[TestMethod]
public void nan_test()
{
Assert.AreEqual(1, double.NaN, 1E-1); <-- Passes
Assert.AreEqual(1, double.NaN); <-- Fails
}
What difference does the delta have in asserting NaN equals a number? Surely it should always return false. I am aware…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Forgive me if this is a dumb beginners problem, but I really don't get it.
I have a member variable declared like so:
public Double Value;
When I assign 3.14159265 to Value and try to compute the sine of it, this happens:
system.out.println(Value.toString()); //outputs 3.14159265
Value = Math…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
i'm trying to determine if a color has been supplied as an optional argument to a function. in order to determine this, i'm simply writing if(color){...} and supplying NaN if i don't want there to be a color.
however, it seems that the color black (0x000000) also equates to NaN. how can i determine…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have a program that more or less tries to widdle a doube down to a desired number. The output i get though, instead of being that final double is NaN
What does this mean?
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
This is more of a 'Can you explain this' type of question than it is anything else.
I came across a problem at work where we were using NaN values in a table, but when the table was sorted, it came out in a very strange, strange manner. I figured NaN was mucking up something so I wrote up a test…
>>> More