[Developers] [Patches] Make ADMConstraints GF public
baiotti at aei.mpg.de
Mon Sep 18 07:34:20 CDT 2006
On Sep 18, 2006 08:39 AM, Jonathan Thornburg <jthorn at aei.mpg.de> wrote:
> On Mon, 18 Sep 2006, Luca Baiotti wrote:
> > what about comparing the numbers in the data character by character
> > and
> > checking whether only the rightmost character (or the two rightmost
> > ones) differ by at most a unit, while all the others are identical?
> Then 0.499999999999 and 0.500000000000 compare "different". :(
> This example shows we really need to compare *numbers*, not *strings*.
Surely comparing numbers is more elegant. Anyway, in order to treat the
given counterexample, one could check the rightmost character - as I
wrote - and if this characters from the two files are "0" and "9", then
one checks the next characters to the left; if they are "0" and "9"
again, then one checks more to the left, until a non-"0"-"9" couple is
found and checked.
More information about the Developers