[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Float numbers equality.
- From: Dirk Laurie <dirk.laurie@...>
- Date: Mon, 12 Aug 2013 18:54:37 +0200
2013/8/12 Andrew Starks <andrew.starks@trms.com>:
> Any library function offered would be used exclusively by people too
> inexperienced to know that they can't solve their problem through an
> abstraction provided by an opaque library.
That is very well put.
The only library function I might be prepared to support, would go
something like this:
math.near(x,y[,ballpark])
Returns `true` if `x` can be considered to be so near to `y` that the
difference between them could well be explained solely by the effect
of roundoff error, given that `x` and `y` are expected to be of the
same sort of size as the positive quantity `ballpark`, which has the
default value 1.
I.e. the name would stress that `x` and `y` are not equal; the
documentation would be riddled with vague terms, except for
"roundoff error" appearing explicitly; and the tolerance, though
not constant, would not automatically depend on `x` or `y`.
- References:
- Float numbers equality., Karol Dro
- Re: Float numbers equality., Matthias Kluwe
- Re: Float numbers equality., Coda Highland
- Re: Float numbers equality., Luiz Henrique de Figueiredo
- Re: Float numbers equality., Coda Highland
- Re: Float numbers equality., Enrico Colombini
- Re: Float numbers equality., Coda Highland
- Re: Float numbers equality., Tim Hill
- Re: Float numbers equality., Luiz Henrique de Figueiredo
- Re: Float numbers equality., Andrew Starks
- Re: Float numbers equality., Victor Bombi
- Re: Float numbers equality., Coda Highland
- Re: Float numbers equality., Tim Hill
- Re: Float numbers equality., Lorenzo Donati
- Re: Float numbers equality., Andrew Starks