C Programming Tutorial
C Programming allows us to perform mathematical operations through the functions defined in
C Math Functions
In the C Programming Language, the asin function returns the arc sine of x.
Syntax
The syntax for the asin function in the C Language is:
double asin(double x);
Parameters or Arguments
A value between -1 and 1. A domain error will occur if x is not between -1 and 1.
Returns
The asin function returns the arc sine of a number represented by x. It will return a value between -π/2 and π/2.
Required Header
In the C Language, the required header for the asin function is:
#include <math.h>
Applies To
In the C Language, the asin function can be used in the following versions:
- ANSI/ISO 9899-1990
asin Example
/* Example using asin by c programming*/
#include <stdio.h>
#include <math.h>
int main(int argc, const char * argv[])
{
/* Define temporary variables */
double value;
double result;
/* Assign the value we will find the asin of */
value = 0.5;
/* Calculate the Arc Sine of value */
result = asin(value);
/* Display the result of the calculation */
printf("The Arc Sine of %f is %f\n", value, result);
return 0;
}
When compiled and run, this application will output:
The Arc Sine of 0.500000 is 0.523599
