asind
Compute the arc sine of a real number. The input parameter is an angle.
Interface Definition
C interface:
float asindf(float x);
double asind(double x);
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
x |
For asindf, x is of single-precision floating-point type. |
Floating-point value of an angle |
Input |
x |
For asind, x is of double-precision floating-point type. |
Floating-point value of an angle |
Input |
Return Value
The arc sine y of angle x is returned. y ∈ [-90, +90]
- If the input is +0, the return value is +0.
- If the input is -0, the return value is -0.
- If the input x is ±1, the return value is ±90.
- If the input |x| is greater than 1, the return value is NaN.
- If the input is ±∞, the return value is NaN.
- If the input is NaN, the return value is NaN.
Dependencies
C: "km.h"
Examples
C interface:
// typical usage
float x1 = -1.0, x2 = 1.0, x3 = 0.5, x4 = -0.5;
float a = 0.0, b = INFINITY, c = -INFINITY, d = NAN;
// print result
printf("asindf(1.0) = %.15f\n", asindf(x1));
printf("asindf(-1.0) = %.15f\n", asindf(x2));
printf("asindf(0.5) = %.15f\n", asindf(x3));
printf("asindf(-0.5) = %.15f\n", asindf(x4));
printf("asindf(0.0) = %.15f\n", asindf(a));
printf("asindf(-0.0) = %.15f\n", asindf(-a));
printf("asindf(INFINITY) = %.15f\n", asindf(b));
printf("asindf(-INFINITY) = %.15f\n", asindf(c));
printf("asindf(NAN) = %.15f\n", asindf(d));
/*
* asindf(1.0) = -90.000000000000000
* asindf(-1.0) = 90.000000000000000
* asindf(0.5) = 30.000000000000000
* asindf(-0.5) = -30.000000000000000
* asindf(0.0) = 0.000000000000000
* asindf(-0.0) = -0.000000000000000
* asindf(INFINITY) = nan
* asindf(-INFINITY) = nan
* asindf(NAN) = nan
*
* */
Parent topic: Function Syntax