HP Forums
hp 17bII+ cosine, tan trig functions - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: hp 17bII+ cosine, tan trig functions (/thread-16432.html)



hp 17bII+ cosine, tan trig functions - Lonewolf - 03-06-2021 08:11 PM

Hello,
I just just keyed in the sine function I found from Gerson W. Barbosa in a 2006 posting:

SIN=L(SX:X*(5.8177641733
1E-3+L(X2ConfusedQ(X))*(-3.281
8376137E-8+G(X2)*(5.5539
1606E-14+G(X2)*(2.0935E-
26*G(X2)-4.47566E-20))))
)*(3-4*SQ(G(SX)))

...and it works just fine... My question is, how do I key in these two simple identities in the solver function as an equation:

cos x = sin(90 - x)
tan x = sinx / cosx

I am not a programmer; any help would be appreciated.
/Silicon Valley Regards


RE: hp 17bII+ cosine, tan trig functions - EdS2 - 03-07-2021 09:21 AM

(That is, from Gerson's Fast and Accurate Trigonometric Functions on the HP-17BII)

(Sorry, can't help with the main question)


RE: hp 17bII+ cosine, tan trig functions - Gerson W. Barbosa - 03-07-2021 12:08 PM

(03-06-2021 08:11 PM)Lonewolf Wrote:  I just just keyed in the sine function I found from Gerson W. Barbosa in a 2006 posting:

SIN=L(SX:X*(5.8177641733
1E-3+L(X2:SQ(X))*(-3.281
8376137E-8+G(X2)*(5.5539
1606E-14+G(X2)*(2.0935E-
26*G(X2)-4.47566E-20))))
)*(3-4*SQ(G(SX)))

...and it works just fine... My question is, how do I key in these two simple identities in the solver function as an equation:

cos x = sin(90 - x)
tan x = sinx / cosx

Unfortunately there is no way to do what you intend because SIN(X) is not a built-in function. If you want to have COS(X), for instance, you should rewrite the above equation replacing every occurrence of the argument X with (90-X):

COS=L(SX:(90-X)*(5.8177641733
1E-3+L(X2:SQ((90-X)))* ...

This should work on the original HP-17B and HP-17BII, but not on the hp17bII+, if I am not mistaken, because of a flawed reimplementation of the solver on the latter.

I have written a very long equation that handles the basic three trigonometry functions and their inverses, plus degrees<>radians conversions, but it won’t work on the hp 17bII+. This thread from 2014 includes an attached file that you might want to try on the Emu42 emulator, though:

A very long HP-17BII equation - Update

Regards,

Gerson.


RE: hp 17bII+ cosine, tan trig functions - Lonewolf - 03-07-2021 08:32 PM

(03-07-2021 09:21 AM)EdS2 Wrote:  (That is, from Gerson's Fast and Accurate Trigonometric Functions on the HP-17BII)

(Sorry, can't help with the main question)

Thank you for the extra information.
/Silicon Valley Regards


RE: hp 17bII+ cosine, tan trig functions - Lonewolf - 03-07-2021 09:01 PM

[attachment=9183]
(03-07-2021 12:08 PM)Gerson W. Barbosa Wrote:  
(03-06-2021 08:11 PM)Lonewolf Wrote:  I just just keyed in the sine function I found from Gerson W. Barbosa in a 2006 posting:

SIN=L(SX:X*(5.8177641733
1E-3+L(X2ConfusedQ(X))*(-3.281
8376137E-8+G(X2)*(5.5539
1606E-14+G(X2)*(2.0935E-
26*G(X2)-4.47566E-20))))
)*(3-4*SQ(G(SX)))

...and it works just fine... My question is, how do I key in these two simple identities in the solver function as an equation:

cos x = sin(90 - x)
tan x = sinx / cosx

Unfortunately there is no way to do what you intend because SIN(X) is not a built-in function. If you want to have COS(X), for instance, you should rewrite the above equation replacing every occurrence of the argument X with (90-X):

COS=L(SX:(90-X)*(5.8177641733
1E-3+L(X2ConfusedQ((90-X)))* ...

This should work on the original HP-17B and HP-17BII, but not on the hp17bII+, if I am not mistaken, because of a flawed reimplementation of the solver on the latter.

I have written a very long equation that handles the basic three trigonometry functions and their inverses, plus degrees<>radians conversions, but it won’t work on the hp 17bII+. This thread from 2014 includes an attached file that you might want to try on the Emu42 emulator, though:

A very long HP-17BII equation - Update

Regards,

Gerson.

Thank you; in the meantime, I am thinking of the possibility of a clamshell configuration idea of my hp 17bII+ and my TI-36X Solar (which I carry for the trig and inverse trig functions)... But I have keyed in the Law of Cosines, angle between vectors, and other geometric equations into my hp 17's equation library...
/Silicon Valley Regards