News for hackers. Stuff that matters.
Re:The Evil Within the Comparison Functions by lmm on Sunday February 18, 2018 @06:10PM (#16409443)
That just means you get the problem even further away from the condition that generated it - perhaps your whole query returns NULL. You want the opposite, fail-fast so that you can see what the specific problem was. Signalling NaNs are the way to go unless you have very specific performance requirements.
Re:The Evil Within the Comparison Functions by cwzwarich on Sunday February 18, 2018 @10:26PM (#16410548)
You can only rely on the compiler correctly compiling code with signaling NaNs if you use '#pragma STDC FENV_ACCESS ON', but Clang doesn't even support that.
Re:The Evil Within the Comparison Functions by lmm on Monday February 19, 2018 @06:23AM (#16412232)
If your language can't use signalling NaNs correctly, get a better language.