Is it possible to assign a double to NaN in c++ like:
Suggestions welcome...Code:double number = NaN;
Is it possible to assign a double to NaN in c++ like:
Suggestions welcome...Code:double number = NaN;
Try typing it into a compiler and seeing if it compiles/runs correctly.
L33t sp3@k sux0rz (uZ it t@k3s 10 m1|\|ut3s 2 tr@nzl@te 1 \/\/0rd & th3n j00 h@\/3 2 g3t p@$t d@ m1zpelli|\|gz, @tr0(i0u$ gr@mm@r @|\|d 1n(0/\/\pr3#3|\|$1bl3 $l@|\|g. 1t p\/\/33nz j00!!
Speling is my faverit sujekt
I am a signature virus. Add me to your signature so that I may multiply.
If you want to go down to that level and as your code will now not be portable among architectures, you might as well use inline assembler....Originally posted by Hardboy
Is it possible to assign a double to NaN in c++ like:
Suggestions welcome...Code:double number = NaN;
Code:__asm { //your instructions here }
Exercise for hardboy:
double NaN = 0.0 / 0;
double NaN = 1.0 / 0; // this one for infinite and NaN
and
int _isnan( double NaN );
int _finite( double NaN );
these two for testing the infinity or NaN characteristics
But before you begin, turn off hardware exceptions (you need not to do it in Win32, they are turned off already)