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

And even the former apparently isn't guaranteed on all hardware. I found this gem in the Java documentation, I don't know which processors actually do this:

>"Arithmetic operations on signaling NaNs turn them into quiet NaNs with a different, but often similar, bit pattern. However, on some processors merely copying a signaling NaN also performs that conversion. In particular, copying a signaling NaN to return it to the calling method may perform this conversion."

Source: https://docs.oracle.com/javase/7/docs/api/java/lang/Double.h...




If you're putting floats in a dict, you can't use NaNs anyway, since they aren't equal to each other.


This is the stuff of nightmares.




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

Search: