App - 23 App - 23
MELSEC-Q
APPENDIX
Appendix 5 How to Obtain Trigonometric Functions not Available in AD51H-BASIC
A trigonometric function not available in AD51H-BASIC can be derived by combining
existing trigonometric functions.
The table below shows formulas for the derived trigonometric functions.
Derived function
Expression
Arc sine
ARCSIN(X)=ATN(X/SQR(–X X+1))
Arc cosine
ARCCOS(X)=–ATN(X/SQR(–X X+1))+1.5708
Arc secant
ARCSEC(X)=ATN(SQR(X X–1))+(SGN(X)–1) 1.5708
Arc cosecant
ARCCSC(X)=ATN(1/SQR(X X–1))+(SGN(X)–1) 1.5708
Arc cotangent
ARCCOT(X)=–ATN(X)+1.5708
Cosecant
SCS(X)=1/SIN(X)
Cotangent
COT(X)=1/TAN(X)
Secant
SEC(X)=1/COS(X)
Hyperbolic sine
SINH(X)=(EXP(X)–EXP(–X))/2
Hyperbolic cosine
COSH(X)=(EXP(X)+EXP(–X))/2
Hyperbolic tangent
TANH(X)=–EXP(–X)/(EXP(X)+EXP(–X)) 2+1
Hyperbolic secant
SECH(H)=2/(EXP(X)+EXP(–X))
Hyperbolic cosecant
CSCH(H)=2/(EXP(X)-EXP(–X))
Hyperbolic cotangent
COTH(X)=EXP(–X)/(EXP(X)–EXP(–X)) 2+1
Hyperbolic arc sine
ARCSINH(X)=LOG(X+SCR(X X+1))
Hyperbolic arc cosine
ARCCOSH(X)=LOG(X+SQR(X X–1))
Hyperbolic arc tangent
ARCTANH(X)=LOG((1+X)/(1–X))/2
Hyperbolic arc secant
ARCSECH(X)=LOG((SQR(–X X+1)+1)/X)
Hyperbolic arc cosecant
ARCCSCH(X)=LOG((SGN(X) SQR(X X+1)+1)/X)
Hyperbolic arc cotangent
ARCCOTH(X)=LOG((X+1)/)X–1))/2
Note that a certain degree of inaccuracy may occur.