HP 40gs, error in calculator?
|
11-01-2017, 07:31 PM
Post: #1
|
|||
|
|||
HP 40gs, error in calculator?
Hi, finally back with HP again after 15 yrs with TI and Casio. Got My HP 40gs today which I bought on Ebay. Been testning it out, and when punching in 1/9 and then multiplying answer with 9 again it displays 0.99999999.
I thought this was a common flaw on cheaper calculators. All my other machines (some 20+ of them) will return to "1". Any suggestions? Have I bought a fake HP? Tnx |
|||
11-01-2017, 09:45 PM
(This post was last modified: 11-01-2017 09:47 PM by brickviking.)
Post: #2
|
|||
|
|||
RE: HP 40gs, error in calculator?
(11-01-2017 07:31 PM)Skipjack Wrote: Hi, finally back with HP again after 15 yrs with TI and Casio. Got My HP 40gs today which I bought on Ebay. Been testning it out, and when punching in 1/9 and then multiplying answer with 9 again it displays 0.99999999. In short, no. But your other 20 calculators are merely satisfying the user when they return 1, as 1÷9 is 0.111.., multiplying 0.111..×9 will end up with 0.999.. (repeating) Anyhow, others with much better handle on how calculators handle precision can add to this answer better than I just did. Do enjoy your 40gs, people like it because of its CAS and other graphing functions, it's a bit of a step down from the 50g. (Post 126) Regards, BrickViking HP-50g |Casio fx-9750G+ |Casio fx-9750GII (SH4a) |
|||
11-01-2017, 09:46 PM
(This post was last modified: 11-01-2017 09:51 PM by Dieter.)
Post: #3
|
|||
|
|||
RE: HP 40gs, error in calculator?
(11-01-2017 07:31 PM)Skipjack Wrote: Hi, finally back with HP again after 15 yrs with TI and Casio. Got My HP 40gs today which I bought on Ebay. Been testning it out, and when punching in 1/9 and then multiplying answer with 9 again it displays 0.99999999. If other calculators return "1" they are either wrong or they are doing things behind your back. The 12-digit value for 1/9 is 0,11111 11111 11. This is what your HP returns. 9 x 0,11111 11111 11 is 0,99999 99999 99. That's what your HP returns as well. Imagine you manually enter 0,11111 11111 11. Now multiply this with 9. What result would you expect? So your calculator is perfectly OK. If it would return 9 x 0,11111 11111 11 = 1 it would be simply wrong. Some calculators use hidden digits. For instance, they use 12 digits but they only display 10. In this case the displayed rounded 10-digit value of the above calculation is 1,0000 00000. And that's what you see then. Subtract 1 from this and you should get –1E–12. If you don't your calculator applies some "result cosmetics". That's not what a decent calculator should do. So your 40gs is perfectly OK. It calculates 1/9 correctly, and it calculates 9 x 0,11111 11111 11 correctly. Remember: 0,111... is not 1/9. It's just the first 12 digits of this. Just as any displayed result is just the first digits of the true result. The same is true for (√2)², e^(ln 3) etc. etc. Also sin(pi) will not return zero in radians mode. Simply because the calculator does not evaluate sin(pi) but sin(3,14159265359)=–2,067...E–13. Dieter |
|||
11-01-2017, 11:16 PM
Post: #4
|
|||
|
|||
RE: HP 40gs, error in calculator?
(11-01-2017 09:46 PM)Dieter Wrote: Also sin(pi) will not return zero in radians mode. Simply because the calculator does not evaluate sin(pi) but sin(3,14159265359)=–2,067...E–13. Unless you have a DM42. Then sin(pi) is -1.158028306006...E-34 Tom L Cui bono? |
|||
11-03-2017, 05:40 PM
Post: #5
|
|||
|
|||
RE: HP 40gs, error in calculator? | |||
11-03-2017, 08:04 PM
Post: #6
|
|||
|
|||
RE: HP 40gs, error in calculator?
(11-03-2017 05:40 PM)Jake Schwartz Wrote:(11-01-2017 11:16 PM)toml_12953 Wrote: Unless you have a DM42. Then sin(pi) is -1.158028306006...E-34 While SHOW on the DM42 returns: -1.158028306006248941790250554076922E-34 Who's right? Or, better, closer to truth? Greetings, Massimo -+×÷ ↔ left is right and right is wrong |
|||
11-03-2017, 09:37 PM
(This post was last modified: 11-03-2017 09:38 PM by pier4r.)
Post: #7
|
|||
|
|||
RE: HP 40gs, error in calculator?
interesting the difference
sin(pi) -1.158028306006248917735787454453501 E-34 WP-34S in "double mode" -1.158028306006248941790250554076922 E-34 DM_42 with SHOW I would have expected way more equal digits. Maybe Thomas, Paul, Marcus, Walter, Dieter or Gerson (and I forget many) could explain why this difference. Wikis are great, Contribute :) |
|||
11-04-2017, 01:41 AM
(This post was last modified: 11-04-2017 01:46 AM by toml_12953.)
Post: #8
|
|||
|
|||
RE: HP 40gs, error in calculator?
(11-03-2017 09:37 PM)pier4r Wrote: interesting the difference It looks like one of them is using double precision mode to give 16-17 digits of precision. The DM-42 uses Intel's Decimal Floating-Point Math Library which conforms to the IEEE 754-2008 Decimal Floating-Point Arithmetic specification and uses quadruple-precision floating-point format (34.02 decimal digits.) What does the WP-34S use? Tom L Cui bono? |
|||
11-04-2017, 05:02 AM
Post: #9
|
|||
|
|||
RE: HP 40gs, error in calculator?
(11-03-2017 08:04 PM)Massimo Gnerucci Wrote:(11-03-2017 05:40 PM)Jake Schwartz Wrote: ..and the WP-34S in "double mode" returns -1.158028306006248917735787454453501 E-34. newRPL solving the mystery... -1.158028306006248941790250554076922E-34 is the correct answer for 34 digits precision. To obtain this answer: 34 SETPREC π0 0 + SIN the 0 + is intentional, to round π0 to 34 digits, since it's provided with twice the current precision by default. The actual answer for 34 SETPREC π0 SIN is: 9.862803482534211.E-80 which is only 17 digits, and the last one is not correctly rounded (should be a 2). It actually looks like an incorrect answer, but let's look deeper: Due to internal precision multiples of 8, when 34 digits are selected it needs to work with 40 internally, then π0 provides twice that = 80 digits (hence the 10^-80 answer, those 16 first digits are the correct answer for pi with 80 digits precision). But in reality, for the selected 34 digit precision, the digits that really matter are the ones from 10^-34 to 10^-68, which are correctly given as zero. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)