Skip to content

ACS

Arc Cosine

This numeric function returns the arc cosine of an angle in radians.

ACS (numeric-value [,ERR=line-ref|,ERC=error-code])
numeric-value
is any valid number from -1.0 through +1.0.
line-ref
is the program line number or label to branch to if an error is produced by this function.
error-code
is a programmer-defined error code. Valid values are positive or negative whole numbers.

This function returns a number from 0 through 3.14 (Pi) for numeric-values ranging from +1.0 through -1.0. If numeric-value exceeds this range an ERR=40 results.

Note that ACS and COS are reverse functions; that is:

ACS (COS(x)) = x
COS (ACS(x)) = x

Since ACS(-1) gives the value of Pi, the following sequence of commands sets up two mathematical constants that are used often:

FLOATING POINT
LET VALUE_OF_PI = ACS(-1)
LET RADIAN_IN_DEGREES = 360 / (2 * VALUE_OF_PI)
ACS (0) returns 1.57, i.e, Pi/2.

ACS (1) returns 0.

These examples are shown using PRECISION 2.

COS function

From the Thoroughbred Basic Language Reference, Volume I: A–E, version 8.9.1. Open this page in the PDF