SINPI(3) - [MATHEMATICS:TRIGONOMETRIC] Circular sine function
result = sinpi(x)
elemental real(kind=KIND) function sinpi(x)real(kind=KIND) :: x
o X may be any real o KIND may be any kind supported by the associated real type of X. o The returned value will be of the same type and kind as the argument X.
SINPI(3) computes the circular sine of an angle given the size of the angle in half-revolutions.
SINPI(X) is approximately equal to SIN(X*PI).
The sine of an angle in a right-angled triangle is the ratio of the length of the side opposite the given angle divided by the length of the hypotenuse.
o X : The angle in half-revolutions to compute the sine of.
The return value contains the processor-dependent approximation of the sine of X.
Example. SINPI(1.0) has the value 0.0 (approximately).
Sample program:
program demo_sinpi implicit none real :: x integer :: i real,parameter :: PI=acos(-1.0) do i=0,8 x=i*0.25 write(*,*)x=,x, sinpi(x)=,sinpi(x) enddo end program demo_sinpiResults:
> x= 0.00000000 sinpi(x)= 0.00000000 > x= 0.250000000 sinpi(x)= 0.707106769 > x= 0.500000000 sinpi(x)= 1.00000000 > x= 0.750000000 sinpi(x)= 0.707106769 > x= 1.00000000 sinpi(x)= -8.74227766E-08 > x= 1.25000000 sinpi(x)= -0.707106888 > x= 1.50000000 sinpi(x)= -1.00000000 > x= 1.75000000 sinpi(x)= -0.707106531 > x= 2.00000000 sinpi(x)= 1.74845553E-07
fortran 2023
o ACOS(3), ACOSD(3), ACOSPI(3), o ASIN(3), ASIND(3), o ATAN2(3), ATAN2D(3), ATAN2PI(3), o COS(3), COSD(3), COSPI(3), o TAN(3), TAND(3), TANPI(3), o ACOSH(3), o ACOSH(3), o ASINH(3), o ASINH(3), o ATANH(3) o ATANH(3),
Fortran intrinsic descriptions (license: MIT) @urbanjost
o Wikipedia:sine and cosine
Nemo Release 3.1 | sinpi (3fortran) | November 02, 2024 |