[Coco] One-liners coming through!

jdaggett at gate.net jdaggett at gate.net
Mon Jun 25 19:04:54 EDT 2007


Brian 

That would be about where most single prescision floating point numbers would  
overflow.

2^127 is 1.701411E+38. Single precision IEEE format is 23 bit mantissa and 7 bit 
weigted exponent. 

This issue is some older  8 bit computers including the Coco did not  use IEEE 
standard for floating point math. The standard was fully adopted in 1985 I think 
and the Coco and several others  were on the market well before the IEEE 
standard was adopted fully.

The floating point routiunes in the Coco are slightly better than IEEE single 
precision. IEEE 754 standard single precision will only be accurate to about 7 
decimal digits. The Coco routines use a fourth byte to the mantissa and that takes 
the decimal accuracty to 9 digits. With exponent and sign bit the Coco floating 
point numbers use five bytes instead of the IEEE four bytes. 

In most cases single precision is adequate. 

james 
On 25 Jun 2007 at 12:40, Brian Blake wrote:

> George,
> 
> I just typed in my results from the Vcc emulator, 81E+38, into a Yahoo
> search bar and it came back with the actual number it represents.
> Correct or not, I flew with it since there was no way I was going to
> try and do the conversion myself, and I didn;t have a real CoCo3 to
> test it. The emulator overflowed at the 81E+38. 
> 
> 
> Brian





More information about the Coco mailing list