Re: [cc65] floating point support redux

From: Groepaz <>
Date: 2010-04-09 01:14:25
On Donnerstag 08 April 2010, Ullrich von Bassewitz wrote:
> 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.

yes ofcourse ... in case of cc65, i would still mostly ignore actual doubles, 
and threat them the same as floats, because well... it doesnt matter :) it 
could just aswell not support doubles at all, simply because they are way to 
slow, and having a compiler option like above would be a simple convenience 
thing, saving a typedef or so =P


The general rule about people on the internet seems to be 'attractive, single, 
mentally stable'... now,choose two

To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Apr 9 01:14:53 2010

This archive was generated by hypermail 2.1.8 : 2010-04-09 01:14:56 CEST