Re: int128_t
Re: int128_t
- Subject: Re: int128_t
- From: Paul Russell <email@hidden>
- Date: Fri, 17 Oct 2008 21:16:33 +0100
On 17 Oct 2008, at 20:26, Chris Espinosa wrote:
On Oct 17, 2008, at 12:07 PM, Mark Wagner wrote:
Take the US national debt, around 10 trillion dollars. Convert it to
a currency with a high exchange rate, e.g. the Zimbabwean Dollar at
around 2.5 trillion to the dollar as of July, and just for the hell
of
it multiply by 100 (to allow for hyperinflation over the next month).
That's 10^28, which needs log(28) / log(2) = 93 bits. Why do you
think 128 bits will be enough?
Because 128 bits is 34,359,738,368 times larger than 93 bits.
Thirty four billion times larger.
Regardless, vBigNum is the header you're looking for if you really
want 128-bit integer arithmetic (or 256 or 512 or 1024 for that
matter).
file:///Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBigNum.h
I think we can close this thread.
One final comment and I'll shut up: 128 bit long doubles have 106 bits
of precision, which should be more than enough, even for Zimbabwe, if
it should decide to take on the US national debt.
Paul
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden