Re: [cc65] Floating point support?

From: Spiro Trikaliotis <>
Date: 2004-09-28 12:17:57

* On Tue, Sep 28, 2004 at 09:21:27AM +0200 Ullrich von Bassewitz wrote:

> On Tue, Sep 28, 2004 at 06:58:39AM +0200, Spiro Trikaliotis wrote:
> > One argument against an own 6-byte format: Compatibility...
> That is not really an argument. C does not guarantee binary
> compatibility of anything, so any program relying on it is broken.

Good point.

> Yes, but all these things applied to special conditions like NANs,
> Infinity and so on.

Well, rounding, one of the problems older implementations had, does not
seem to be such a special condition for me. ;-)

In fact, FP is rather tricky. While is seems to be very easy at first
sight, there are many pitfalls inside.

> 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.

Yes, I already understood this.

> If this is true (I don't know), it invalidates your argument about
> compatibility above.

Furthermore, I stand corrected on this (see previous post in this

> 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:-)

Well, I think FP is evil in most cases. *If* I know exactly what I'm
doing, I can use them. But for this, I almost have to be a studied
mathematician. ;-)

IMHO, the problem with FP is the following: The people mostly using them
are the people not knowledgeable enough to decide if this is
appropriate. People who are knowledgeable try to avoid them, if this is


Spiro R. Trikaliotis
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Sep 28 12:18:09 2004

This archive was generated by hypermail 2.1.8 : 2004-09-28 12:18:19 CEST