On Tue, Jul 16, 2002 at 07:42:25AM -0700, Sean O'Rourke wrote:
> On Tue, 16 Jul 2002, Nicholas Clark wrote:
>
> > 5.8.0 does the full fun and games of integer or floating point comparison:
> >
> > perl5.8.0-64 -le '$a = ~0; $b = $a & ~1; printf "%x <=> %x\n", $a, $b; print $a
><=> $b; {use integ
On Tue, 16 Jul 2002, Nicholas Clark wrote:
> 5.8.0 does the full fun and games of integer or floating point comparison:
>
> perl5.8.0-64 -le '$a = ~0; $b = $a & ~1; printf "%x <=> %x\n", $a, $b; print $a <=>
>$b; {use integer; print $a <=> $b}'
> <=> fffe
> 1
> 1
>
>
On Mon, Jul 15, 2002 at 10:17:51PM -0700, John Porter wrote:
>
> Sean O'Rourke wrote:
> > ... all it buys you is a few bits of precision when your ints
> > and floats are both 64-bit, and slower comparisons all the time.
> > IMHO it's a wash, so I did it this way.
>
> I would point out that inte
> > Um, I don't think it's right to *always* do the comparison
> > floating point. Specifically, if both operands are ints,
> > the comparison should be int.
>
> I thought about this, but all it buys you is a few bits of precision when
> your ints and floats are both 64-bit, and slower comparison
Sean O'Rourke wrote:
> ... all it buys you is a few bits of precision when your ints
> and floats are both 64-bit, and slower comparisons all the time.
> IMHO it's a wash, so I did it this way.
I would point out that integers have infinite precision.
More than a few bits' difference, I'd say.
B
On Mon, 15 Jul 2002, John Porter wrote:
> Sean O'Rourke wrote:
> > NOTE: this may be part of the monster-patch to fix the over-agressive
> > string GC (814), but it's much more palatable in this form.
> > PerlInt's
> > cmp() method was backwards, and would truncate floats on the other
> > side of
Sean O'Rourke wrote:
> NOTE: this may be part of the monster-patch to fix the over-agressive
> string GC (814), but it's much more palatable in this form.
> PerlInt's
> cmp() method was backwards, and would truncate floats on the other
> side of the comparison.
> This patch always uses floating
# New Ticket Created by "Sean O'Rourke"
# Please include the string: [perl #823]
# in the subject line of all future correspondence about this issue.
# http://bugs6.perl.org/rt2/Ticket/Display.html?id=823 >
NOTE: this may be part of the monster-patch to fix the over-agressive
string GC (814)