M
mandydhaliwal
Hi all,
I want to put a NaN value in a double/float variable.
I am trying following code
double x = 12.7;
x/= 0;//Threotically x is a NaN now
Now when I Try _isnan(x) it returns that it is not a NaN.
bool isNan = (_isnan(x)!=0);
I am confused
Could you please guide on following
1) is this a right way to create NaN?
2) what is the platform independent cfunction to test a NaN value
I want to put a NaN value in a double/float variable.
I am trying following code
double x = 12.7;
x/= 0;//Threotically x is a NaN now
Now when I Try _isnan(x) it returns that it is not a NaN.
bool isNan = (_isnan(x)!=0);
I am confused
Could you please guide on following
1) is this a right way to create NaN?
2) what is the platform independent cfunction to test a NaN value