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