Hacker News new | past | comments | ask | show | jobs | submit login

I’m not sure that’s efficient. The number of digits in that tenth power grows very rapidly (59049^¹⁰ already has 47 digits; (59049¹⁰)¹⁰ around 477) and there’s the risk that rounding introduces errors (did you really do that with “a 4 function calculator”?)

On the other hand, (hand-waving) it takes many generated digits before the “far away” get shifted left of the decimal point, so numerical analysis probably can show you don’t need them all to reach a target number of digits.




>did you really do that with “a 4 function calculator”?

I have in the past, this time I used the 4 function calculator mode of Windows 10's calculator. x^2, MS, x^2, x^2 * MR = on the loops, then divide by 1+n zeros, repeat.

I used NotePad++ to record the data as I went.

Doing it for a binary logarithm would be a lot easer, because then it's square and optionally divide by 2.


> this time I used the 4 function calculator mode of Windows 10's calculator

AFAIK, that calculator has “Infinite precision for basic arithmetic operations (addition, subtraction, multiplication, division) so that calculations never lose precision” (https://github.com/microsoft/calculator)


The intermediate numbers never get bigger than 10^10 - if you look at the python program I posted you might find that easier to see.


That’s true, but the number of digits to the right of the decimal point grows rapidly.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: