tan(pi/24), what is the correct result?
09-05-2016, 04:15 PM (This post was last modified: 09-05-2016 07:10 PM by Dol.)
Post: #1
 Dol Junior Member Posts: 13 Joined: Sep 2016
tan(pi/24), what is the correct result?
tan(pi/24), what is the correct result?

EDIT: ( Correct result should be close to .131652)

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:27 PM
Post: #2
 Vtile Senior Member Posts: 384 Joined: Oct 2015
RE: tan(pi/24), what is the correct result?
09-05-2016, 04:55 PM
Post: #3
 Ángel Martin Senior Member Posts: 1,067 Joined: Dec 2013
RE: tan(pi/24), what is the correct result?
(09-05-2016 04:15 PM)Dol Wrote:  What does:
HP41C

Give as a result?

0.131652498
09-05-2016, 05:34 PM
Post: #4
 smp Senior Member Posts: 412 Joined: Jul 2015
RE: tan(pi/24), what is the correct result?
(09-05-2016 04:15 PM)Dol Wrote:  What does:
HP Prime
Give as a result?

0.131652497588

smp
09-05-2016, 05:56 PM
Post: #5
 Thomas Okken Senior Member Posts: 920 Joined: Feb 2014
RE: tan(pi/24), what is the correct result?
(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, 06:33 PM
Post: #6
 J-F Garnier Senior Member Posts: 338 Joined: Dec 2013
RE: tan(pi/24), what is the correct result?
(09-05-2016 04:15 PM)Dol Wrote:  tan(pi/24), what is the correct result?
RPN: 3 SQRT 2 SQRT - LASTX 1 - *
:-)
09-05-2016, 06:48 PM
Post: #7
 Dol Junior Member Posts: 13 Joined: Sep 2016
RE: tan(pi/24), what is the correct result?

Deg
09-05-2016, 06:58 PM (This post was last modified: 09-05-2016 07:45 PM by DavidM.)
Post: #8
 DavidM Senior Member Posts: 755 Joined: Dec 2013
RE: tan(pi/24), what is the correct result?
(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).

WolframAlpha using "N[Tan[Pi/24], 80]" as input (for reference):
0.131652497587395853471526457409717103592814102223237573553565325789759839010622​03

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.131652497587395853471526457409717103592814102223237573553565325789759839010622​03

DEG mode

WolframAlpha using "N[Tan[Pi/24], 80]" as input (for reference):
0.002284634623313498943082991812335105124350849467368715570132473430115477226898​1872

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.002284634623313498943082991812335105124350849467368715570132473430115477226898​1872
09-05-2016, 07:05 PM (This post was last modified: 09-05-2016 07:19 PM by Dol.)
Post: #9
 Dol Junior Member Posts: 13 Joined: Sep 2016
RE: tan(pi/24), what is the correct result?
(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:46 PM (This post was last modified: 09-05-2016 07:52 PM by Dieter.)
Post: #10
 Dieter Senior Member Posts: 2,397 Joined: Dec 2013
RE: tan(pi/24), what is the correct result?
(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
09-05-2016, 07:52 PM (This post was last modified: 09-05-2016 08:17 PM by Vtile.)
Post: #11
 Vtile Senior Member Posts: 384 Joined: Oct 2015
RE: tan(pi/24), what is the correct result?
*meh*

Foolery number, it is pretty much same which ever way you handle it. Is that correct answer.
09-06-2016, 01:42 AM
Post: #12
 Dwight Sturrock Member Posts: 125 Joined: Dec 2013
RE: tan(pi/24), what is the correct result?
HP15C- deg=0.002284634623 (observing all digits f+PREFIX)

09-06-2016, 03:34 AM
Post: #13
 Dol Junior Member Posts: 13 Joined: Sep 2016
RE: tan(pi/24), what is the correct result?
(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.

Regards
Fredrik
09-06-2016, 03:58 AM
Post: #14
 Nick Member Posts: 64 Joined: Aug 2016
RE: tan(pi/24), what is the correct result?
WP-34S TAN(pi/24) DEG
• Single Precision: 0.002284634623313499
• Double Precision: 0.002284634623313498943082991812335106

• Single Precision: 0.1316524975873958
• Double Precision: 0.1316524975873958534715264574097172

Firmware: 34S 3.3[Print]3844
09-06-2016, 04:06 AM (This post was last modified: 09-06-2016 04:25 AM by Nick.)
Post: #15
 Nick Member Posts: 64 Joined: Aug 2016
RE: tan(pi/24), what is the correct result?
(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.

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]

09-06-2016, 05:01 AM
Post: #16
 Dol Junior Member Posts: 13 Joined: Sep 2016
RE: tan(pi/24), what is the correct result?
(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.

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).

That was it, case closed!!
09-06-2016, 06:29 AM
Post: #17
 Nick Member Posts: 64 Joined: Aug 2016
RE: tan(pi/24), what is the correct result?
(09-06-2016 05:01 AM)Dol Wrote:  That was it, case closed!!

Yay!
09-06-2016, 08:19 AM
Post: #18
 Thomas Okken Senior Member Posts: 920 Joined: Feb 2014
RE: tan(pi/24), what is the correct result?
(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
09-06-2016, 02:01 PM
Post: #19
 klesl Member Posts: 59 Joined: Mar 2016
RE: tan(pi/24), what is the correct result?
HP 10s+
0,131652497
HP 300s+
0,1316524976
HP 35s
1,31652497588e-1
HP 40gs
CAS 0,131652497588
HOME 0,131652497588
09-06-2016, 03:18 PM (This post was last modified: 09-06-2016 03:21 PM by toml_12953.)
Post: #20
 toml_12953 Senior Member Posts: 1,272 Joined: Dec 2013
RE: tan(pi/24), what is the correct result?
(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

Tom L
My wife's judgement is much better than mine.
Look who we each married!
 « Next Oldest | Next Newest »

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