ke, 2010-07-21 kello 10:46 +0200, David Cournapeau kirjoitti:
[clip: assert nulps]
> I think we should go toward using those almost everywhere we need
> floating point comparison in testing,
I think we also need an assertion function that behaves like np.allclose
-- the ULPs are somewhat unintuiti
On Tue, Jul 20, 2010 at 3:31 AM, Ondrej Certik wrote:
> Hi,
>
> I was always using something like
>
> abs(x-y) < eps
>
> or
>
> (abs(x-y) < eps).all()
>
> but today I needed to also make sure this works for larger numbers,
> where I need to compare relative errors, so I found this:
>
> http://www.
Hi Keith!
On Mon, Jul 19, 2010 at 6:40 PM, Keith Goodman wrote:
> On Mon, Jul 19, 2010 at 6:31 PM, Ondrej Certik wrote:
>> Hi,
>>
>> I was always using something like
>>
>> abs(x-y) < eps
>>
>> or
>>
>> (abs(x-y) < eps).all()
>>
>> but today I needed to also make sure this works for larger numbe
On Mon, Jul 19, 2010 at 6:31 PM, Ondrej Certik wrote:
> Hi,
>
> I was always using something like
>
> abs(x-y) < eps
>
> or
>
> (abs(x-y) < eps).all()
>
> but today I needed to also make sure this works for larger numbers,
> where I need to compare relative errors, so I found this:
>
> http://www.
Hi,
I was always using something like
abs(x-y) < eps
or
(abs(x-y) < eps).all()
but today I needed to also make sure this works for larger numbers,
where I need to compare relative errors, so I found this:
http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
and wrote thi