tand(3f) - [M_units:TRIGONOMETRY] calculate tangent of value in degrees (LICENSE:PD)
Synopsis
Description
Options
Example
Author
License
elemental real function tand(degrees)
class(*),intent(in) :: degrees
Calculate tangent of input value in degrees
degrees any standard scalar value supported by anyscalar_to_double(3f).
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_tandResults:
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+15Results
John S. Urban
Public Domain
Nemo Release 3.1 | tand (3) | February 23, 2025 |