GNU bug report logs - #6366
join can't join on numeric fields

Previous Next

Package: coreutils;

Reported by: Alex Shinn <alexshinn <at> gmail.com>

Date: Mon, 7 Jun 2010 05:24:02 UTC

Severity: wishlist

Tags: patch

Merged with 10924, 12264

Full log


Message #21 received at 6366 <at> debbugs.gnu.org (full text, mbox):

From: Alex Shinn <alexshinn <at> gmail.com>
To: Jim Meyering <jim <at> meyering.net>
Cc: Pádraig Brady <P <at> draigbrady.com>, 6366 <at> debbugs.gnu.org
Subject: Re: bug#6366: join can't join on numeric fields
Date: Wed, 9 Jun 2010 16:33:06 +0900
On Wed, Jun 9, 2010 at 3:56 PM, Jim Meyering <jim <at> meyering.net> wrote:
>
> When comparing floating point numbers how would join measure equality?
> Should it consider 1.000000000000001e2 to be equal to 100.0 ?
> What if the maximum precision available does not
> allow us to distinguish those two values?

Indeed, that's why you generally don't use floating
point numbers as database keys.

We could either restrict the numbers to integers,
or continue to allow floats with a note to the effect
that float precision is machine-specific.  Personally
I have no need for floats so am happy with the former.

-- 
Alex




This bug report was last modified 6 years and 260 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.