"Henning P. Schmiedehausen" wrote:
>
> "Geir Magnusson Jr." <[EMAIL PROTECTED]> writes:
>
> >I cooked up one solution, just taking everything extending Number to a
> >double, and comparing those.
>
> Ugh. I'd say that double is a bad thing. Because some of the integer
> types don't scale well into two's-complement floats. I remember the
>
> double xxx = 0.0;
> if(xxx == 0.0)
> printf("true");
> else
> printf("false");
>
> returning "false" for small numbers of zero in SAS-C on the Amiga much
> too good to like this.
>
> Can we make some propagation rule that keeps "integer-like vs. integer-like"
> out of the floating-point realm? I'd say this would be good, performance-wise,
> too.
I am not too worried about the performance aspects of this (unless you
are using a Pentium :)
But you are right - the zero comparison is a problem. Mentally fogged
in last night, I guess.
Maybe we should stick to our guns here...
geir
--
Geir Magnusson Jr. [EMAIL PROTECTED]
System and Software Consulting
Developing for the web? See http://jakarta.apache.org/velocity/
You have a genius for suggesting things I've come a cropper with!