计算80位可扩展精度指数函数值。
C interface:
double powr8i4(double x, int y);
参数名 |
类型 |
描述 |
输入/输出 |
---|---|---|---|
x |
x是双精度浮点类型。 |
表示输入数据的浮点值。 |
输入 |
y |
y是整数类型。 |
表示输入数据的整型值。 |
输入 |
C: "km.h"
C interface:
// typical usage double x1 = 1.0, x2 = 2.0, x3 = 3.0, x4 = 4.0; int y1 = 4, y2 = -4, y3 = -3, y4 = 3; // special handing double a = INFINITY, b = -INFINITY, c = NAN, d = 0.0; // print result printf("pow(1.0, 4) = %.15f\n", pow(x1, y1)); printf("pow(2.0, -4) = %.15f\n", pow(x2, y2)); printf("pow(3.0, -3) = %.15f\n", pow(x3, y3)); printf("pow(4.0, 3) = %.15f\n", pow(x4, y4)); printf("pow(INFINITY, 4) = %+.15f\n", pow(a, y1)); printf("pow(INFINITY, -4) = %+.15f\n", pow(a, y2)); printf("pow(-INFINITY, -3) = %+.15f\n", pow(b, y3)); printf("pow(NAN, 3) = %+.15f\n", pow(c, y4)); printf("pow(0.0, -3) = %+.15f\n", pow(d, y3)); printf("pow(-0.0, -3) = %+.15f\n", pow(e, y3)); /* * pow(1.0, 4) = 1.000000000000000 * pow(2.0, -4) = 0.062500000000000 * pow(3.0, -3) = 0.037037037037037 * pow(4.0, 3) = 64.000000000000000 * pow(INFINITY, 4) = inf * pow(INFINITY, -4) = 0.000000000000000 * pow(-INFINITY, -3) = -0.000000000000000 * pow(NAN, 3) = nan * pow(0.0, -3) = inf * pow(-0.0, -3) = -inf * * */