beautypg.com

A.6.6 trigonometric functions, A.6.6.1 derived functions, A.6.6.2 intrinsic functions – Campbell Scientific CR800 and CR850 Measurement and Control Systems User Manual

Page 474

background image

Appendix A. CRBasic Programming Instructions

474 

 

 

A.6.6 Trigonometric Functions

A.6.6.1 Derived Functions

Table Derived Trigonometric Functions

(p. 474)

is a list of trigonometric functions

that can be derived from functions intrinsic to CRBasic.

Table 114. Derived Trigonometric Functions

Function CRBasic

Equivalent

Secant

Sec = 1 / Cos(X)

Cosecant

Cosec = 1 / Sin(X)

Cotangent

Cotan = 1 / Tan(X)

Inverse Secant

Arcsec = Atn(X / Sqr(X * X - 1)) + Sgn(Sgn(X) - 1) * 1.5708

Inverse Cosecant

Arccosec = Atn(X / Sqr(X * X - 1)) + (Sgn(X) - 1) * 1.5708

Inverse Cotangent

Arccotan = Atn(X) + 1.5708

Hyperbolic Secant

HSec = 2 / (Exp(X) + Exp(-X))

Hyperbolic Cosecant

HCosec = 2 / (Exp(X) - Exp(-X))

Hyperbolic Cotangent

HCotan = (Exp(X) + Exp(-X)) / (Exp(X) - Exp(-X))

Inverse Hyperbolic Sine

HArcsin = Log(X + Sqr(X * X + 1))

Inverse Hyperbolic Cosine

HArccos = Log(X + Sqr(X * X - 1))

Inverse Hyperbolic Tangent

HArctan = Log((1 + X) / (1 - X)) / 2

Inverse Hyperbolic Secant

HArcsec = Log((Sqr(-X * X + 1) + 1) / X)

Inverse Hyperbolic Cosecant

HArccosec = Log((Sgn(X) * Sqr(X * X + 1) + 1) / X)

Inverse Hyperbolic Cotangent

HArccotan = Log((X + 1) / (X - 1)) / 2

 

A.6.6.2 Intrinsic Functions

ACOS 
Returns the arccosine of a number. 

Syntax 

x = ACOS(source)

ASIN 
Returns the arcsin of a number. 

Syntax 

x = ASIN(source)

ATN 
Returns the arctangent of a number. 

Syntax 

x = ATN(source)

ATN2 
Returns the arctangent of y / x. 

Syntax 

x = ATN(y , x)