Hacker News new | ask | show | jobs
by semolinapudding 485 days ago
That's pretty cool, but the downsides of switching to RRA are not only about user experience. When the result is 0.0000000..., the calculator cannot decide whether it's fine to compute the inverse of that number.

For instance, 1/(atan(1/5)-atan(1/239)-pi/4) outputs "Can't calculate".

Well alright, this is a division by zero. But then you can try 1/(atan(1/5)-atan(1/239)-pi/4+10^(-100000)), and the output is still "Can't calculate" even though it should really be 10^100000.

1 comments

You missed a 4. You are trying to say 1/(4atan(1/5)-atan(1/239)-pi/4) is a division by zero. On the other hand 1/(atan(1/5)-atan(1/239)-pi/4) is just -1.68866...
Good catch, thank you.