RE: [cc65] float and double support - libraries?

Date view Thread view Subject view

From: Greg Long (cc65_at_maneuveringspeed.com)
Date: 2003-03-07 00:07:47


I would suggest with the limited memory of these machines, basic IEEE
compliant float and double support would be a good initial goal, with
math.h for the extra math functions separate - and even that could be
broken down into non-standard libraries if I guy wants to just include
what is neccessary (something like "trig.h" or even just basic "log.h"
(for logrythmic and exponent support).

Ullrich pointed out...
> The standard does not require a "double" to have 64 bit, and it does 
> not require a "double" to cover a greater numeric range than a 
> "float". Which means that one 32 bit floating point type could be used

> for both.

Which is a VERY good point...although I would submit that if they both
have the same precision, it's silly to have both other than for
compatability reasons.  Therefore I would suggest a double should indeed
have 64 bits in the interest of, "while we're at it."


Of course, a debate doesn't get code written.  I'll *TRY* but that may
be beyond my capabilities since I'm so green at this.  Perhaps just this
then as a suggestion to get it going:

IEEE compliant float and double support, 32bit each, with the double
code written in mind that it could be expanded to 64bits.

Let's not worry aobut math.h yet...just basic add, subtract, multiply,
divide support would be a good starting point.



If someone more skilled at this wants to lead the way and direct me, I'm
sure I can write some code.

Greg

-----Original Message-----
From: owner-cc65_at_musoftware.de [mailto:owner-cc65_at_musoftware.de] On
Behalf Of Groepaz
Sent: Thursday, March 06, 2003 1:53 PM
To: cc65_at_musoftware.de
Subject: Re: [cc65] float and double support - libraries?


On Thursday 06 March 2003 06:06, Greg Long wrote:
> I know I've sent a lot of posts lately, don't mean to flood...but I 
> don't see anything about float and double implementations using 
> libraries or other.  Any solutions or suggestions there?

if you are keen enough to try... there is a little library in that big 
"snapshot" of mine on the ftp. that one wraps the c64-basic float
routines 
into c-callable routines....however, it'll be highly unportable and very

non-standard in any way.

gpz
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-03-07 00:08:29 CET