Carter Schonwald <> writes:

> Hello All!
> I had some interesting conversations yesterday with a few folks and the
> take away was that I might experiment with adding an off by default rts
> flag that on applicable architectures that makes all floating point
> computations that yield Nans signaling , plus mayve some HS side hooks to
> enable or disable that per green thread if it doesn't harm no fib.  Kinda
> like the way green threads track and save / restore the state of the magic
> c error tracking variable
Sounds reasonable to me; debugging floating point issues is certainly a
chore and this could only help. Regarding a per-thread handling I think
we'd certainly need to benchmark. Note that rts/posix/Signals.c already has
some logic to handle SIGFPE, although it has been disabled for over a
decade due to an infinite loop where the handler immediately threw
another FPE. It would be nice to have a solution to this issue; looping
is quite bad.

Do you lump infinities into the class of NaN values? I'm not sure how
much code would fail due to "legitimate" uses of infinity if so.


- Ben

Attachment: signature.asc
Description: PGP signature

ghc-devs mailing list

Reply via email to