realToFrac issues
John Meacham
john at repetae.net
Mon Feb 27 20:33:02 EST 2006
I am not sure if this has been brought up for haskell-prime or not, but
a while ago someone noticed that 'realToFrac' as specified in the report
can't propagate NaN or infinity values properly since it goes through a
Rational intermediate stage. this has the odd effect in ghc of making
such conversions only work when optimization is used so the RULES
turning Float<->Double conversion into their C counterparts fire.
The proposed solution was to add NaN, +Infinity, and -Infinity to
rational with the representations 0 :% 0, 1 :% 0, and -1 :% 0
respectively. Seems straightforward, (and generally useful) but we
should make sure not to forget it for haskell-prime.
John
--
John Meacham - ⑆repetae.net⑆john⑈
More information about the Haskell-prime
mailing list