Re: SD: Floating point


[Prev][Next][Index][Thread]

Re: SD: Floating point



I've inlcluded a file that explains the 85's FP format. It's from the 
formats.zip on ticalc.org.

>From: yakko@ravine.binary.net
>Date: Wed, 19 Aug 1998 22:41:17 -0500 (CDT)
>To: shell-developers@lists.ticalc.org
>Subject: SD: Floating point
>Reply-To: shell-developers@lists.ticalc.org
>
>
>
>Does anyone know what format the floating point numbers are stored
>in on the 85?
>
>(anyone else notice, I'm kinda big into floating points these days)
>
>
>


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
File format of .85N files
=========================
Compiled by Magnus Hagander (mha@algonet.se)


The .85N files are TI-85 real values.
This is the simpliest variable on the TI-85, yet sometimes one of the
hardest to handle. It is also included as "sub-variable" in e.g. lists
and matrixes.

The format of a real value is:

Offset    Length    Comment
======    ======    =======
00h       01h       Byte: Sign. 00h -> Positive number; 80h -> Negative number.
01h       01h       Low order of 10^x value.
02h       01h       High order of 10^x value.
                    The 10^x value is calculated using:
                    x=[01h]+256*([02h]-FCh)
03h       07h       Hexa-decimal interpretion of value. The decimal point
                    lies between Low and High nibble of [03h].

The reason that the 10^x value seems so complicated is that it should handle
values between 10^999 <-> 10^-999.
The "value-part" may seem confusing, but I just didn't know how to say it.
A few examples will illustrate (and hopefully s
olve) the problem:

                               Storage
Value                 00 01 02 03 04 05 06 07 08 09

10                    00 01 FC 10 00 00 00 00 00 00
Pi                    00 00 FC 31 41 59 26 53 58 98
-Pi                   80 00 FC 31 41 59 25 53 58 98
9.99E999              00 E7 FF 99 90 00 00 00 00 00
2.5E-35               00 DD FB 25 00 00 00 00 00 00
--====================987654321_0==_
Content-Type: text/plain; charset="us-ascii"