04.01.2015 Views

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix A. CRBasic Programming Instructions<br />

A.6.6 Trigonometric Functions<br />

A.6.6.1 Derived Functions<br />

Table Derived Trigonometric Functions (p. 496) is a list of trigonometric functions<br />

that can be derived from functions intrinsic to CRBasic.<br />

Table 118. Derived Trigonometric Functions<br />

Function<br />

CRBasic Equivalent<br />

Secant<br />

Sec = 1 / Cos(X)<br />

Cosecant<br />

Cosec = 1 / Sin(X)<br />

Cotangent<br />

Cotan = 1 / Tan(X)<br />

Inverse Secant Arcsec = Atn(X / Sqr(X * X - 1)) + Sgn(Sgn(X) - 1) * 1.5708<br />

Inverse Cosecant Arccosec = Atn(X / Sqr(X * X - 1)) + (Sgn(X) - 1) * 1.5708<br />

Inverse Cotangent Arccotan = Atn(X) + 1.5708<br />

Hyperbolic Secant<br />

HSec = 2 / (Exp(X) + Exp(-X))<br />

Hyperbolic Cosecant<br />

HCosec = 2 / (Exp(X) - Exp(-X))<br />

Hyperbolic Cotangent<br />

HCotan = (Exp(X) + Exp(-X)) / (Exp(X) - Exp(-X))<br />

Inverse Hyperbolic Sine HArcsin = Log(X + Sqr(X * X + 1))<br />

Inverse Hyperbolic Cosine HArccos = Log(X + Sqr(X * X - 1))<br />

Inverse Hyperbolic Tangent HArctan = Log((1 + X) / (1 - X)) / 2<br />

Inverse Hyperbolic Secant HArcsec = Log((Sqr(-X * X + 1) + 1) / X)<br />

Inverse Hyperbolic Cosecant HArccosec = Log((Sgn(X) * Sqr(X * X + 1) + 1) / X)<br />

Inverse Hyperbolic Cotangent HArccotan = Log((X + 1) / (X - 1)) / 2<br />

A.6.6.2 Intrinsic Functions<br />

ACOS<br />

Returns the arccosine of a number.<br />

Syntax<br />

x = ACOS(source)<br />

ASIN<br />

Returns the arcsin of a number.<br />

Syntax<br />

x = ASIN(source)<br />

ATN<br />

Returns the arctangent of a number.<br />

Syntax<br />

x = ATN(source)<br />

ATN2<br />

Returns the arctangent of y / x.<br />

Syntax<br />

x = ATN(y , x)<br />

496

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!