[Haskell-cafe] smallest double eps
lennart at augustsson.net
Fri Sep 29 21:26:27 EDT 2006
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?
On Sep 29, 2006, at 20:26 , Tamas K Papp wrote:
> On Sat, Sep 30, 2006 at 12:20:16AM +0000, Joachim Breitner wrote:
>> 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.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe