Re: Very long floating point numbers
Re: Very long floating point numbers
- Subject: Re: Very long floating point numbers
- From: David Remahl <email@hidden>
- Date: Fri, 24 May 2002 16:54:36 +0200
vBigNum won't give you more than 1024 bits of precision, though...It
certainly won't be enough to store a million decimals accurately.
You will have to roll your own solution or use a library that already
exists, since the functionality isn't available in the C language. Here is a
list of resources that may be useful:
<
http://www.mathtools.net/cgi-bin/redirect.pl?redirect=http://www.swox.com/g
mp/&location=
http://www.mathtools.net/Fortran/Extra_precision_computation/C_
and_C++/>
If your program will be GPL, then the following free software may be a good
option:
<
http://www.swox.com/gmp/>
/ Sincerely, David
>
Also checkout <http://developer.apple.com/hardware/ve/pdf/oct3a.pdf>.
>
>
>
-Shawn
>
>
On Friday, May 24, 2002, at 07:37 AM, Shawn Erickson wrote:
>
>
> What do you mean by store? persistently, in RAM, etc.
>
>
>
> float is a 32 bit number (as defined by IEEE)...
>
> S EEEEEEEE FFFFFFFFFFFFFFFFFFFFFFF
>
> 0 1 8 9 31
>
>
>
> double is a 64 but number...
>
> S EEEEEEEEEEE FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
>
> 0 1 11 12 63
>
>
>
> E = exponent
>
> F = fraction
>
> S = sign
>
>
>
> If you need to do operations on bigger numbers consider Apple's vBigNum
>
> library
>
> ( <http://developer.apple.com/hardware/ve/vector_libraries.html>). If
>
> supports 256, 512, 1024 bit numbers, not sure if it does floats...?
>
> Also other libraries exist that do the same thing.
>
>
>
> If you don't need to do any processing simply store them in a string
>
> form.
>
>
>
> -Shawn
>
>
>
> On Friday, May 24, 2002, at 07:07 AM, Martin Weil wrote:
>
>
>
>> Hi!
>
>> Is there any way to store floating point numbers beyond the 16 letter
>
>> limit?
>
>>
>
>> Thanks,
>
>> Martin
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.