Euler Identity in Home
|
04-16-2014, 12:02 PM
(This post was last modified: 04-16-2014 12:12 PM by Dieter.)
Post: #54
|
|||
|
|||
RE: Euler Identity in Home
(04-16-2014 08:23 AM)DavidM Wrote: I don't have a large collection of calculating/computing systems to compare, but I can say that I have checked the following systems to see what the result of "sin(3.14159265359)" is for each one: Let me add just two remarks: 1. The true value of sin(3,14159265359000000...) is 2,0676 15373 56616 72049 71158...·10–13-. For arguments that close to \(\pi\) the first 20+ significant digits for sin(x) and tan(x) agree with \(\pi\) – x. This means that the results given by Wolfram Alpha and Excel have merely three valid digits. In the latter case this probably is due to the fact that Excel uses binary arithmetics and 3,14159265359 cannot be represented exactly with the usual 52 mantissa bits. If x is off by 2–53 the error in sin(x) will be roughly the same, i.e. about 10–16. Which agrees with the error in the result you posted. 2. For evaluating trig functions, calculators often use a method that requires an internal value of \(\pi\) with at least twice the number of returned significant digits for a full precision result. However, the HP and TI devices I used only carry three additional digits for internal calculations. This explains the behaviour of your TI-34, which BTW is the same as in earlier HP 10-digit calculators: (04-16-2014 08:23 AM)DavidM Wrote: The only TI calculator I have is a TI-34 (a 10-digit unit). Here's the results it gave: The internal value of \(\pi\) is 3,141592653590 (rounded to 13 digits). Since sin(x) here essentially is \(\pi\) – x = –4,1E–10, this it what you see. If you use the \(\pi\) key, the internal 13-digit value is entered so that \(\pi\) – x becomes zero. (04-16-2014 08:23 AM)DavidM Wrote: Pressing the <pi> key results in the display showing the value 3.141592654 (the same as item a above). But clearly there's a difference. In an attempt to see that difference, I tried the following: Right. That's 3,141592653590 – 3,141592654. Which agrees with the returned sine value because for the TI-34 \(\pi\) equals 3,141592653590. (04-16-2014 08:23 AM)DavidM Wrote: It appears the TI-34 is carrying more digits than it displays for pi. Sure. It carries 13 digits not just for \(\pi\). Try e1 – 2,718281828. (04-16-2014 08:23 AM)DavidM Wrote: Of those systems, only the TI-34 rounded the final result to 0, and it only did that when I used the special key for pi. Granted, we are focused on calculators here. But the insistence that zero or 0.000000000000 is a more correct answer for sin(3.14159265359) than -2.068E-13 seems to be a TI-specific viewpoint which isn't shared by the other math libraries I am able to compare it to. All this is due to the way sin(x) is evaluated. As already stated, many (most?) calculators use an algorithm where sin(x) for x so close to \(\pi\) is \(\pi\) – x. If you press the \(\pi\) key, x equals the 13-digit internal \(\pi\) value, so sin(x) = \(\pi\) – x becomes zero. It's that simple. On the other hand, HP's 10-digit devices use their 13 digits only internally, so you cannot enter a 13-digit \(\pi\) value. 3,141592654 is as close you can get – both manually and by using the \(\pi\) key. So the result is always the difference between the 10-digit and the internal 13-digit representation of \(\pi\): –4,1E–10. Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)