[Coco] printing out floating point numbers...(only peripherally related to coco)

jdaggett at gate.net jdaggett at gate.net
Wed Jul 12 14:18:09 EDT 2006


First off why do you need 245 bits in the mantissa when you limit yourself to only 8 
bits in the exponent? Do you really need  70+ decimal digit precission when you 
exponet is limited to 38 places decimal? 

There is precission and then there is taking precision to nth degree of absurdity. I 
think 245 bits in the mantissa is fast approaching absurdity with only 8 bits in the 
exponent.

just my opinion 

james

On 11 Jul 2006 at 19:49, Aaron Banerjee wrote:

> All,
>    I'm working on a program that can handle floating point numbers with
> gobs and gobs of precision.  I'd like to make a float similar to the IEEE
> 754 standard (1 sign bit, 8 exponent bits, and 23 precision bits), but of
> much more precision.  What's more I'd like to be able to do basic
> arithmetic with these high-precision floats (e.g. +, - , /, *) quickly,
> even on a slow processor.  This sounds like something someone has at least
> tried to do at one time on a coco.
>    The form of a float I happen to be using is a 32 byte value:
> 
> bit 0:       sign         (S)
> bits 1-8:    exponent     (E)
> bits 9-255:  precision    (F)
> 
> where the final value is:
> 
> value = (-1)^S * 2^(E-127) * 1.F
> 
> Of course, you realize that using regular floats and doubles to evaluate
> the above expression would kill off all of the wonderful precision I was
> looking for in the first place.  Has anyone ever done anything of the
> sort?  How did you solve it (e.g. C++ class?  Assembly?)  
> 
> On another note, given such a float, I'm trying to get a good routine to
> print them to the screen (or a string).
> 
> This actually sounds like something that would be in a textbook somewhere,
> but I don't seem to be able to find it.  Thanks in advance for your help.
>                 - Aaron
> 
> 
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
> 
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.9.10/386 - Release Date: 7/12/2006
> 





More information about the Coco mailing list