_facos -- Calculate Arccosine

Format

#include <builtin.h>
double _facos(double x);

Language Level: Extension
_facos calculates the arccosine of x. This function causes the compiler to emit the appropriate 80387 instructions for the calculation of the arccosine.

Because it is a built-in function and has no backing code in the library:

Return Value
_facos returns the arccosine of x.

Example
This example prompts for a value for x. It prints an error message if x is greater than 1 or less than -1. Otherwise, it assigns the arccosine of x to y.

#include <builtin.h>
#include <stdio.h>
#define MAX  1.0
#define MIN -1.0
int main(void)
{
   double x;
   printf("Enter x:\n");
   scanf("%lf", &x);
   /* Output error if not in range */
   if (MAX < x)
           printf("Error: %lf too small for acos.\n", x);
        else
           printf("The arccosine of %lf is %lf.\n", x, _facos(x));
   return 0;
   /**************************************************************
      Assuming you enter: -1.0
      The output should be:
      The arccossine of -1.000000 is 3.141593.
   **************************************************************/
}



acos -- Calculate Arccosine
cos -- Calculate Cosine
cosh -- Calculate Hyperbolic Cosine
_fcos -- Calculate Cosine
_fcossin -- Calculate Cosine and Sine
_fsincos -- Calculate Sine and Cosine
<builtin.h>