asind
Compute the degree corresponding to the arcsine of the input real number.
Interface Definition
C interface:
float asindf(float x);
double asind(double x);
double asind_18(double x);
long double asindl(long double x);
asind_18 is provided only in the high-precision version.
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
x |
For asindf, x is of single-precision floating-point type. For asind and asind_18, x is of double-precision floating-point type. For asindl, x is of long double-precision floating-point type. |
Floating-point value of the input data. |
Input |
Return Value
The degree y corresponding to the arcsine of the input x is returned, that is, y = asin(x) * 180/π. 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.
Dependency
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