Re: [cc65] Floating point support?

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2004-09-29 09:23:07
                                 
Good morning!

As I see it, the final battle is between the 32 bit standard fp format and a
(to be defined) 48 bit homebrew.

Currently my mind favours the 32 bit format by a small margin, while my tommy
says the 48 bit format would be much more fun. Having to implement a fp
library for the compiler in C is more work, but it is also possible to use
this C implementation to check and streamline the design. The last time I
wrote floating point addition and multiplication routines was for a lab course
more than 15 years ago, and at that time, no one wanted to see it. So with the
48 bit format I would get a second chance:-)

Lets sum up the arguments:


                 32 bit                        48 bit
    -----------------------------------------------------------------------

      "Standard" (whatever that's      Better precision.
      worth).
                                       Will meet the ISO C requirements.
      Needs slightly less memory and
      is faster.                       Format can be optimized for 6502.

      Compiler can use native
      fp routines. But: Limits
      number of host platforms.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      Doesn't meet ISO C               Needs slightly more memory and is
      requirements.                    slower.

      Less precision.                  Compiler needs fp library. But:
                                       will work on all host platforms.
      Binary format is given and
      we have to live with that.       Implementation needs more code, so
                                       programs have a larger memory
                                       footprint.


Did I forget anything?

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 Wed Sep 29 09:23:10 2004

This archive was generated by hypermail 2.1.8 : 2004-09-29 09:23:19 CEST