PS.


Out of interest, I thought I'd see how long my calculator takes to calculate pi. On my P1.7, it does it to 31567 digits in just under a minute (58.33s), and (leaving it running overnight) it took 10 hours, 10 minutes and 50 seconds to do it to its maximum precision of 315643 digits.

I thought it took time proportionate to digits squared times log to base two of digits, but to be slightly more accurate, that should be log base 1.443-ish.

Curiously, I've never attempted this before (on my old P100 it would have taken just over a week), and I have to admit I have a bug. Although I think it probably *did* do the calculation, (it took about as long as I expected), what I was left with was a NaN.

I've just looked, and sure enough, it's because, when I compute pi (or Ln 10) for the internal cache, I bump up the precision temporarily, to ensure that the cached value is "perfect". Guess who didn't check for precision already at max?

The silly bit about the above is that it's only when it comes to display the value that it whines about the "invalid" 32768. The computation works fine.

--
Lau
http://www.bergbland.info
Get a domain from http://oneandone.co.uk/xml/init?k_id=5165217 and I'll get the commission!


Reply via email to