LF Fortran 95

ACOS Function

Description

The ACOS function returns the trigonometric arccosine of a real number, in radians.

Syntax

ACOS (x)

Arguments

x is an INTENT(IN) scalar or array of type REAL and must be within the range -1 ≤ i ≤ 1 . If the argument is outside this range, an error message is printed and program execution is terminated.

Result

A REAL representation, expressed in radians, of the arccosine of x.

Example

real :: x=.5 write(*,*) acos(x) ! writes 1.0471975