Re: Big Int support
Re: Big Int support
- Subject: Re: Big Int support
- From: Aaron Tuller <email@hidden>
- Date: Mon, 2 Jun 2003 15:15:51 -0700
openssl (headers come with Jaguar) has a Big Number structure.
http://www.openssl.org/docs/crypto/bn.html
I've used it, for crypto stuff, but it could be useful on it's own.
-aaron
At 4:48 PM -0500 6/2/03, john gale wrote:
would this really work, though? Here's from the documentation on
NSDecimalNumber:
NSDecimalNumber, an immutable subclass of NSNumber, provides an
object-oriented wrapper for doing base-10 arithmetic. An instance
can represent any number that can be expressed as mantissa x
10^exponent where mantissa is a decimal integer up to 38 digits
long, and exponent is an integer from -128 through 127.
hence, there wouldn't really be enough precision to detail all of
Chad's number:
(such as 2^1000 which is equal to
10715086071862673209484250490600018105614048117055336074437503883703510511249361224931983788156958581275946729175531468251871452856923140435984577574698574803934567774824230985421074605062371141877954182153046474983581941267398767559165543946077062914571196477686542167660429831652624386837205668069376
according to Mathematica)
is there a class that could store and do arithmetic on an
effectively infinite number? certainly not infinite truly, but
enough so that precision is not lost when working with numbers like
2^10^100.
~ john
On Monday, June 2, 2003, at 12:39 PM, Clark S. Cox III wrote:
On Monday, Jun 2, 2003, at 13:28 US/Eastern, Chad Armstrong wrote:
Not exactly a Cocoa-related question, but it could be incorporated
into a Cocoa program. Is there a library or way to create 'big
int' support so a number isn't limited to the particular bounds of
int, float, or even an unsigned long?
Check out NSDecimalNumber.
=================
support the arts!
www.smadness.com
updated Jan 21 2003
_______________________________________________
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.
_______________________________________________
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.