cos(x) computes the cosine of x.

cos(x)

x

FORTRAN 77 and later

Elemental function

result = cos(x)

real

complex

The return value is of the same type and kind as x. The real part of the result is in radians. If x is of the type real, the return value lies in the range -1 \leq \cos (x) \leq 1.

program test_cos real :: x = 0.0 x = cos(x) end program test_cos

acos, sin, tan