Manual Reference Pages  - atand (3fortran)

NAME

ATAND(3) - [MATHEMATICS:TRIGONOMETRIC] Arc tangent AKA inverse tangent function in degrees

SYNOPSIS

result = atand(x) | atand(y, x)

         elemental real(kind=KIND) function atand(y,x)

real(kind=KIND),intent(in) :: x real(kind=**),intent(in),optional :: y

CHARACTERISTICS

o If Y is present X and Y must both be of the same kind.
o KIND can be any kind supported by the associated type.
o The returned value is real of the same kind as X.

DESCRIPTION

ATAND(3) calculates the Arc Tangent function in degrees.

OPTIONS

o X : The real value to compute the arctangent of.
o Y : is real of the same kind as X. If X is zero, Y must not be zero.

RESULT

The returned value is a real type of the same kind as X that approximates the arc tangent of X expressed in degrees. If Y is present, the result is identical to ATAN2D(Y,X). The result lies in the range -90 <= ATAND(X) <= 90 .

EXAMPLES

atand(1.0) has the value 45.0 (approximately).

Sample program:

    program demo_atand
    use, intrinsic :: iso_fortran_env, only : real32, real64, real128
    implicit none
    character(len=*),parameter :: all=’(*(g0,1x))’
    real(kind=real64),parameter :: &
     Deg_Per_Rad = 57.2957795130823208767981548_real64
    real(kind=real64) :: x
        x=2.866_real64
        print all, atand(x)

print all, atand( 2.0d0, 2.0d0),atand( 2.0d0, 2.0d0)/Deg_Per_Rad print all, atand( 2.0d0,-2.0d0),atand( 2.0d0,-2.0d0)/Deg_Per_Rad print all, atand(-2.0d0, 2.0d0),atand(-2.0d0, 2.0d0)/Deg_Per_Rad print all, atand(-2.0d0,-2.0d0),atand(-2.0d0,-2.0d0)/Deg_Per_Rad

end program demo_atand

Results:

     > 70.765182904405478
     > 45.000000000000000 0.78539816339744828
     > 135.00000000000000 2.3561944901923448
     > -45.000000000000000 -0.78539816339744828
     > -135.00000000000000 -2.3561944901923448

STANDARD

Fortran 2023

SEE ALSO

ATAN2D(3), TAND(3), ATAN2(3), TAN(3), ATAN2PI(3), TANPI(3)

RESOURCES

o wikipedia: inverse trigonometric functions
Fortran intrinsic descriptions (license: MIT) @urbanjost


Nemo Release 3.1 atand (3fortran) November 02, 2024
Generated by manServer 1.08 from 17385147-6554-4369-ad0f-0c0d79cef1a9 using man macros.