C Run-Time Library Reference
sin
sine
Synopsis
#include <math.h>
double sin(double x);
float sinf (float x);
fract16 sin_fr16 (fract16 x);
Description
The
function returns the sine of the argument
sin
preted as a radian; the output is in the range [-1, 1].
The
sin_fr16
corresponding to [-π/2, π/2]. The domain represents half a cycle which
can be used to derive a full cycle if required (see Notes below). The result,
in radians, is in the range [-1.0, 1.0).
Error Conditions
The
function does not return an error condition.
sin
Example
#include <math.h>
double y;
y = sin(3.14159);
Notes
The domain of the
[
,
0x8000
0x7fff
It is possible however to derive the full period using the following proper-
ties of the function.
3-116
function inputs a fractional value in the range [-1.0, 1.0)
/* y = 0.0 */
function is restricted to the fractional range
sin_fr16
] which corresponds to half a period from –( π /2) to π/2.
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
. The input is inter-
x
for ADSP-219x DSPs
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?
Questions and answers