tan(pi/24), what is the correct result?
EDIT: ( Correct result should be close to .131652)
Google: 0.131652498
Torsten Manz HP15c Emulator on Windows: 0,1316524976
Greg Hewill HP15c Simulator: 0.0022846346233134987
Windows Calculator: 0,00228463462331349894308299181234
EDIT: FREE42 Windows/iOS: 0.0023
What does:
HP41C
HP42
HP48SX
Orig HP15C
HP15LE
HP11C
HP Prime
HP35S
bc
Give as a result? /Check results in posts below/
(09-05-2016 04:15 PM)Dol Wrote: [ -> ]What does:
HP42
bc
Give as a result?
HP-42S: 0.131652497558
bc: 0.13165249758739585345
(09-05-2016 04:15 PM)Dol Wrote: [ -> ]tan(pi/24), what is the correct result?
How do you define "correct" for an approximate number in decimal form using approximate intermediate results of varying precision?
That said, here's a few more results for TAN(pi/24).
RAD mode
WolframAlpha using "N[Tan[Pi/24], 80]" as input (for reference):
0.13165249758739585347152645740971710359281410222323757355356532578975983901062203
HP 48sx Standard Precision:
0.131652497588
HP 48sx Extended Precision (using SysRPL, pi =
3.14159265358979):
0.131652497587394
HP 50g Approximate Mode (Standard Precision):
0.131652497588
HP 50g Extended Precision (using SysRPL):
0.131652497587394
HP 50g Using LongFloat Library set to 80 digits:
0.13165249758739585347152645740971710359281410222323757355356532578975983901062203
(EDIT: added results for degrees)
DEG mode
WolframAlpha using "N[Tan[Pi/24], 80]" as input (for reference):
0.0022846346233134989430829918123351051243508494673687155701324734301154772268981872
HP 48sx Standard Precision:
0.00228463462332
HP 48sx Extended Precision (using SysRPL, pi =
3.14159265358979):
0.00228463462331348
HP 50g Approximate Mode (Standard Precision):
0.00228463462332
HP 50g Extended Precision (using SysRPL):
0.00228463462331348
HP 50g Using LongFloat Library set to 80 digits:
0.0022846346233134989430829918123351051243508494673687155701324734301154772268981872
(09-05-2016 06:33 PM)J-F Garnier Wrote: [ -> ] (09-05-2016 04:15 PM)Dol Wrote: [ -> ]tan(pi/24), what is the correct result?
RPN: 3 SQRT 2 SQRT - LASTX 1 - *
:-)
Thanks!
How come Windows 7 calculator gets its so wrong?
Also I tried free42 on iOS and it also gets 0.0023 (wrong).
Ill update the initial post with the new values.
EDIT: It seems everyone gets the same values when in RAD mode, free42, Win Calculator, etc however in DEG mode maybe some emulators do RAD implicitly? I am confused!
(09-05-2016 07:05 PM)Dol Wrote: [ -> ]How come Windows 7 calculator gets its so wrong?
Also I tried free42 on iOS and it also gets 0.0023 (wrong).
Ill update the initial post with the new values.
There is nothing wrong here.
The tangent of pi/24 degrees is 0,00228463462331349894308299181233...
The tangent of pi/24 radians is 0,131652497587395853471526457409...
The calculators you used were once set to degrees and once to radians. That's it.
And if you set Free42 to ALL display mode instead of FIX 4 you will see the full-precision result instead of just 0,0023. Or simply press the SHOW key.
So just set the correct angular mode and you'll get a correct result.
With all of the mentioned calculators. There's nothing wrong with them at all.
Within working precision, that is. A 10-digit calculator will not evaluate the tangent of pi/24, but of {3,141592654/24 rounded to 10 digits}, i.e. it will calculate tan(0,1308996939) = 0,00284634623 (degrees) resp. 0,1316524976 (radians).
Dieter
*meh*
Foolery number, it is pretty much same which ever way you handle it. Is that correct answer.
HP15C- deg=0.002284634623 (observing all digits f+PREFIX)
Rad=0.1316524976 observing all digits f+PREFIX)
(09-05-2016 07:46 PM)Dieter Wrote: [ -> ] (09-05-2016 07:05 PM)Dol Wrote: [ -> ]How come Windows 7 calculator gets its so wrong?
Also I tried free42 on iOS and it also gets 0.0023 (wrong).
Ill update the initial post with the new values.
There is nothing wrong here.
The tangent of pi/24 degrees is 0,00228463462331349894308299181233...
The tangent of pi/24 radians is 0,131652497587395853471526457409...
So just set the correct angular mode and you'll get a correct result.
With all of the mentioned calculators. There's nothing wrong with them at all.
Dieter
OK, I understand about the precision, no issues.
As of now, the problem remains that Torsten Manz HP15c calculator gives the RAD result even in DEG mode. Can someone else confirm this behavior so we can send a bug report to Torsten?
That is why I got confused and started trying different calculators in DEG mode.
Google displays the result in RAD (without explicit mentioning about RAD/DEG)
Regards
Fredrik
(09-06-2016 03:34 AM)Dol Wrote: [ -> ]As of now, the problem remains that Torsten Manz HP15c calculator gives the RAD result even in DEG mode. Can someone else confirm this behavior so we can send a bug report to Torsten?
That is why I got confused and started trying different calculators in DEG mode.
Google displays the result in RAD (without explicit mentioning about RAD/DEG)
The following behavior may apply:
From the HP-15C Owner's Handbook (2011) p.121
Quote:Note: In Complex mode (signified by the C annunciator), the HP-15C performs all trigonometric functions using radians. The trigonometric mode annunciator in the display (RAD, GRAD, or blank for Degrees) applies to two functions only: [->R] and [->P] (as explained later in this section).
Quote:To deactivate Complex mode, clear flag 8 (keystroke sequence: [g] [CF] 8). The C annunciator will disappear.
HP-15C Owner's Handbook (2011) [hp.com]
HP-15C Advanced Functions Handbook (1982) [hp.com]
Edit: Added HP-15C Manuals Links
(09-06-2016 04:06 AM)Nick Wrote: [ -> ] (09-06-2016 03:34 AM)Dol Wrote: [ -> ]As of now, the problem remains that Torsten Manz HP15c calculator gives the RAD result even in DEG mode. Can someone else confirm this behavior so we can send a bug report to Torsten?
That is why I got confused and started trying different calculators in DEG mode.
Google displays the result in RAD (without explicit mentioning about RAD/DEG)
The following behavior may apply:
From the HP-15C Owner's Handbook (2011) p.121
Quote:Note: In Complex mode (signified by the C annunciator), the HP-15C performs all trigonometric functions using radians. The trigonometric mode annunciator in the display (RAD, GRAD, or blank for Degrees) applies to two functions only: [->R] and [->P] (as explained later in this section).
Edit: Added HP-15C Manuals Links
That was it, case closed!!
(09-05-2016 04:15 PM)Dol Wrote: [ -> ]tan(pi/24), what is the correct result?
EDIT: ( Correct result should be close to .131652)
The correct result
is close to 0.131652. When you say tan(x), x is an angle in radians, unless you specifically say otherwise, like saying tan(x°).
I admit I didn't read your original post carefully enough. I thought you were looking to compare the numerical accuracy of various calculators; I didn't realize you were unaware of the degrees vs. radians thing. :-D
HP 10s+
0,131652497
HP 300s+
0,1316524976
HP 35s
1,31652497588e-1
HP 40gs
CAS 0,131652497588
HOME 0,131652497588
(09-05-2016 04:15 PM)Dol Wrote: [ -> ]tan(pi/24), what is the correct result?
EDIT: ( Correct result should be close to .131652)
Windows Calculator: 0,00228463462331349894308299181234
When in Radian mode, Windows calculator (Windows 10 version) gives
0.13165249758739585347152645740972
You were in Degree mode when you did your calculation.
Tom L