C Library Functions - tand (3)
NAME
tand(3f) - [M_units:TRIGONOMETRY] calculate tangent of value in degrees
(LICENSE:PD)
CONTENTS
Synopsis
Description
Options
Example
Author
License
SYNOPSIS
elemental real function tand(degrees)
class(*),intent(in) :: degrees
DESCRIPTION
Calculate tangent of input value in degrees
OPTIONS
|
degrees |
| |
any standard scalar value supported by anyscalar_to_double(3f).
|
|
EXAMPLE
Sample program
program demo_tand
use M_units, only : tand
implicit none
write(*,*)With REAL array input , &
& tand([ 0.0, 15.0, 30.0, 45.0, 60.0, 75.0, 90.0, 180.0, 270.0 ])
write(*,*)With INTEGER array input , &
& tand([0,15,30,45,60,75,90,180,270])
write(*,*)With DOUBLEPRECISION , &
& tand(0.0d0),tand(15.0d0),tand(90.0/3.0d0),tand(90.0/2.0d0),&
& tand(60.0d0),tand(75.0d0),&
& tand(90.0d0),tand(180.0d0),tand(270.0d0)
end program demo_tand
Results:
With REAL array input 0.00000000 0.267949194 0.577350259
1.00000000 1.73205078 3.73205090 1.63312395E+16
-1.22464685E-16 5.44374649E+15
With INTEGER array input 0.00000000 0.267949194 0.577350259
1.00000000 1.73205078 3.73205090 1.63312395E+16
-1.22464685E-16 5.44374649E+15
With DOUBLEPRECISION 0.00000000 0.267949194 0.577350259
1.00000000 1.73205078 3.73205090 1.63312395E+16
-1.22464685E-16 5.44374649E+15
Results
AUTHOR
John S. Urban
LICENSE
Public Domain
| Nemo Release 3.1 | tand (3) | June 29, 2025 |
Generated by manServer 1.08 from 652860e2-a4f9-4bf4-9c1a-94af0ddc34cd using man macros.