To clarify a bit:

> The floor function works fine over large numbers. The problem is
> that the large number 9999....999.0 is too large to stored as 
> a Double, so is stored as Inf.0.
> 
> Main> 999999999999999999999999999999999999999.0
> Inf.0 :: Double
> 
> Now what floor does with Inf is undefined (see page 82 of the 
> H98 report).

Standard Hugs represents both Double and Float using an IEEE754
32-bit (short) float, unfortunately, so you can expect over/under
flows at around 1e+/-38.  

One option is to use STG Hugs instead.  It really represents Doubles
as C doubles, so your range is more like 1e+/-300.

J

Reply via email to