sin(), sinf()

sine function 

Function


SYNOPSIS

#include <math.h>

double sin(double x)

float sinf(float x)


DESCRIPTION

The sin() function computes the sine of x (measured in radians). A large magnitude argument may yield a result with little or no significance.

To check for errors, set errno to 0 before calling sin(). If errno is non-zero on return, or the return value is NaN, an error has occurred.

The sinf() function is a single-precision version of sin().


PARAMETERS

x 

Is the number whose sine is to be computed.


RETURN VALUES

On success, sin() returns the sine of x.

If x is NaN or ±Inf, NaN is returned.

If it underflows, 0.0 is returned.


CONFORMANCE

sin(): ANSI/ISO 9899-1990

sinf(): PTC MKS Toolkit UNIX APIs extension


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

At high levels of compiler optimizations, the hardware handles the sin() function intrinsically. In such cases, mathematical exceptions do not cause the matherr() function to be called or the errno value to be set.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
acos(), asin(), atan(), atan2(), cos(), cosh(), math(), sinh(), tan(), tanh()


PTC MKS Toolkit 10.5 Documentation Build 40.