Files
IronCalc/docs/src/functions/math_and_trigonometry/acos.md
2025-09-13 16:53:05 +02:00

2.6 KiB

layout, outline, lang
layout outline lang
doc deep en-US

ACOS function

Overview

ACOS is a function of the Math and Trigonometry category that calculates the inverse cosine (arccosine) of a number in the range [-1 to 1], returning an angle in the range [0 to $\pi$], expressed in radians.

Usage

Syntax

ACOS(number) => acos

Argument descriptions

  • number (number, required). The number whose arccosine is to be calculated, in the range [-1 to 1].

Additional guidance

None.

Returned value

ACOS returns a number in radians in the range [0 to $\pi$] that is the angle whose cosine is the specified number.

Error conditions

  • In common with many other IronCalc functions, ACOS propagates errors that are found in its argument.
  • If no argument, or more than one argument, is supplied, then ACOS returns the #ERROR! error.
  • If the value of the number argument is not (or cannot be converted to) a number, then ACOS returns the #VALUE! error.
  • If the value of the number argument lies outside the range [-1 to 1], then ACOS returns the #NUM! error.
  • For some argument values, ACOS may return a #DIV/0! error.

Details

  • The ACOS function utilizes the acos() method provided by the Rust Standard Library.
  • The figure below illustrates the output of the ACOS function for angles x in the range -1 to +1.
Graph showing acos(x) for x between -1 and +1.

Examples

See some examples in IronCalc.