Manual Reference Pages  - acosd (3fortran)

NAME

ACOSD(3) - [MATHEMATICS:TRIGONOMETRIC] Arccosine (inverse cosine) function in degrees

SYNOPSIS

result = acosd(x)

         elemental real(kind=KIND) function acosd(x)

real(kind=KIND),intent(in) :: x

CHARACTERISTICS

o KIND may be any kind supported by the real type.
o The returned value will be of the same type and kind as the argument.

DESCRIPTION

ACOSD(3) computes the arccosine of X in degrees (inverse of COSD(X)). For example, ACOSD(-1.0) has the value 180.0 (approximately).

OPTIONS

o X : The value to compute the arctangent of. If the type is real, the value must satisfy |X| <= 1.

RESULT

The return value is of the same type and kind as X. The result has a value equal to a processor-dependent approximation to the arc cosine of X. It is expressed in degrees and lies in the range

0 <= ACOSD (X) <= 180

EXAMPLES

Sample program:

    program demo_acosd
    use, intrinsic :: iso_fortran_env, only : real32,real64,real128
    implicit none
    character(len=*),parameter :: all=’(*(g0,1x))’
    real(kind=real64) :: x , d2r

! basics print *,’acosd(-1.0) -->’,acosd( -1.0 ) print *,’acosd( 0.0) -->’,acosd( -1.0 ) print *,’acosd( 1.0) -->’,acosd( 0.0 ) x = 0.866_real64 print all,’acosd(’,x,’) is ’, acosd(x) ! any real kind write(*,*) acosd(-1.0_real64) ! elemental print all,’elemental’,acosd([-1.0,-0.5,0.0,0.50,1.0]) ! end program demo_acosd

Results:

     >  acosd(-1.0) -->   180.000000
     >  acosd( 0.0) -->   180.000000
     >  acosd( 1.0) -->   90.0000000
     > acosd( 0.86599999999999999 ) is  30.002910931188026
     >    180.00000000000000
     > elemental 180.000000 120.000000 90.0000000 60.0000000 0.00000000

STANDARD

FORTRAN 2023

SEE ALSO

Inverse function: COSD(3)

RESOURCES

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


Nemo Release 3.1 acosd (3fortran) November 02, 2024
Generated by manServer 1.08 from 21f96413-be9d-45c8-a2d9-03f753c18372 using man macros.