Re: bignum progress report
- Posted by Kat <kat at kogeijin.com> Oct 24, 2002
- 416 views
On 25 Oct 2002, at 7:44, Derek Parnell wrote: > > I recently came across this big number. (Hope translated it correctly) > > power((((power((27+power(69,1/3))/2,1/3))/3) + > (power((2/(27+power(69,1/3)))),1/3)) , 30000) Ack!!! <swoon> That's one for Luscous, i am doing the 4 basic "flat" math functions, no exponents. We might combine our two libs. Chances are, no one will need trig functions to this degree of accuracy, right? (i know, famous last words) > Its almost an integer. After the decimal point, a few hundred zeros appear > before the first non-zero. It's those few hundred zeros that might crash the built-in Eu functions, like value(). I think my tests now protect against that, but if i can't get around it, there will be (unlikely) cases where i'll haveto generate a failure msg, which the including program will haveto check for. I don't have any built-in limits to the count of digits in the numerals, except for using integers to count the digits. So the number of digits in the numeral is limited by the Eu integer type to 1,073,741,823 characters. I haven't done any bounds checking for that yet, but maybe i should... And more rigourous bounds checking value(), and maybe sprintf("%d",) , etc... minding what Andy said, of course. I am trying to not overdo bounds tests, but it trades off in other areas. Kat > ---------------- > cheers, > Derek Parnell > ----- Original Message ----- > From: "Kat" <kat at kogeijin.com> > To: "EUforum" <EUforum at topica.com> > Sent: Friday, October 25, 2002 6:24 AM > Subject: bignum progress report > > > > bignum7.e > > > > num1= 555555.55555 > > num2= 11 > > significant digit limit= 100 > > > > num1 / num2 = > > 50505.0505045454545454545454545454545454545454545454545454545454 > > 545454545454545454545454545454545454 > > Time= 113 seconds / 100 iterations > > -------------------- > > > > Still needs speeding up, and a few more numbers to test. Any requests? > > > > Kat > > > > > > >