At some point, someone is going to have to explain why - despite nobody ever wanting this in production code ever, for any reason - the default CSR state for divide by zero on most platforms is fault instead of flush.
-
Show this thread
-
Replying to @cmuratori
I've been doing so much NaN fishing on GPUs, I definitely don't want to do the same on CPU; I'll take the exception any day - I've been saved by the exception more than once. Maybe I'm just bad at math.
1 reply 0 retweets 4 likes -
Replying to @jaap_null
I 100% support exceptions for debug builds. I 100% do not support them for release builds :)
1 reply 0 retweets 2 likes -
Replying to @cmuratori
I see your point, but any return value is troublesome. Zero is completely arbitrary and effectively as far away from the limit as possible; any special value will propagate through clueless logic. Both will result in Badness(tm) I 100% want a crash over (sneaky) data corruption.
1 reply 0 retweets 0 likes
I can't disagree strongly enough. It is usually trivial for me to write my routines - float _or_ integer - such that divide by zero produces the correct behavior for the routine.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.