• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Very long floating point numbers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Very long floating point numbers (From: Shawn Erickson <email@hidden>)

  • Prev by Date: Re: Very long floating point numbers
  • Next by Date: Re: receiving mouse events outside of my window
  • Previous by thread: Re: Very long floating point numbers
  • Next by thread: Build product size
  • Index(es):
    • Date
    • Thread