RE: bigmath

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

> From: aku saya [mailto:akusaya at gmx.net]

> Maybe this is a bug but I am unsure...

More of a feature :)
OK, so you start out with 56 digits:
                 1         2         3         4         5
        12345678901234567890123456789012345678901234567890123456
> d1 = "12345678901234567895555555555555555555555555555555555555"
> d2 = "23"

I assume you left it at base 10, meaning that you have 75 total digits of
precision.  Whenever multiplying or dividing, I recommend using at least
twice as many digits as you think you'll need--in this case, at least 112,
or base 15.  I tried it with 20 and everything worked.  I think I may switch
division/mod operations over to string math to simplify this sort of thing.
It may slow some things down, but will make getting accurate results easier.

Matt Lewis

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

Search



Quick Links

User menu

Not signed in.

Misc Menu