11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ACOS<br />

Syntax<br />

ACOS(expr)<br />

Description<br />

The <strong>UniBasic</strong> ACOS function returns the trigonometric arc cosine (inverse cosine)<br />

of a numeric expression in degrees. expr must be a value between -1 and +1. ACOS<br />

returns a value expressed as the degree of the arc cosine of the input, which ranges<br />

from 0 to 180. If expr evaluates to a value outside the range of -1 to +1, UniData<br />

displays an error message and returns 0 as the result.<br />

With null value handling on, the result of any mathematical operation, function, or<br />

comparison involving the null value is the null value. Therefore, ACOS returns the<br />

null value when expr is the null value.<br />

Examples<br />

In the following example, the program statement assigns 60, the arc cosine of 0.5, to<br />

ARCCOS:<br />

ARCCOS = ACOS(0.5)<br />

In the next example, the program statement prints out the arc cosine of -0.5, which is<br />

120:<br />

PRINT ACOS(-0.5)<br />

Related <strong>Commands</strong><br />

ASIN, ATAN, COS, SIN, TAN<br />

ACOS 1-77

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

Saved successfully!

Ooh no, something went wrong!