Euler Identity in Home
|
04-09-2014, 03:41 AM
(This post was last modified: 04-09-2014 10:17 AM by Manolo Sobrino.)
Post: #37
|
|||
|
|||
RE: Euler Identity in Home
(04-08-2014 11:43 PM)Joe Horn Wrote: Whoa, help me out here. The closest that 12 significant digits can get to sin(exactly 3.14159265359 radians) is -2.06761537357E-13, which is exactly what HP returns. To verify its validity, I just cranked sin(pi rounded to 12 significant digits) to 100 decimal places and rounded the result. HP is correct. Are you saying that TI's 12 digits are somehow more correct? Since any 12-significant-digit result (from TI or anybody else) can only be as good or worse, I must be misunderstanding your point (for which, please don't flame me... I'm really trying to understand here, and not be a "sycophant"). Thanks in advance. Yeah, that's the closer a computer can get to calculate Sin[3.14159265359000000000000000000000000000000000000000000000000000000] But if your number has 11 decimal positions you can't get a more accurate answer than that with 11 decimal positions. We're talking about accuracy here, not precision. That's what happens when you calculate this in Wolfram Alpha: http://www.wolframalpha.com/input/?i=Sin[3.14159265359] They call the first thing Decimal approximation, and the second Result. I've tested this rounding to 12 approach with Mathematica, which uses the GMP multiple precision library: I couldn't get the quoted results unless I worked with a precision of at least 25 digits and I couldn't get other results from the emulator unless I figured out that they were rounded to 12 significant digits first. The TI 8X calculators give you the accurate values they can: pi=3.1415926535898 sin(3.1415926535898) = 0 sin(1E-14)= 1E-14 sin(pi+1E-11)= -1E-11 (actually this is a flaw in the implementation of how to display this; it should be: -1.00E-11) sin(pi+1E-12)= -1E-12 (idem, now -1.0E-12) sin (pi*(1+1E-13))= -3E-13 sin (pi*(1+1E-12))= -3.1E-12 sin (pi*(1+1E-11))= -3.14E-11 Now try this in the Prime emulator: pi= 3.14159265359 sin(pi*(1+1E-11))= -3.02067615374E-11 The only way you can get it is if you round the argument like this: pi*(1+1E-11)= 3.14159265359 + 0.00000000003 And then perform your high precision calculation: Sin[3.14159265359`25 + 0.00000000003`25]= -3.0206761537357*10^-11 (Standard Mathematica notation for numbers to `n precision) Had you done for instance this: 3.14159265359`25*1.00000000001`25 then: Sin[3.14159265359`25*1.00000000001`25]= -3.1622688073257*10^-11 Which would have given you the best available precision answer for its value of Pi. (BTW, for this value of Pi, the TI result is -3.16E-11). The TI calculations (more significant digits of Pi) yield accurate results in the neighbourhood of Pi: Compare: sin (3.1415926535898*(1+1E-12))= -3.1E-12, with: Sin[3.1415926535898`14*(1`14 + 0.000000000001`14)]= -3.1*10^-12 Sin[3.1415926535898`32*(1`32 + 0.000000000001`32)] = -3.1483541909464167205*10^-12 the true value to ten significant digits: N[Sin[Pi*(1 + 1*10^-12)], 10]= -3.141592654*10^-12 and the Prime results: sin(pi*(1+1E-12) = -2.06761537357E-13 And the other result: sin(3.1415926535898*(1+1E-11))= -3.14E-11 With: Sin[3.1415926535898`14*(1`14 + 0.00000000001`14)]= -3.14*10^-11 Sin[3.1415926535898`32*(1`32 + 0.00000000001`32)]= -3.14226880732546167205*10^-11 the true value to ten digits: N[Sin[Pi*(1 + 1*10^-11)], 10]= -3.141592654*10^-11 and the Prime results quoted above: sin(pi*(1+1E-11) = -3.02067615374E-11 Which despite rounding is accurate to 11 decimals: Sin[3.14159265359`12*(1`12 + 0.00000000001`12)]= -3.*10^-11 but as discussed not the best precision answer because of rounding practices. IMO, the facts that the TIs perform calculations with more significant digits and that they only claim accuracy yield more accurate and meaningful answers(*). On the other hand, Casio... No, I'm not willing to engage in flame wars (and this is an old and complex issue that won't be settled as both sides want different things and they are right yet unreasonable), but I think that you guys have dismissed Colin too swiftly. As I've said elsewhere I'm not really interested in sharing my thoughts on the Prime saga much (/any) longer. I'm not (by any means) an expert on floating point precision/accuracy of numerical algorithms (it's unbelievably involved). I only perform tests for my own calculations with data coming from measurements and check the accuracy of the numbers I get from models. In my experience raw precision and meaningful significant digits are not the same. (... I feared this word sycophant could eventually catch on ) ____________________________________________________________ (*) In this kind of calculations for ~(0, 2 Pi). As you might have noticed I'm a brand agnostic, so I have have no problem in saying that (I suspect) they do have other problems in the trig functions having to do with range reduction... yet this is not the place to delve into details. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 6 Guest(s)