Post Reply 
(35S) complex asin, acos, atan + hyperbolic
05-05-2017, 07:31 PM (This post was last modified: 06-15-2017 01:15 PM by Gene.)
Post: #1
(35S) complex asin, acos, atan + hyperbolic
Curiously, the complex sin, cos and tan are available on the HP35s, but not the inverse arc functions.

So, you can find below 3 programs to compute them. They use the labels H, I, J as these letters are placed on the corresponding SIN, COS, TAN keys.

The corresponding formulas are:

asin(z) = -i.ln(i.z+sqrt(1-z²))
acos(z) = -i.ln(z+sqrt(z²-1))
atan(z) = i/2.ln((1-i.z)/(1+i.z))

Usage:
asin(x): XEQ H
acos(x): XEQ I
atan(x): XEQ J

The variables of the calculator are preserved.
The stack is preserved too.
LASTx is set with the right previous value before running the programs. (I use the following tip: ABS followed by CLx)


Code for asin(x)

Code:

H001 LBL H
H002 ABS
H003 CLx
H004 -LN(LASTx*i+(1-LASTx*LASTx)^0.5i0)*i    CK=33E0 LN=36
H005 RTN

CK=B392 LN=51


Code for acos(x)

Code:

H001 LBL I
H002 ABS
H003 CLx
H004 -LN(LASTx+(LASTx*LASTx-1)^0.5i0)*i    CK=8277 LN=34
H005 RTN

CK=6DAE LN=49


Code for atan(x)

Code:

H001 LBL J
H002 ABS
H003 CLx
H004 LN((1-LASTx*i)/(1+LASTx*i))*i0.5    CK=D6E7 LN=32
H005 RTN

CK=91AE LN=47

To check the code:
asin(-2) = -1.5708 i 1.3170
acos(-2) = 3.1416 i 1.3170
atan(-2 i 3) = -1.4099 i 0.2291


For hyperbolic functions:

I don't provide code because I don't use them, but you can calculate them easily, either from the exp/logarithmic expressions, or from:

sinh(z) = -i.sin(i.z)
cosh(z) = cos(i.z)
tanh(z) = -i.tan(i.z)

asinh(z) = i.asin(-i.z)
acosh(z) = i.acos(z)
atanh(z) = i.atan(-i.z)

(I haven't checked the latter expressions myself)
Find all posts by this user
Quote this message in a reply
Post Reply 




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