Commodore 128 Alive!

General => General chat => Topic started by: xlar54 on August 31, 2009, 12:02 AM

Title: Floating point storage in BASIC
Post by: xlar54 on August 31, 2009, 12:02 AM
Hey guys,

Ive updated the commodore programming wiki with a rundown on how BASIC stores floating point numbers in, what I think is the simplest explanation.  Id appareciate your feedback.  You can check it out here:

http://commodore64.wikispaces.com/Floating+Point+Storage+In+BASIC (http://commodore64.wikispaces.com/Floating+Point+Storage+In+BASIC)
Title: Re: Floating point storage in BASIC
Post by: Hydrophilic on October 04, 2009, 07:33 AM
That's a concise but adequate description.  You might want to show how the mantissa would be represented in hex since ML programmers are the ones most likely to need access to the guts of BASIC's data (BASIC programmers are usually oblivious).  Your example mantissa would be $0.95916872. 

You should also note that the mantissa is stored high byte first, opposite of the normal convention in 6502 ML.

An example of converting a number into floating format would also be enlightening.
EhPortal 1.34 © 2025, WebDev