Fortran Wiki
atan

Description

atan(x) computes the arctangent of x.

Standard

FORTRAN 77 and later, alias for atan2 in Fortran 2008 and later

Class

Elemental function

Syntax

result = atan(x)

Arguments

  • x - The type shall be real.

Return value

The return value is of type real and it lies in the range π/2atan(x)π/2- \pi / 2 \leq \atan (x) \leq \pi / 2.

Example

program test_atan
  real(8) :: x = 2.866_8
  x = atan(x)
end program test_atan

See also

atan2, tan

category: intrinsics