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.
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. Martin On 8 July 2011 12:21, Garth N. Wells <[email protected]> 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, [email protected] wrote: >> ------------------------------------------------------------ >> revno: 6054 >> committer: Martin Alnes <[email protected]> >> 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 : [email protected] > Unsubscribe : https://launchpad.net/~dolfin > More help : https://help.launchpad.net/ListHelp > _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : [email protected] Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp

