Re: bigint/bugnum library
- Posted by mattlewis (admin) Jul 13, 2013
- 1686 views
Spock said...
Thanks [to all] for the reply.
(2 ^53) /100 = 90,071,992,547,409.92 (90 trillion)
To prevent any (digit-based) overflow I should limit the max number of digits which then would give me an upper limit of 10 trillion less one cent.
The highest grossing companies have revenues approaching 1/2 a trillion USD so this method of storing monetary amounts would safely work for any one company, even a massive one, for many years. For our medium size company that limit will never be breached, so my code will never crash. Yay!
When you start running 64-bit euphoria, its integers go up to 262-1, so you'll have plenty of room without even needing floating point.
Matt