← Back to team overview

dolfin team mailing list archive

Re: [Branch ~dolfin-core/dolfin/main] Rev 6054: Re-introduce bugfix in near after recent mistaken(?) re-introduction of the bug, or something... ...

 


On 08/07/11 11:33, Martin Sandve Alnæs wrote:
> I already explained this, but let me make it clearer:
> 
> If
>   x >> eps,
> such that
>   x + eps == x,
> then near(x, x) implemented as
>   x < x + eps
> will be equivalent to
>   x < x
> which is false.
>

eps should be scaled.

> Clearly, near(x,x) should always be true in a correct implementation.
> Using x <= x + eps fixes this. This is not "relying on equality",
> that would be using ==.
> 
> If you have a failing test case, show it to me and I will see what I can do.
> 

See buildbot.

Garth

> Martin
> 
> 
> On 8 July 2011 12:21, Garth N. Wells <gnw20@xxxxxxxxx> wrote:
>> I think that this is a 'bug' in the test. Relying on equality (i.e. <=
>> versus <) for non-integers will lead to problems somewhere (like the
>> 32-bit buildbot failing).
>>
>> Garth
>>
>>
>> On 08/07/11 09:23, noreply@xxxxxxxxxxxxx wrote:
>>> ------------------------------------------------------------
>>> revno: 6054
>>> committer: Martin Alnes <martinal@xxxxxxxxx>
>>> branch nick: work
>>> timestamp: Fri 2011-07-08 10:20:54 +0200
>>> message:
>>>   Re-introduce bugfix in near after recent mistaken(?) re-introduction of the bug, or something... Also disable debug print in test.
>>> modified:
>>>   dolfin/math/basic.cpp
>>>   test/unit/math/python/basic.py
>>>
>>>
>>> --
>>> lp:dolfin
>>> https://code.launchpad.net/~dolfin-core/dolfin/main
>>>
>>> Your team DOLFIN Core Team is subscribed to branch lp:dolfin.
>>> To unsubscribe from this branch go to https://code.launchpad.net/~dolfin-core/dolfin/main/+edit-subscription
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dolfin
>> Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dolfin
>> More help   : https://help.launchpad.net/ListHelp
>>



Follow ups

References