Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As to my understanding continued fractions can represent any number to as many decimal points as you need. So if you need π you can just calculate 2 decimal points and write 3.14 if you want to calculate π*10^9 you can calculate i.e. 11 digits and write 3141592653.58 I think this is what OP means and I am not sure why you do not agree.


But here continued fractions are used to progressively generate approximations to the true real number. So you have no control over denominator and as you mentioned repeated division is necessary for most numbers. In comparison, digit generation approach can be tailored to the output radix (typically 10). Division still does likely happen, but only in the approximation routine itself and thus can be made more efficient.


I agree though the article is about calculator app and user typically won't care if this is 10ns or 100ms to gen an output - it would look like an instant response anyway.




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

Search: