Re: bigmath

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

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

I changed bigmath.exw to

d1 = "12345678901234567895555555555555555555555555555555555555"
d2 = "23"

Then I got

12345678901234567895555555555555555555555555555555555555 * 23 =
283950614728395061597777777777777777777777777777777777765
time: 0.17

12345678901234567895555555555555555555555555555555555555 / 23 =
4398405781969369595351282556717245438888.83660007247219861602941362441840573
time: 0.05

12345678901234567895555555555555555555555555555555555555 mod 23 =
12345678901234466732222570260054862476056751058910461131
time: 0.18

Why is the last test can be larger than 23?

Thanks for the library.
______________________________________________

M> I just sent Rob (and put up on my page:
M> http://www14.brinkster.com/matthewlewis/projects.html ~ 220K ) a new lib for
M> doing math with really big numbers (up to nearly 10,000 digits precision).
M> It stores numbers very compactly, and most operations are not done using
M> string math.

M> This was something that I've been wanting to do for a while.  Kat's bignum.e
M> sorta brought this to the surface again.  BTW, Kat, I was getting some bad
M> results from your string math routines (I tried to use them at first, but
M> went ahead and rolled my own).

M> It's got add/sub/mult/div operations, plus mod, root, power and compare
M> routines.

M> Matt Lewis

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

Search



Quick Links

User menu

Not signed in.

Misc Menu