Manual Reference Pages  - sinpi (3fortran)

NAME

SINPI(3) - [MATHEMATICS:TRIGONOMETRIC] Circular sine function

SYNOPSIS

result = sinpi(x)

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

real(kind=KIND) :: x

CHARACTERISTICS

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.

DESCRIPTION

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.

OPTIONS

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

RESULT

The return value contains the processor-dependent approximation of the sine of X.

EXAMPLES

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_sinpi

Results:

     > 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

STANDARD

fortran 2023

SEE ALSO

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),

RESOURCES

o Wikipedia:sine and cosine
Fortran intrinsic descriptions (license: MIT) @urbanjost


Nemo Release 3.1 sinpi (3fortran) November 02, 2024
Generated by manServer 1.08 from 9e72a3dd-a8f7-4fd2-a739-2e63e54696f6 using man macros.