
12 May
2011
12 May
'11
7:22 p.m.
On 12/05/2011 06:14 PM, Grigory Sarnitskiy wrote:
How do I make my program stop whenever it gets somewhere NaN as a result during a calculation? If there is no appropriate flag for ghc maybe there exist flags for C to use in optc.
I don't want NaN to propagate, it is merely stupid, it should be terminated.
There is an isNaN function somewhere. You could make a newtype over Double which performs an isNaN after every operations and throws an exception if necessary...