Skip to main content

This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

# ACOS

Returns the arc-cosine of an angle.

## Synopsis

```ACOS(number)
```

### Arguments

 number An expression that resolves to a number in the range -1 to 1 (inclusive). Values outside of this range generate an error.

## Description

The ACOS function returns the trigonometric arc-cosine of number. An arc-cosine is the inverse of a cosine.

By default, Caché MVBasic trig functions return results in degrees. To return results in radians, set \$OPTIONS RADIANS.

To convert degrees to radians, multiply degrees by pi/180. To convert radians to degrees, multiply radians by 180/pi.

## Examples

The following example uses the ACOS function to return the arc-cosine of an angle:

```PRINT ACOS(-0.5):" in degrees"
PRINT ACOS(-0.5)*(3.1415/180)):" in radians"```

Feedback