Right about Rome.
You would obtain such results by trying, let's say, sqrt(-1).
NAN means Not A Number.
Same result will be obtained when doing 10/0, for instance.
These strings are just cookies to be seen in the standard err; probably the best way to check for a faulty outcome of such an operation would be to check the result against the min/max double values definded in <limits.h>. Of course, if your program is still running after such a disaster!
But hey... the BEST thing is Not to get there in the first place!
Cheers,
--Razvan [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro