4 ms·
If I round each result to 6 significant figures and then use that as the input for the next stage, my bog standard scientific calculator gives me 9.32631 for th
by keithpeter 8y ago
If I round each result to 6 significant figures and then use that as the input for the next stage, my bog standard scientific calculator gives me 9.32631 for the final answer.
(chained using full accuracy as sibling comment does give 25 of course).
Thinking about the curves of the functions near zero in the middle steps and a few terms of the taylor series around those values suggests lots of accuracy lost in rounding. We are spoiled with 16 sig fig these days...
- Dylan16807 8y agoI think you entered a number wrong, since your calculator otherwise got the right answer. None of these functions are going into particularly dangerous areas for precision. When I round every step to 6 figures on my calculator, I still get 24.9999 Heck, rounding every step to 2 figures still gets me .41 radians which is 23.5 degrees.
- jonsen 8y agoI think he means rounding to 6 decimal places. If I do that I get 9.326312.
- Dylan16807 8y agoI...how? That's the same on most of the numbers, but even more precision on one of them. Here's my calculator, with exactly three decimal places: 25->rad: .436 sin(.436): .422 cos(.422): .912 tan(.912): 1.292 atan(1.292): .912 acos(.912): .422 asin(.422): .435 .435->deg: 24.924 Where does your calculator start to diverge, that you end up with an answer like 9? And I got the same result as Aardwolf that the Sinclair emulator returns .434, only a tenth of a degree off. Edit: Oh wait, you're using a calculator set to degrees. That's a totally different problem, because it makes the 0-1 output from sin and cos become an extremely small fraction of a circle. It works as a type of precision test, but it's not at all the same thing you'd try on the Sinclair that only does radians. It still doesn't explain your original memory. Side note: Even in degrees mode, the answer for 6 digits is kind of an outlier. If you use 5 or fewer digits the calculation crashes. 7 digits gets you 24.9. It boils down to just acos(cos( [about half a degree] )), and the other operations don't really matter.
- jonsen 8y ago...but it's not at all the same thing you'd try on the Sinclair that only does radians. Right. Apparently I wasn’t aware of that at the time. Nice to find out here on HN some fourty years later :-)