On Tue, Sep 28, 2004 at 06:58:39AM +0200, Spiro Trikaliotis wrote: > One argument against an own 6-byte format: Compatibility... What if I > want to use the output of the compiled program on another machine? Only > IEEE 754 4 byte and 8 byte types are compatible on a wide range of > machines. That is not really an argument. C does not guarantee binary compatibility of anything, so any program relying on it is broken. Besides that, there's always the byte order, which prevents binary compatibility even for data types that have the same internal representation. > Furthermore, many implementations before IEEE 754 suffered > from some minor drawbacks because the people implementing them were not > good mathematicians, and did not know what is not so optimal. IEEE 754 > tried to circumenvent these problems. Yes, but all these things applied to special conditions like NANs, Infinity and so on. The goal (if 6 byte floats are used) is to have a format that is compatible to the C standard, so conforming C programs will run, not to be compatible with some major number crunching standard. > AFAIR, IEEE 754 does *not* tell use the format of the FP values! If this is true (I don't know), it invalidates your argument about compatibility above. > Furthermore: Does C have a "clean" interface to even use these? I > always thought C has some problems with +/- NaN, +/- Infty, and so on. C99 is better than C89 in this respect, but I don't know if all problems have been resolved. After all, I'm a low level programmer. For me, floating point numbers are infernal stuff:-) Regards Uz -- Ullrich von Bassewitz uz@musoftware.de ---------------------------------------------------------------------- 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 09:21:30 2004
This archive was generated by hypermail 2.1.8 : 2004-09-28 09:21:39 CEST