计算输入实数的反正弦值对应的角度。
C interface:
float asindf(float x);
double asind(double x);
double asind_18(double x);
long double asindl(long double x);
asind_18仅在高精度版本提供。
参数名 |
类型 |
描述 |
输入/输出 |
---|---|---|---|
x |
在asindf中,x是单精度浮点类型。 在asind和asind_18中,x是双精度浮点类型。 在asindl中,x是长双精度浮点类型。 |
表示输入数据的浮点值。 |
输入 |
返回输入x的反正弦函数值对应的角度y=asin(x) * 180 / π,y ∈ [-90, +90]。
C: "km.h"
C interface:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | // 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 * * */ |