Manual Reference Pages  - tanpi (3fortran)

NAME

TANPI(3) - [MATHEMATICS:TRIGONOMETRIC] Circular tangent function

SYNOPSIS

result = tanpi(x)

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

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

CHARACTERISTICS

o the TYPE of X is real any supported kind
o The returned value will be of the same type and kind as the argument X.

DESCRIPTION

TANPI(3) computes the Circular Tangent of X in half-revolutions.

The result has a value equal to a processor-dependent approximation to the tangent of X, which is regarded as a value in half-revolutions; thus, TANPI (X) is approximately equal to tan(X*PI).

OPTIONS

o X : The angle in half-revolutions to compute the tangent of.

RESULT

The return value is the tangent of the value X.

EXAMPLES

Example: TAND(1.0) has the value 0.0 (approximately).

Sample program:

    program demo_tanpi
    use, intrinsic :: iso_fortran_env, only : real64
    implicit none
    integer :: i
    real(kind=real64) :: x
       do i=0,8
          x=0.250000000d0*i
          write(*,101)x, tanpi(x), tanpi(x)*180.0d0
       enddo
    101 format(g0,t23,g0,t50,g0)
    end program demo_tanpi

Results:

     > .000000000000000    0.000000000000000          0.000000000000000
     > .2500000000000000   0.9999999999999999       180.0000000000000
     > .5000000000000000   0.1633123935319537E+17     0.2939623083575166E+19
     > .7500000000000000  -1.000000000000000       -180.0000000000000
     > 1.000000000000000  -0.1224646799147353E-15    -0.2204364238465236E-13
     > 1.250000000000000   0.9999999999999997       179.9999999999999
     > 1.500000000000000  5443746451065123.           0.9798743611917221E+18
     > 1.750000000000000  -1.000000000000000       -180.0000000000001
     > 2.000000000000000  -0.2449293598294706E-15    -0.4408728476930472E-13

STANDARD

Fortran 2023

SEE ALSO

ATAND(3), ATAND(3), ATAN2PI(3), ATAN2D(3)

Fortran intrinsic descriptions (license: MIT) @urbanjost


Nemo Release 3.1 tanpi (3fortran) November 02, 2024
Generated by manServer 1.08 from 73b25e7d-0ef2-4895-9b9e-191e33c73b25 using man macros.