|
|
|
|
|
by zxoq
5035 days ago
|
|
I would just write the code to compute it to arbitrary precision and then tell the interviewer that I would test how many iterations are required and hard-code it. If they insist that it must be solved at runtime, I would check the size of the computed term (1/(1+2x)) and repeat 'til it's less than 10E-6. |
|
That's a lot of iterations.