Re: bigint/bugnum library

new topic     » goto parent     » topic index » view thread      » older message » newer message
Spock said...

(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!

Spock

Glad to hear that it works for your purposes. Of course, for economists doing calculations on the world economy (something like $60 trillion USD GDP iirc), this isn't enough, so I think we still need a money math lib. A BCD lib would make a lot of sense as well.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu