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

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to