Tom Forsyth
(replying to I Can't Believe It's Not Zero!)
@steve @mcc @hikari On x86, you can disable throwing actual exceptions on sNaNs. The MXCSR register has "sticky" bits that you can clear before a sequence, then check afterwards. If there were any sNaNs read or produced during the sequence, the "Invalid Operation" sticky bit will be set. I believe qNaNs do not set the sticky bits.
This is rather klunky to use, and relies on the language/library having support for reading/setting the MXCSR, but it can be done.