digitalmars.D.learn - checking double.nan
- monarch_dodra (5/5) Jan 04 2013 All in the title. I searched but couldn't find.
- bearophile (5/6) Jan 04 2013 The signature of the function shows it accepts a real:
- monarch_dodra (4/10) Jan 04 2013 I am retarded. I had a compile error I miss-read, and was thrown
All in the title. I searched but couldn't find. std.math.isNaN only works for floats. Is it safe to cast the double to float? Why don't we have "isNaN(double)" (this is an honest question, to learn, not requesting anything... yet).
Jan 04 2013
monarch_dodra:std.math.isNaN only works for floats.The signature of the function shows it accepts a real: pure nothrow trusted bool isNaN(real x); Bye, bearophile
Jan 04 2013
On Friday, 4 January 2013 at 16:29:13 UTC, bearophile wrote:monarch_dodra:I am retarded. I had a compile error I miss-read, and was thrown of by "real" (not used to seeing it). Thanks.std.math.isNaN only works for floats.The signature of the function shows it accepts a real: pure nothrow trusted bool isNaN(real x); Bye, bearophile
Jan 04 2013