ACOS(X)

Purpose

Arccosine (inverse cosine) function.

Class

Elemental function

Argument type and attributes

X
An INTENT(IN) REAL Fortran 2008 beginsor COMPLEX.Fortran 2008 ends If it’s a REAL, its value must satisfy the inequality |X| ≤ 1.

Result type and attributes

Same as X.

Result value

If X is of type real, the result value is as follows:

Fortran 2008 begins
If X is of type complex, the real part of the result value is as follows:
  • It is expressed in radians.
  • It is in the range 0 ≤ REAL(ACOS(X)) ≤ PI.
Fortran 2008 ends

Examples

ACOS(1.0) has the value 0.0.

Fortran 2008 beginsACOS((0.540302, 0.000000)) has the value (1.000000, 0.000000), approximately.Fortran 2008 ends

Specific Name Argument Type Result Type Pass As Arg?
ACOS default real default real yes
DACOS double precision real double precision real yes
QACOS  1  REAL(16) REAL(16) yes
QARCOS  1  REAL(16) REAL(16) yes
Note:
  1. IBM extension.