8.28 ATAN2PI — Circular arc tangent function

Description:

ATAN2PI(Y, X) computes {\rm {atan2}}(y, x) / \pi, and provides a measure of an angle in half-revolutions within the proper quadrant.

Standard:

Fortran 2023

Class:

Elemental function

Syntax:

RESULT = ATAN2PI(Y, X)

Arguments:
YThe type shall be REAL.
XThe type and kind type parameter shall be the same as Y. If Y is zero, then X shall be nonzero.
Return value:

The return value has the same type and kind type parameter as Y and satisfies -1 \leq {\rm {atan2}}(y, x) / \pi \leq 1.

Example:
program test_atan2pi
  real(kind=4) :: x = 1.e0_4, y = 0.5e0_4
  x = atan2pi(y, x)
end program test_atan2pi
See also:

ACOSPI — Circular arc cosine function
ASINPI — Circular arc sine function
ATANPI — Circular arc tangent function