Re: [cc65] floating point support redux

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2010-04-08 21:08:43
On Thu, Apr 08, 2010 at 06:29:47PM +0200, Groepaz wrote:
> - the compiler uses ieee754 floats. same calling conventions as for 32bit
> longs can be used. (optionally, doubles can be made the same as floats)

I've fiddled with that idea for quite some time and I still do like it. But it
has one crucial problem: The C standard demands a higher precision for doubles
than what 32 bit IEEE floats deliver. So while it has several advantages (one
being that the compiler and runtime already know how to handle 32 bit values),
not being standards compliant is really something to ponder.

A standards compliant double needs 34 bits in the mantissa (10 digits of
precision), so it needs 64 bit IEEE floats or some non standard format.

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 Thu Apr 8 21:09:03 2010

This archive was generated by hypermail 2.1.8 : 2010-04-08 21:09:06 CEST