Re: [cc65] Floating point support?

From: Sidney Cadot <sidney1jigsaw.nl>
Date: 2004-10-04 07:23:18
Hi,

> Ok so, while I'm not 100% sure if this is the right decision, I would 
> propose
> a still to develop 6 byte format for cc65. Using something similar to 
> the
> turbo pascal format as shown by Sidney would probably be ok.
>
>  47     40 39 38                                 0
>   .-----------------------------------------------.
>   | 8 bits |s|msb         39 bit mantissa      lsb|
>   `-----------------------------------------------'
>        |    |                  `------------  mantissa
>        |    `-----------------------------  sign bit
>        `--------------------------------  biased exponent (80h)
>
> Since enough bits are available, I think that using an explicit '1' 
> allows for
> easier processing and detection of denormalized values (if necessary).

Ok.

> The
> question is if we need representations for NaN, Infinite, and so on. 
> I've
> checked the floating point format of the Texas TMS320 DSP, and it 
> doesn't
> support any special values. The IEEE Std. 754 format supports NaN and
> Infinity.

Pre-IEEE, the usual thing to do was to have the functions return a 
status. I suppose we could have an FP status byte to collect anomalous 
floating point operations.

Regards, Sidney

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Oct 4 07:23:17 2004

This archive was generated by hypermail 2.1.8 : 2004-10-04 07:23:26 CEST