ieee754: add test for riscv

issue #4312
This commit is contained in:
Sebastian Sumpf 2021-12-01 10:04:36 +01:00 committed by Norman Feske
parent ee5d300f72
commit 0fc2db50f0

View File

@ -7,11 +7,6 @@ if {[have_board rpi]} {
exit 0
}
if {[get_cmd_switch --autopilot] && [have_board riscv_qemu]} {
puts "Autopilot mode is not supported on this platform."
exit 0
}
build "core init test/ieee754"
create_boot_directory
@ -71,7 +66,7 @@ append qemu_args "-nographic "
match_max -d 100000
set exit_line "exited with exit value"
run_genode_until $exit_line 30
run_genode_until $exit_line 40
set serial_id [output_spawn_id]
while {true} {
global output
@ -2853,12 +2848,707 @@ pow(-2, 2) = 4
pow(-2, -2) = 0.25
}
set reference_output_riscv {
FLT_RADIX = 2
FLT_MANT_DIG = 24
DBL_MANT_DIG = 53
LDBL_MANT_DIG = 113
FLT_MIN_EXP = -125
DBL_MIN_EXP = -1021
LDBL_MIN_EXP = -16381
FLT_MAX_EXP = 128
DBL_MAX_EXP = 1024
LDBL_MAX_EXP = 16384
FLT_EPSILON = 1.19209e-07 = 0x1p-23
DBL_EPSILON = 2.22045e-16 = 0x1p-52
LDBL_EPSILON = 1.92593e-34 = 0x1p-112
FLT_MIN = 1.17549e-38 = 0x1p-126
DBL_MIN = 2.22507e-308 = 0x1p-1022
LDBL_MIN = 3.3621e-4932 = 0x1p-16382
FLT_MAX = 3.40282e+38 = 0x1.fffffep+127
DBL_MAX = 1.79769e+308 = 0x1.fffffffffffffp+1023
LDBL_MAX = 1.18973e+4932 = 0x1.ffffffffffffffffffffffffffffp+16383
sizeof(float) = 4
sizeof(double) = 8
sizeof(long double) = 16
x + y, with x = 9007199254740994.0 and y = 1.0 - 1/65536.0 (type double).
The IEEE-754 result is 9007199254740994 with double precision.
The IEEE-754 result is 9007199254740996 with extended precision.
The obtained result is 9007199254740994.
NAN != NAN --> 1 (should be 1)
isnan(NAN) --> 1 (should be 1)
NAN >= 0.0 --> 0 (should be 0)
NAN <= 0.0 --> 0 (should be 0)
#3||#4 --> 0 (should be 0)
!(#3||#4) --> 1 (should be 1)
#3 + #4 --> 0 (should be 0)
!(#3 + #4) --> 1 (should be 1)
The FE_INVALID flag is not set for NAN >= 0.
The FE_INVALID flag is not set for NAN <= 0.
The FE_INVALID flag is not set for NAN > 0.
The FE_INVALID flag is not set for NAN < 0.
x * y + z with FP_CONTRACT OFF is not fused.
Rounding to nearest
(double) 0 = 0
Signed zero tests (x is 0.0 and y is -0.0):
Test 1.0 / x != 1.0 / y returns 1 (should be 1).
Test 1.0 / x == 1.0 / +x returns 1 (should be 1).
Test 1.0 / x != 1.0 / +y returns 1 (should be 1).
Test 1.0 / x != 1.0 / -x returns 1 (should be 1).
Test 1.0 / x == 1.0 / -y returns 1 (should be 1).
0 + 0 = 0
0 - 0 = 0
0 + -0 = 0
0 - -0 = 0
-0 + 0 = 0
-0 - 0 = -0
-0 + -0 = -0
-0 - -0 = 0
1 + 1 = 2
1 - 1 = 0
1 + -1 = 0
1 - -1 = 2
0 * 0 = 0
0 * -0 = -0
-0 * 0 = -0
-0 * -0 = 0
Constant expression 1 + DBL_MIN = 1
Variable expression 1 + DBL_MIN = 1
Constant expression 1 - DBL_MIN = 1
Variable expression 1 - DBL_MIN = 1
1/3 in float : 0x1.555556p-2
1/3 in double : 0x1.5555555555555p-2
1/3 in long double : 0x1.5555555555555555555555555555p-2
Dec 1.1 = 0x1.199999999999ap+0
FLT_MAX = 0x1.fffffep+127
DBL_MAX = 0x1.fffffffffffffp+1023
LDBL_MAX = 0x1.ffffffffffffffffffffffffffffp+16383
FLT_EPSILON = 0x1p-23
DBL_EPSILON = 0x1p-52
LDBL_EPSILON = 0x1p-112
pow(nan, nan) = nan
pow(nan, inf) = nan
pow(nan, -inf) = nan
pow(nan, 0) = 1
pow(nan, -0) = 1
pow(nan, 0.5) = nan
pow(nan, -0.5) = nan
pow(nan, 1) = nan
pow(nan, -1) = nan
pow(nan, 2) = nan
pow(nan, -2) = nan
pow(inf, nan) = nan
pow(inf, inf) = inf
pow(inf, -inf) = 0
pow(inf, 0) = 1
pow(inf, -0) = 1
pow(inf, 0.5) = inf
pow(inf, -0.5) = 0
pow(inf, 1) = inf
pow(inf, -1) = 0
pow(inf, 2) = inf
pow(inf, -2) = 0
pow(-inf, nan) = nan
pow(-inf, inf) = inf
pow(-inf, -inf) = 0
pow(-inf, 0) = 1
pow(-inf, -0) = 1
pow(-inf, 0.5) = inf
pow(-inf, -0.5) = 0
pow(-inf, 1) = -inf
pow(-inf, -1) = -0
pow(-inf, 2) = inf
pow(-inf, -2) = 0
pow(0, nan) = nan
pow(0, inf) = 0
pow(0, -inf) = inf
pow(0, 0) = 1
pow(0, -0) = 1
pow(0, 0.5) = 0
pow(0, -0.5) = inf
pow(0, 1) = 0
pow(0, -1) = inf
pow(0, 2) = 0
pow(0, -2) = inf
pow(-0, nan) = nan
pow(-0, inf) = 0
pow(-0, -inf) = inf
pow(-0, 0) = 1
pow(-0, -0) = 1
pow(-0, 0.5) = 0
pow(-0, -0.5) = inf
pow(-0, 1) = -0
pow(-0, -1) = -inf
pow(-0, 2) = 0
pow(-0, -2) = inf
pow(0.5, nan) = nan
pow(0.5, inf) = 0
pow(0.5, -inf) = inf
pow(0.5, 0) = 1
pow(0.5, -0) = 1
pow(0.5, 0.5) = 0.707107
pow(0.5, -0.5) = 1.41421
pow(0.5, 1) = 0.5
pow(0.5, -1) = 2
pow(0.5, 2) = 0.25
pow(0.5, -2) = 4
pow(-0.5, nan) = nan
pow(-0.5, inf) = 0
pow(-0.5, -inf) = inf
pow(-0.5, 0) = 1
pow(-0.5, -0) = 1
pow(-0.5, 0.5) = nan
pow(-0.5, -0.5) = nan
pow(-0.5, 1) = -0.5
pow(-0.5, -1) = -2
pow(-0.5, 2) = 0.25
pow(-0.5, -2) = 4
pow(1, nan) = 1
pow(1, inf) = 1
pow(1, -inf) = 1
pow(1, 0) = 1
pow(1, -0) = 1
pow(1, 0.5) = 1
pow(1, -0.5) = 1
pow(1, 1) = 1
pow(1, -1) = 1
pow(1, 2) = 1
pow(1, -2) = 1
pow(-1, nan) = nan
pow(-1, inf) = 1
pow(-1, -inf) = 1
pow(-1, 0) = 1
pow(-1, -0) = 1
pow(-1, 0.5) = nan
pow(-1, -0.5) = nan
pow(-1, 1) = -1
pow(-1, -1) = -1
pow(-1, 2) = 1
pow(-1, -2) = 1
pow(2, nan) = nan
pow(2, inf) = inf
pow(2, -inf) = 0
pow(2, 0) = 1
pow(2, -0) = 1
pow(2, 0.5) = 1.41421
pow(2, -0.5) = 0.707107
pow(2, 1) = 2
pow(2, -1) = 0.5
pow(2, 2) = 4
pow(2, -2) = 0.25
pow(-2, nan) = nan
pow(-2, inf) = inf
pow(-2, -inf) = 0
pow(-2, 0) = 1
pow(-2, -0) = 1
pow(-2, 0.5) = nan
pow(-2, -0.5) = nan
pow(-2, 1) = -2
pow(-2, -1) = -0.5
pow(-2, 2) = 4
pow(-2, -2) = 0.25
Rounding toward 0
(double) 0 = 0
Signed zero tests (x is 0.0 and y is -0.0):
Test 1.0 / x != 1.0 / y returns 1 (should be 1).
Test 1.0 / x == 1.0 / +x returns 1 (should be 1).
Test 1.0 / x != 1.0 / +y returns 1 (should be 1).
Test 1.0 / x != 1.0 / -x returns 1 (should be 1).
Test 1.0 / x == 1.0 / -y returns 1 (should be 1).
0 + 0 = 0
0 - 0 = 0
0 + -0 = 0
0 - -0 = 0
-0 + 0 = 0
-0 - 0 = -0
-0 + -0 = -0
-0 - -0 = 0
1 + 1 = 2
1 - 1 = 0
1 + -1 = 0
1 - -1 = 2
0 * 0 = 0
0 * -0 = -0
-0 * 0 = -0
-0 * -0 = 0
Constant expression 1 + DBL_MIN = 1
Variable expression 1 + DBL_MIN = 1
Constant expression 1 - DBL_MIN = 1
Variable expression 1 - DBL_MIN = 1
1/3 in float : 0x1.555556p-2
1/3 in double : 0x1.5555555555555p-2
1/3 in long double : 0x1.5555555555555555555555555555p-2
Dec 1.1 = 0x1.199999999999ap+0
FLT_MAX = 0x1.fffffep+127
DBL_MAX = 0x1.fffffffffffffp+1023
LDBL_MAX = 0x1.ffffffffffffffffffffffffffffp+16383
FLT_EPSILON = 0x1p-23
DBL_EPSILON = 0x1p-52
LDBL_EPSILON = 0x1p-112
pow(nan, nan) = nan
pow(nan, inf) = nan
pow(nan, -inf) = nan
pow(nan, 0) = 1
pow(nan, -0) = 1
pow(nan, 0.5) = nan
pow(nan, -0.5) = nan
pow(nan, 1) = nan
pow(nan, -1) = nan
pow(nan, 2) = nan
pow(nan, -2) = nan
pow(inf, nan) = nan
pow(inf, inf) = inf
pow(inf, -inf) = 0
pow(inf, 0) = 1
pow(inf, -0) = 1
pow(inf, 0.5) = inf
pow(inf, -0.5) = 0
pow(inf, 1) = inf
pow(inf, -1) = 0
pow(inf, 2) = inf
pow(inf, -2) = 0
pow(-inf, nan) = nan
pow(-inf, inf) = inf
pow(-inf, -inf) = 0
pow(-inf, 0) = 1
pow(-inf, -0) = 1
pow(-inf, 0.5) = inf
pow(-inf, -0.5) = 0
pow(-inf, 1) = -inf
pow(-inf, -1) = -0
pow(-inf, 2) = inf
pow(-inf, -2) = 0
pow(0, nan) = nan
pow(0, inf) = 0
pow(0, -inf) = inf
pow(0, 0) = 1
pow(0, -0) = 1
pow(0, 0.5) = 0
pow(0, -0.5) = inf
pow(0, 1) = 0
pow(0, -1) = inf
pow(0, 2) = 0
pow(0, -2) = inf
pow(-0, nan) = nan
pow(-0, inf) = 0
pow(-0, -inf) = inf
pow(-0, 0) = 1
pow(-0, -0) = 1
pow(-0, 0.5) = 0
pow(-0, -0.5) = inf
pow(-0, 1) = -0
pow(-0, -1) = -inf
pow(-0, 2) = 0
pow(-0, -2) = inf
pow(0.5, nan) = nan
pow(0.5, inf) = 0
pow(0.5, -inf) = inf
pow(0.5, 0) = 1
pow(0.5, -0) = 1
pow(0.5, 0.5) = 0.707106
pow(0.5, -0.5) = 1.41421
pow(0.5, 1) = 0.5
pow(0.5, -1) = 2
pow(0.5, 2) = 0.25
pow(0.5, -2) = 4
pow(-0.5, nan) = nan
pow(-0.5, inf) = 0
pow(-0.5, -inf) = inf
pow(-0.5, 0) = 1
pow(-0.5, -0) = 1
pow(-0.5, 0.5) = nan
pow(-0.5, -0.5) = nan
pow(-0.5, 1) = -0.5
pow(-0.5, -1) = -2
pow(-0.5, 2) = 0.25
pow(-0.5, -2) = 4
pow(1, nan) = 1
pow(1, inf) = 1
pow(1, -inf) = 1
pow(1, 0) = 1
pow(1, -0) = 1
pow(1, 0.5) = 1
pow(1, -0.5) = 1
pow(1, 1) = 1
pow(1, -1) = 1
pow(1, 2) = 1
pow(1, -2) = 1
pow(-1, nan) = nan
pow(-1, inf) = 1
pow(-1, -inf) = 1
pow(-1, 0) = 1
pow(-1, -0) = 1
pow(-1, 0.5) = nan
pow(-1, -0.5) = nan
pow(-1, 1) = -1
pow(-1, -1) = -1
pow(-1, 2) = 1
pow(-1, -2) = 1
pow(2, nan) = nan
pow(2, inf) = inf
pow(2, -inf) = 0
pow(2, 0) = 1
pow(2, -0) = 1
pow(2, 0.5) = 1.41421
pow(2, -0.5) = 0.707106
pow(2, 1) = 2
pow(2, -1) = 0.5
pow(2, 2) = 4
pow(2, -2) = 0.25
pow(-2, nan) = nan
pow(-2, inf) = inf
pow(-2, -inf) = 0
pow(-2, 0) = 1
pow(-2, -0) = 1
pow(-2, 0.5) = nan
pow(-2, -0.5) = nan
pow(-2, 1) = -2
pow(-2, -1) = -0.5
pow(-2, 2) = 4
pow(-2, -2) = 0.25
Rounding to -oo
(double) 0 = 0
Signed zero tests (x is 0.0 and y is -0.0):
Test 1.0 / x != 1.0 / y returns 1 (should be 1).
Test 1.0 / x == 1.0 / +x returns 1 (should be 1).
Test 1.0 / x != 1.0 / +y returns 1 (should be 1).
Test 1.0 / x != 1.0 / -x returns 1 (should be 1).
Test 1.0 / x == 1.0 / -y returns 1 (should be 1).
0 + 0 = 0
0 - 0 = 0
0 + -0 = 0
0 - -0 = 0
-0 + 0 = 0
-0 - 0 = -0
-0 + -0 = -0
-0 - -0 = 0
1 + 1 = 2
1 - 1 = 0
1 + -1 = 0
1 - -1 = 2
0 * 0 = 0
0 * -0 = -0
-0 * 0 = -0
-0 * -0 = 0
Constant expression 1 + DBL_MIN = 1
Variable expression 1 + DBL_MIN = 1
Constant expression 1 - DBL_MIN = 1
Variable expression 1 - DBL_MIN = 1
1/3 in float : 0x1.555556p-2
1/3 in double : 0x1.5555555555555p-2
1/3 in long double : 0x1.5555555555555555555555555555p-2
Dec 1.1 = 0x1.199999999999ap+0
FLT_MAX = 0x1.fffffep+127
DBL_MAX = 0x1.fffffffffffffp+1023
LDBL_MAX = 0x1.ffffffffffffffffffffffffffffp+16383
FLT_EPSILON = 0x1p-23
DBL_EPSILON = 0x1p-52
LDBL_EPSILON = 0x1p-112
pow(nan, nan) = nan
pow(nan, inf) = nan
pow(nan, -inf) = nan
pow(nan, 0) = 1
pow(nan, -0) = 1
pow(nan, 0.5) = nan
pow(nan, -0.5) = nan
pow(nan, 1) = nan
pow(nan, -1) = nan
pow(nan, 2) = nan
pow(nan, -2) = nan
pow(inf, nan) = nan
pow(inf, inf) = inf
pow(inf, -inf) = 0
pow(inf, 0) = 1
pow(inf, -0) = 1
pow(inf, 0.5) = inf
pow(inf, -0.5) = 0
pow(inf, 1) = inf
pow(inf, -1) = 0
pow(inf, 2) = inf
pow(inf, -2) = 0
pow(-inf, nan) = nan
pow(-inf, inf) = inf
pow(-inf, -inf) = 0
pow(-inf, 0) = 1
pow(-inf, -0) = 1
pow(-inf, 0.5) = inf
pow(-inf, -0.5) = 0
pow(-inf, 1) = -inf
pow(-inf, -1) = -0
pow(-inf, 2) = inf
pow(-inf, -2) = 0
pow(0, nan) = nan
pow(0, inf) = 0
pow(0, -inf) = inf
pow(0, 0) = 1
pow(0, -0) = 1
pow(0, 0.5) = 0
pow(0, -0.5) = inf
pow(0, 1) = 0
pow(0, -1) = inf
pow(0, 2) = 0
pow(0, -2) = inf
pow(-0, nan) = nan
pow(-0, inf) = 0
pow(-0, -inf) = inf
pow(-0, 0) = 1
pow(-0, -0) = 1
pow(-0, 0.5) = 0
pow(-0, -0.5) = inf
pow(-0, 1) = -0
pow(-0, -1) = -inf
pow(-0, 2) = 0
pow(-0, -2) = inf
pow(0.5, nan) = nan
pow(0.5, inf) = 0
pow(0.5, -inf) = inf
pow(0.5, 0) = 1
pow(0.5, -0) = 1
pow(0.5, 0.5) = 0.707106
pow(0.5, -0.5) = 1.41421
pow(0.5, 1) = 0.5
pow(0.5, -1) = 2
pow(0.5, 2) = 0.25
pow(0.5, -2) = 4
pow(-0.5, nan) = nan
pow(-0.5, inf) = 0
pow(-0.5, -inf) = inf
pow(-0.5, 0) = 1
pow(-0.5, -0) = 1
pow(-0.5, 0.5) = nan
pow(-0.5, -0.5) = nan
pow(-0.5, 1) = -0.5
pow(-0.5, -1) = -2
pow(-0.5, 2) = 0.25
pow(-0.5, -2) = 4
pow(1, nan) = 1
pow(1, inf) = 1
pow(1, -inf) = 1
pow(1, 0) = 1
pow(1, -0) = 1
pow(1, 0.5) = 1
pow(1, -0.5) = 1
pow(1, 1) = 1
pow(1, -1) = 1
pow(1, 2) = 1
pow(1, -2) = 1
pow(-1, nan) = nan
pow(-1, inf) = 1
pow(-1, -inf) = 1
pow(-1, 0) = 1
pow(-1, -0) = 1
pow(-1, 0.5) = nan
pow(-1, -0.5) = nan
pow(-1, 1) = -1
pow(-1, -1) = -1
pow(-1, 2) = 1
pow(-1, -2) = 1
pow(2, nan) = nan
pow(2, inf) = inf
pow(2, -inf) = 0
pow(2, 0) = 1
pow(2, -0) = 1
pow(2, 0.5) = 1.41421
pow(2, -0.5) = 0.707106
pow(2, 1) = 2
pow(2, -1) = 0.5
pow(2, 2) = 4
pow(2, -2) = 0.25
pow(-2, nan) = nan
pow(-2, inf) = inf
pow(-2, -inf) = 0
pow(-2, 0) = 1
pow(-2, -0) = 1
pow(-2, 0.5) = nan
pow(-2, -0.5) = nan
pow(-2, 1) = -2
pow(-2, -1) = -0.5
pow(-2, 2) = 4
pow(-2, -2) = 0.25
Rounding to +oo
(double) 0 = 0
Signed zero tests (x is 0.0 and y is -0.0):
Test 1.0 / x != 1.0 / y returns 1 (should be 1).
Test 1.0 / x == 1.0 / +x returns 1 (should be 1).
Test 1.0 / x != 1.0 / +y returns 1 (should be 1).
Test 1.0 / x != 1.0 / -x returns 1 (should be 1).
Test 1.0 / x == 1.0 / -y returns 1 (should be 1).
0 + 0 = 0
0 - 0 = 0
0 + -0 = 0
0 - -0 = 0
-0 + 0 = 0
-0 - 0 = -0
-0 + -0 = -0
-0 - -0 = 0
1 + 1 = 2
1 - 1 = 0
1 + -1 = 0
1 - -1 = 2
0 * 0 = 0
0 * -0 = -0
-0 * 0 = -0
-0 * -0 = 0
Constant expression 1 + DBL_MIN = 1
Variable expression 1 + DBL_MIN = 1
Constant expression 1 - DBL_MIN = 1
Variable expression 1 - DBL_MIN = 1
1/3 in float : 0x1.555556p-2
1/3 in double : 0x1.5555555555555p-2
1/3 in long double : 0x1.5555555555555555555555555555p-2
Dec 1.1 = 0x1.199999999999ap+0
FLT_MAX = 0x1.fffffep+127
DBL_MAX = 0x1.fffffffffffffp+1023
LDBL_MAX = 0x1.ffffffffffffffffffffffffffffp+16383
FLT_EPSILON = 0x1p-23
DBL_EPSILON = 0x1p-52
LDBL_EPSILON = 0x1p-112
pow(nan, nan) = nan
pow(nan, inf) = nan
pow(nan, -inf) = nan
pow(nan, 0) = 1
pow(nan, -0) = 1
pow(nan, 0.5) = nan
pow(nan, -0.5) = nan
pow(nan, 1) = nan
pow(nan, -1) = nan
pow(nan, 2) = nan
pow(nan, -2) = nan
pow(inf, nan) = nan
pow(inf, inf) = inf
pow(inf, -inf) = 0
pow(inf, 0) = 1
pow(inf, -0) = 1
pow(inf, 0.5) = inf
pow(inf, -0.5) = 0
pow(inf, 1) = inf
pow(inf, -1) = 0
pow(inf, 2) = inf
pow(inf, -2) = 0
pow(-inf, nan) = nan
pow(-inf, inf) = inf
pow(-inf, -inf) = 0
pow(-inf, 0) = 1
pow(-inf, -0) = 1
pow(-inf, 0.5) = inf
pow(-inf, -0.5) = 0
pow(-inf, 1) = -inf
pow(-inf, -1) = -0
pow(-inf, 2) = inf
pow(-inf, -2) = 0
pow(0, nan) = nan
pow(0, inf) = 0
pow(0, -inf) = inf
pow(0, 0) = 1
pow(0, -0) = 1
pow(0, 0.5) = 0
pow(0, -0.5) = inf
pow(0, 1) = 0
pow(0, -1) = inf
pow(0, 2) = 0
pow(0, -2) = inf
pow(-0, nan) = nan
pow(-0, inf) = 0
pow(-0, -inf) = inf
pow(-0, 0) = 1
pow(-0, -0) = 1
pow(-0, 0.5) = 0
pow(-0, -0.5) = inf
pow(-0, 1) = -0
pow(-0, -1) = -inf
pow(-0, 2) = 0
pow(-0, -2) = inf
pow(0.5, nan) = nan
pow(0.5, inf) = 0
pow(0.5, -inf) = inf
pow(0.5, 0) = 1
pow(0.5, -0) = 1
pow(0.5, 0.5) = 0.707107
pow(0.5, -0.5) = 1.41422
pow(0.5, 1) = 0.5
pow(0.5, -1) = 2
pow(0.5, 2) = 0.25
pow(0.5, -2) = 4
pow(-0.5, nan) = nan
pow(-0.5, inf) = 0
pow(-0.5, -inf) = inf
pow(-0.5, 0) = 1
pow(-0.5, -0) = 1
pow(-0.5, 0.5) = nan
pow(-0.5, -0.5) = nan
pow(-0.5, 1) = -0.5
pow(-0.5, -1) = -2
pow(-0.5, 2) = 0.25
pow(-0.5, -2) = 4
pow(1, nan) = 1
pow(1, inf) = 1
pow(1, -inf) = 1
pow(1, 0) = 1
pow(1, -0) = 1
pow(1, 0.5) = 1
pow(1, -0.5) = 1
pow(1, 1) = 1
pow(1, -1) = 1
pow(1, 2) = 1
pow(1, -2) = 1
pow(-1, nan) = nan
pow(-1, inf) = 1
pow(-1, -inf) = 1
pow(-1, 0) = 1
pow(-1, -0) = 1
pow(-1, 0.5) = nan
pow(-1, -0.5) = nan
pow(-1, 1) = -1
pow(-1, -1) = -1
pow(-1, 2) = 1
pow(-1, -2) = 1
pow(2, nan) = nan
pow(2, inf) = inf
pow(2, -inf) = 0
pow(2, 0) = 1
pow(2, -0) = 1
pow(2, 0.5) = 1.41422
pow(2, -0.5) = 0.707107
pow(2, 1) = 2
pow(2, -1) = 0.5
pow(2, 2) = 4
pow(2, -2) = 0.25
pow(-2, nan) = nan
pow(-2, inf) = inf
pow(-2, -inf) = 0
pow(-2, 0) = 1
pow(-2, -0) = 1
pow(-2, 0.5) = nan
pow(-2, -0.5) = nan
pow(-2, 1) = -2
pow(-2, -1) = -0.5
pow(-2, 2) = 4
pow(-2, -2) = 0.25
}
if {[have_spec arm]} {
set reference_output $reference_output_arm
}
if {[have_spec arm_64]} {
set reference_output $reference_output_arm_64
}
if {[have_spec riscv]} {
set reference_output $reference_output_riscv
}
if {[have_spec x86_64]} {
set reference_output $reference_output_x86_64
}