GHC and Haskell Standard wrt floatRange...

9 Mar
2009
9 Mar
'09
5:14 p.m.
I think there might be a difference between C/GHC and the Haskell Standard's idea of the range of the exponential. Specifically, the comment in gcc's float.h (i.e., where GHC appears to gets its definition from) says /* Minimum int x such that FLT_RADIX**(x-1) is a normalized float, emin */ while the Haskell Standard says "...the lowest and highest values the exponent may assume respectively..." This results in (GHC 6.10.1 on Debian) Prelude> (2**128::Float) Infinity Prelude> (2**127::Float) 1.7014119e38 Prelude> floatRange (0::Float) (-125,128) I can file a bug report/patch if nobody is seeing something I missed here... Cheers! -Tyson
5917
Age (days ago)
5917
Last active (days ago)
0 comments
1 participants
participants (1)
-
Tyson Whitehead