Haskell doesn't provide such a value, but you could easily compute it
from from the values given in the RealFloat class. It tells you the
base, number of digits in mantissa, etc.
As for using such an eps in a convergence test I'd be very careful.
How do you know that your iteration doesn't make the value bounce
back and forth with more than eps?
-- Lennart
On Sep 29, 2006, at 20:26 , Tamas K Papp wrote:
On Sat, Sep 30, 2006 at 12:20:16AM +0000, Joachim Breitner wrote:
Hi,
Am Freitag, den 29.09.2006, 19:30 -0400 schrieb Tamas K Papp:
the smallest positive floating point number x such that 1+x /= x?
That would be the smallest positive number, woudn't it?
Do you mean the smalles postive number x with 1+x /= 1?
Hi Joachim,
Specifically, I would be happy with the smallest Double that makes the
statement true. I need it as a convergence bound for an iterative
algorithm. Anyhow, thanks for the clarification, but I would be
happier with an answer.
Tamas
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe