On 28 Sep 2004, at 09:33, Marc Rintsch wrote: > > I always thought one benefit of the IEEE format is, that it's designed > to > implement comparisons (<, >, =) of n-bit floats as comparisons of n-bit > signed integers? That's only possible if the MSB is the sign bit. > The code > to compare 4 byte signed ints is already in the libs. Except that you would have to handle NaNs properly. e.g. double x = 1.0/0.0; /* x is now a NaN */ int f = (x==x); /* f should now be false, since !(NaN==NaN) */ ...This case is nice as e.g. the MSVC++ compiler optimizes away (x==x). Regards, Sidney ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Tue Sep 28 19:03:08 2004
This archive was generated by hypermail 2.1.8 : 2004-09-28 19:03:49 CEST