Hacker News new | past | comments | ask | show | jobs | submit login

That's something I'd like to understand better -- MAX is defined as a literal number, but NAN and INFINITY are computed by the compiler. I looked at the header files on my system: GNU nan.h uses a GCC builtin and falls back on a magic bit-pattern (a NaN as defined by the IEEE754). Is 0.0/0.0 more portable? Clearer? Are magic bit-patterns just not in the spirit of the language? Sorry to be so particular about this -- floats are tricky and I'd like to know exactly what's going on with them.



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: