Format
#include <builtin.h> double _fsincos(double x, double *y);
Language Level: Extension
_fsincos calculates the sine of x, and stores the cosine
in *y. This
operation is faster than separately calculating the sine and
cosine. Use _fsincos instead of _fcossin when you will be using
the sine first, and then the cosine.
Because it is a built-in function and has no backing code in the library:
Return Value
This function returns the sine of x.
Example
This example calculates the sine of x and
stores it in z, and stores the cosine of x in y.
#include <builtin.h> #include <stdio.h>
int main(void)
{
double x, y, z;
printf("Enter x:\n");
scanf("%lf", &x);
z = _fsincos(x, &y);
printf("The sine of %lf is %lf.\n", x, z);
printf("The cosine of %lf is %lf.\n", x, y);
return 0;
/***********************************************
Assuming you enter: 1.0
The output should be:
The sine of 1.000000 is 0.841471.
The cosine of 1.000000 is 0.540302.
***********************************************/
}
![]()
acos -- Calculate Arccosine
asin -- Calculate
Arcsine
cos -- Calculate
Cosine
cosh -- Calculate
Hyperbolic Cosine
![]()
_facos --
Calculate Arccosine
![]()
_fasin --
Calculate Arcsine
![]()
_fcos --
Calculate Cosine
![]()
_fcossin
-- Calculate Cosine and Sine
![]()
_fsin --
Calculate Sine
sin -- Calculate
Sine
sinh -- Calculate
Hyperbolic Sine
![]()
<builtin.h>