Re: wierd output of fprintf for double variable
Basically that. "-nan" means "not a number", with the negative sign bit set.
NaN is actually a valid IEEE-fp value, but it has no mathematical value. It's produced when a mathematically undefined operation is performed, such as 0 ÷ 0 (or perhaps -0 ÷ 0 in this case).