How does the DM42 accuracy compare to other calculators ? - Printable Version +- HP Forums ( https://www.hpmuseum.org/forum)+-- Forum: Not HP Calculators ( /forum-7.html)+--- Forum: Not quite HP Calculators - but related ( /forum-8.html)+--- Thread: How does the DM42 accuracy compare to other calculators ? ( /thread-9744.html)Pages: 1 2 |

How does the DM42 accuracy compare to other calculators ? - Michael de Estrada - 12-20-2017 07:45 PM
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: DM42 > -2.000 -i2.316E-34 HP 42s > -2.00 -i4.14E-13 HP 50g > -2.000 -i4.135E-13 HP Prime > -2.000 -i4.135E-13 So, the HP calculators all have the same error in the imaginary part which should be zero, but the DM42 error is 260% lower. It would be interesting to see how these calculators compare with other operations, data types and functions. RE: How does the DN42 accuracy compare to other calculators ? - rprosperi - 12-20-2017 08:01 PM
(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... I'd guess that the only other one that likely is close is the WP-34S. RE: How does the DN42 accuracy compare to other calculators ? - Logan - 12-20-2017 08:18 PM
If I'm reading it right (I'm not the most adept with how the 34S deals with complex numbers), the result of the operation is -2 + i4.769e-16 RE: How does the DN42 accuracy compare to other calculators ? - pier4r - 12-20-2017 09:57 PM
(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. One should consider that the DM42 uses 34 digits while the HP calcs 15 (or 12?). Sure this December is the month of accuracy discussions! For example. - This very post - http://www.hpmuseum.org/forum/thread-9703.html - http://www.hpmuseum.org/forum/thread-9610.html - other posts that appear here and there in other threads. Someone should also write, though, that if the accuracy seems not that great, it depends on what one measures and how. If I am going to use planck units to measure something and my best measurement tool has the scale in millimeters, then my concerns should not be about the accuracy of the calculator, rather somewhere else. RE: How does the DN42 accuracy compare to other calculators ? - Michael de Estrada - 12-20-2017 11:11 PM
(12-20-2017 08:18 PM)Logan Wrote: If I'm reading it right (I'm not the most adept with how the 34S deals with complex numbers), the result of the operation is Yes, that is correct. The WP34S uses the X register for the real part and the Y register for the imaginary part. To perform functions in complex mode the function key is preceded by the CPX key. It’s very simple and intuitive IMO. The thing about the WP34S is that you can switch to double precision mode to increase the accuracy of calculations. Using h MODE DBLON and performing -2 ln e^x yields the result -2.000 -i2.316E-34, which is the same result as the DM42. RE: How does the DN42 accuracy compare to other calculators ? - Logan - 12-20-2017 11:36 PM
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). I'm used to the behavior on say, the 42s, which I can set to display the result as complex, regardless of whether I intend the result to be complex or not. For the 34s, it has to do with needing two lines to display rectangular and polar I'm sure. It didn't take terribly long to figure out. If I'd spent more time with my 15c I'm sure it would have seemed natural RE: How does the DM42 accuracy compare to other calculators ? - Dieter - 12-21-2017 07:01 PM
(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 RE: How does the DM42 accuracy compare to other calculators ? - Michael de Estrada - 12-21-2017 07:33 PM
Thanks, Dieter. You have rightly pointed out that I have used the word “accuracy”, whereas I truly should have used “precision” instead. RE: How does the DM42 accuracy compare to other calculators ? - Dieter - 12-21-2017 08:53 PM
(12-21-2017 07:33 PM)Michael de Estrada Wrote: Thanks, Dieter. You have rightly pointed out that I have used the word “accuracy”, whereas I truly should have used “precision” instead. I just wanted to point out that the non-zero imaginary part is the exact and desired result which a correctly working calculator is supposed to return. It's essentially the same story as with calculating (√2)². If the result on a 10- or 12-digit calculator is exactly 2 there's something going on behind your back. ;-) Dieter RE: How does the DM42 accuracy compare to other calculators ? - BarryMead - 12-22-2017 12:19 AM
Does anyone who owns a DM42 & WP-34s know of any calculation that shows better precision on the DM42 than the WP-34s in double precision mode? My guess is that they are about the same. I welcome any input or examples that show otherwise. If true this sort of debunks the Swiss Micros claim that the DM42 is "The most precise calculator in the world - second to none!" RE: How does the DM42 accuracy compare to other calculators ? - Paul Dale - 12-22-2017 12:41 AM
(12-22-2017 12:19 AM)BarryMead Wrote: Does anyone who owns a DM42 & WP-34s know of any calculation that shows better precision on the DM42 than the WP-34s in double precision mode? I know of some cases where Intel's maths library (i.e the DM42) rounds incorrectly but the 34S doesn't. I'm not aware of any cases where the converse is true. Pauli RE: How does the DM42 accuracy compare to other calculators ? - Paul Dale - 12-22-2017 12:43 AM
newRPL is capable of arbitrary precision which is better than either. Pauli RE: How does the DM42 accuracy compare to other calculators ? - Claudio L. - 12-22-2017 04:39 AM
(12-21-2017 07:01 PM)Dieter Wrote: If it actually is zero something has gone wrong. ;-) I'm going to take the bait and play advocate of the devil here. If the argument is "exactly" 3.14159265359 is one thing, but if that number came from other calculations with roundoff error, the number is not exact, it is approximated. We don't really know what the rest of the digits were going to be if we had more precision, so that number represents a range from [3.141592653585 to 3.141592653595[ which is the set of numbers that after rounding would've resulted in 3.14159265359. Now that means sin(3.14159265359) could be any result in the range [4.7932384626...E-12 to -5.2067615373...E-12[ Since asin(x) on all those numbers would produce the correct result of 3.14159265359. By "snapping" the argument to 3.14159265359(00000000....) we are fixing the result of the function sin() to -2.0676153735E-13, but that doesn't make it the "exact" result, any number in the range above is just as exact, including the zero! The choice of grid to "snap" our discreet results into can be changed arbitrarily. For example, newRPL uses degrees internally to "snap" angles to a grid, so sin(x) will convert that number to degrees 3.14159265359*(180/pi) = 180.000000000011846563 (bold numbers are the 12-digit precision limit). Since the original angle maps to 180 degrees with 12 digits, we can "snap" the result to 180 degrees and apply the function, obtaining zero for sin(180). All this operation did is change the "snap" grid to something that actually includes the relevant points in the circle. Is returning zero any better than the other result you called "exact"? Not really, it's just another value within that range of values that are acceptable results, but sure looks a lot cleaner on the screen. RE: How does the DM42 accuracy compare to other calculators ? - Paul Dale - 12-22-2017 05:42 AM
Playing the devil's devil advocate.... Why doesn't your example round to even? That is the usual way to avoid bias. 3.141592653585 would then round to 3.14159265358. Pauli RE: How does the DM42 accuracy compare to other calculators ? - sa-penguin - 12-22-2017 05:50 AM
Claudio, you make an interesting point. When a calculation goes to N digits, the result is typically truncated to M digits where (M < N) and the final digits determine whether to round UP or DOWN the M'th digit. This gives an error range. When a value is passed to a second function, it would be interesting to [optionally] see that error range used to produce a range of outputs, OR for the final range to be specified: X_min = -5.2067615373...E-12 X_max = 4.7932384626...E-12 OR : X = 0 +/- 5.2 E-12 RE: How does the DM42 accuracy compare to other calculators ? - Massimo Gnerucci - 12-22-2017 07:21 AM
(12-22-2017 12:19 AM)BarryMead Wrote: Does anyone who owns a DM42 & WP-34s know of any calculation that shows better precision on the DM42 than the WP-34s in double precision mode? Well, if they are on par, none of them is second to another. ;) RE: How does the DM42 accuracy compare to other calculators ? - Werner - 12-22-2017 07:58 AM
(12-22-2017 04:39 AM)Claudio L. Wrote: Now that means sin(3.14159265359) could be any result in the range I do not agree. We cannot know where the input came from and have to take it one step at a time. SIN(3.14159265359) = SIN(PI-x) = SIN(x) ~= x for small x, and that is the only correct result, x = -2.06761537357e-13, incidentally correct to 12 digits, a feat as yet unmatched in TI calculators (correct me if I'm wrong) It is not because ASIN(x) produces 3.14159265359 for a myriad numbers that they would all be the correct result for SIN(3.14159265359)? Would you like your 12-digit calculator to return 1e-250 for SQRT(0)? Cheers, Werner RE: How does the DM42 accuracy compare to other calculators ? - AlexFekken - 12-22-2017 08:43 AM
(12-22-2017 07:58 AM)Werner Wrote: We cannot know where the input came from and have to take it one step at a time. And for that reason I agree with Claudio: every number should be interpreted as the interval of values that would round to that value. @Claudio: I have got my HP 50g now. Waiting for newRPL with interval arithmetic :-) RE: How does the DM42 accuracy compare to other calculators ? - AlexFekken - 12-22-2017 08:51 AM
(12-22-2017 07:58 AM)Werner Wrote: Would you like your 12-digit calculator to return 1e-250 for SQRT(0)? No. Underflows should generate an error and so unless you are supporting signed zeroes 0 represents just that: zero. Or would you really want your calculator to return 0 for 1/[something huge]? RE: How does the DM42 accuracy compare to other calculators ? - BarryMead - 12-22-2017 11:11 AM
(12-22-2017 12:43 AM)Paul Dale Wrote: newRPL is capable of arbitrary precision which is better than either. Pauli: Since newRPL equipped calculators are better than either the DM42 or WP-34s, then that really does DEBUNK the Swiss Micro's claim of second to none! I wasn't aware that newRPL had arbitrary precision! That is amazing for a portable calculator. I thought this capability only existed on desktop computers. I will have to give newRPL a try on my HP-50G. Thanks for the tip. |