How does the DM42 accuracy compare to other calculators ?
12-21-2017, 07:01 PM
Post: #7
 Dieter Senior Member Posts: 2,397 Joined: Dec 2013
RE: How does the DM42 accuracy compare to other calculators ?
(12-20-2017 07:45 PM)Michael de Estrada Wrote:  I was curious as how the the new Swiss Micros DM42 accuracy compared with other calculators, so I performed the calculation of -2 ln e^x on several calculators with the following results:

You cannot assess the accuracy by comparing the imaginary part of the result to zero. If it actually is zero something has gone wrong. ;-)

(12-20-2017 07:45 PM)Michael de Estrada Wrote:  So, the HP calculators all have the same error in the imaginary part which should be zero, but the DM42 error is 260% lower.

The non-zero imaginary part is not an "error", it's the exact result of the performed calculation.

The natural log of –2 is ln 2 + pi·i. Both the real and the imaginary part of the true log are irrational numbers, i.e. they have infinitely many digits. So any calculator with 10, 12 or even 1000 digits is not able to give the exact result. The best you can get is a 10, 12 or 1000-digit approximation. And this is what the HPs return: instead of ln 2 + pi·i they give 0,693147180560 + 3,14159265359 i. Which is as good as it gets on a 12-digit device.

Now, if this value is exponentiated, of course you do not get exp(ln 2 + pi·i) = –2. Instead you get exp(0,693147180560 + 3,14159265359 i) = –2,000000000000109...–4,13542...E–13 i. Which is exactly what the HPs return here.

Instead of 12-digit numbers the DM42 uses 34 digits. Here the same calculation with ln 2 and pi rounded to 34 significant digits yields –2 – 2,3160566...i. Again, the non-zero imaginary part is not an error but the exact result for exp(0,693147...+3,14159...i) instead of exp(ln 2 + pi·i).

The imagary part of the result should be approx. 2 sin pi. But since pi has only 12 digits the sine is not zero but approx. the difference between the 12-digit value and "true pi". 3,14159265359 – pi ~ –2,0676 E–13, and 2x this is –4,135 E–13. Or +4,769 E–16 for 16 digits or –2,316 E–34 for 34 digit precision.

(12-20-2017 11:36 PM)Logan Wrote:  The part that was throwing me off was having to press CPX (which I only happened to notice, not having looked at any documentation for the calculator yet), beforehand, which almost necessitates knowing I'm going to receive a complex result (in the case of ln(-2) not too bad).

By pressing CPX on the 34s you do not tell the calculator to return a complex result. Instead, you tell it to calculate the function of a complex number in X and Y (instead of a real number in X). Of course the result may be real: Try 1 ENTER 0 CPX x² and get –1 as the correct answer.

So there is no need to know if the result is going to be complex or not. CPX tells the calculator that your input is complex.

Dieter
 « Next Oldest | Next Newest »

 Messages In This Thread How does the DM42 accuracy compare to other calculators ? - Michael de Estrada - 12-20-2017, 07:45 PM RE: How does the DN42 accuracy compare to other calculators ? - rprosperi - 12-20-2017, 08:01 PM RE: How does the DN42 accuracy compare to other calculators ? - Logan - 12-20-2017, 08:18 PM RE: How does the DN42 accuracy compare to other calculators ? - Michael de Estrada - 12-20-2017, 11:11 PM RE: How does the DN42 accuracy compare to other calculators ? - pier4r - 12-20-2017, 09:57 PM RE: How does the DN42 accuracy compare to other calculators ? - Logan - 12-20-2017, 11:36 PM RE: How does the DM42 accuracy compare to other calculators ? - Dieter - 12-21-2017 07:01 PM RE: How does the DM42 accuracy compare to other calculators ? - Claudio L. - 12-22-2017, 04:39 AM RE: How does the DM42 accuracy compare to other calculators ? - Werner - 12-22-2017, 07:58 AM RE: How does the DM42 accuracy compare to other calculators ? - AlexFekken - 12-22-2017, 08:43 AM RE: How does the DM42 accuracy compare to other calculators ? - AlexFekken - 12-22-2017, 08:51 AM RE: How does the DM42 accuracy compare to other calculators ? - Logan - 12-22-2017, 07:00 PM RE: How does the DM42 accuracy compare to other calculators ? - Dieter - 12-22-2017, 07:41 PM RE: How does the DM42 accuracy compare to other calculators ? - Michael de Estrada - 12-21-2017, 07:33 PM RE: How does the DM42 accuracy compare to other calculators ? - Dieter - 12-21-2017, 08:53 PM RE: How does the DM42 accuracy compare to other calculators ? - BarryMead - 12-22-2017, 12:19 AM RE: How does the DM42 accuracy compare to other calculators ? - Paul Dale - 12-22-2017, 12:41 AM RE: How does the DM42 accuracy compare to other calculators ? - Paul Dale - 12-22-2017, 12:43 AM RE: How does the DM42 accuracy compare to other calculators ? - BarryMead - 12-22-2017, 11:11 AM RE: How does the DM42 accuracy compare to other calculators ? - Massimo Gnerucci - 12-22-2017, 11:37 AM RE: How does the DM42 accuracy compare to other calculators ? - grsbanks - 12-22-2017, 11:59 AM RE: How does the DM42 accuracy compare to other calculators ? - Massimo Gnerucci - 12-22-2017, 12:03 PM RE: How does the DM42 accuracy compare to other calculators ? - Gilles59 - 12-22-2017, 12:29 PM RE: How does the DM42 accuracy compare to other calculators ? - Massimo Gnerucci - 12-22-2017, 07:21 AM RE: How does the DM42 accuracy compare to other calculators ? - Paul Dale - 12-22-2017, 05:42 AM RE: How does the DM42 accuracy compare to other calculators ? - sa-penguin - 12-22-2017, 05:50 AM RE: How does the DM42 accuracy compare to other calculators ? - BarryMead - 12-22-2017, 08:10 PM RE: How does the DM42 accuracy compare to other calculators ? - Gilles59 - 12-22-2017, 08:31 PM RE: How does the DM42 accuracy compare to other calculators ? - Gilles59 - 12-22-2017, 08:18 PM

User(s) browsing this thread: 1 Guest(s)