aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorJoseph Myers <josmyers@redhat.com>2025-03-27 10:44:44 +0000
committerJoseph Myers <josmyers@redhat.com>2025-03-27 10:44:44 +0000
commit75ad83f564b822de0f1f5fb6ed29f105373d3c49 (patch)
tree8da7ed5af54d8d514ca355cf37ac6958d1424e68 /math
parentbe61b9493d38032519e596f282f9695667402c8d (diff)
downloadglibc-75ad83f564b822de0f1f5fb6ed29f105373d3c49.tar.xz
glibc-75ad83f564b822de0f1f5fb6ed29f105373d3c49.zip
Implement C23 pown
C23 adds various <math.h> function families originally defined in TS 18661-4. Add the pown functions, which are like pow but with an integer exponent. That exponent has type long long int in C23; it was intmax_t in TS 18661-4, and as with other interfaces changed after their initial appearance in the TS, I don't think we need to support the original version of the interface. The test inputs are based on the subset of test inputs for pow that use integer exponents that fit in long long. As the first such template implementation that saves and restores the rounding mode internally (to avoid possible issues with directed rounding and intermediate overflows or underflows in the wrong rounding mode), support also needed to be added for using SET_RESTORE_ROUND* in such template function implementations. This required math-type-macros-float128.h to include <fenv_private.h>, so it can tell whether SET_RESTORE_ROUNDF128 is defined. In turn, the include order with <fenv_private.h> included before <math_private.h> broke loongarch builds, showing up that sysdeps/loongarch/math_private.h is really a fenv_private.h file (maybe implemented internally before the consistent split of those headers in 2018?) and needed to be renamed to fenv_private.h to avoid errors with duplicate macro definitions if <math_private.h> is included after <fenv_private.h>. The underlying implementation uses __ieee754_pow functions (called more than once in some cases, where the exponent does not fit in the floating type). I expect a custom implementation for a given format, that only handles integer exponents but handles larger exponents directly, could be faster and more accurate in some cases. I encourage searching for worst cases for ulps error for these implementations (necessarily non-exhaustively, given the size of the input space). Tested for x86_64 and x86, and with build-many-glibcs.py.
Diffstat (limited to 'math')
-rw-r--r--math/Makefile6
-rw-r--r--math/Versions2
-rw-r--r--math/auto-libm-test-in377
-rw-r--r--math/auto-libm-test-out-pown13182
-rw-r--r--math/bits/mathcalls.h3
-rw-r--r--math/gen-auto-libm-tests.c22
-rwxr-xr-xmath/gen-tgmath-tests.py1
-rw-r--r--math/libm-test-driver.c13
-rw-r--r--math/libm-test-pown.inc150
-rw-r--r--math/s_pown_template.c91
-rw-r--r--math/test-tgmath.c14
-rw-r--r--math/tgmath.h3
12 files changed, 13862 insertions, 2 deletions
diff --git a/math/Makefile b/math/Makefile
index 64d9d4d1e5..6b2331d146 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -139,6 +139,7 @@ gen-libm-calls = \
s_log2p1F \
s_nanF \
s_nextdownF \
+ s_pownF \
s_powrF \
s_rsqrtF \
s_significandF \
@@ -686,6 +687,7 @@ libm-test-funcs-auto = \
log1p \
log2p1 \
pow \
+ pown \
powr \
rsqrt \
sin \
@@ -1018,6 +1020,7 @@ tgmath3-macros = \
nexttoward \
nextup \
pow \
+ pown \
powr \
remainder \
remquo \
@@ -1442,6 +1445,7 @@ CFLAGS-s_nexttoward.c += -fno-builtin-nexttoward -fno-builtin-nexttowardl
CFLAGS-s_nexttowardf.c += -fno-builtin-nexttowardf
CFLAGS-s_nextup.c += -fno-builtin-nextupl
CFLAGS-e_pow.c += -fno-builtin-powl
+CFLAGS-s_pown.c += -fno-builtin-pownl
CFLAGS-s_powr.c += -fno-builtin-powrl
CFLAGS-w_remainder.c += -fno-builtin-remainderl -fno-builtin-dreml
CFLAGS-s_remquo.c += -fno-builtin-remquol
@@ -1578,6 +1582,7 @@ CFLAGS-s_nextafter.c += -fno-builtin-nextafterf32x -fno-builtin-nextafterf64
CFLAGS-s_nextdown.c += -fno-builtin-nextdownf32x -fno-builtin-nextdownf64
CFLAGS-s_nextup.c += -fno-builtin-nextupf32x -fno-builtin-nextupf64
CFLAGS-e_pow.c += -fno-builtin-powf32x -fno-builtin-powf64
+CFLAGS-s_pown.c += -fno-builtin-pownf32x -fno-builtin-pownf64
CFLAGS-s_powr.c += -fno-builtin-powrf32x -fno-builtin-powrf64
CFLAGS-w_remainder.c += -fno-builtin-remainderf32x -fno-builtin-remainderf64
CFLAGS-s_remquo.c += -fno-builtin-remquof32x -fno-builtin-remquof64
@@ -1705,6 +1710,7 @@ CFLAGS-s_nextafterf.c += -fno-builtin-nextafterf32
CFLAGS-s_nextdownf.c += -fno-builtin-nextdownf32
CFLAGS-s_nextupf.c += -fno-builtin-nextupf32
CFLAGS-e_powf.c += -fno-builtin-powf32
+CFLAGS-s_pownf.c += -fno-builtin-pownf32
CFLAGS-s_powrf.c += -fno-builtin-powrf32
CFLAGS-w_remainderf.c += -fno-builtin-remainderf32
CFLAGS-s_remquof.c += -fno-builtin-remquof32
diff --git a/math/Versions b/math/Versions
index f92707545a..36c0f23da6 100644
--- a/math/Versions
+++ b/math/Versions
@@ -673,9 +673,11 @@ libm {
}
GLIBC_2.42 {
# Functions not involving _Float64x or _Float128, for all configurations.
+ pown; pownf; pownl; pownf32; pownf64; pownf32x;
powr; powrf; powrl; powrf32; powrf64; powrf32x;
rsqrt; rsqrtf; rsqrtl; rsqrtf32; rsqrtf64; rsqrtf32x;
# Functions involving _Float64x or _Float128, for some configurations.
+ pownf64x; pownf128;
powrf64x; powrf128;
rsqrtf64x; rsqrtf128;
}
diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index cb5d6443b1..7cb8a896ab 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -8151,6 +8151,383 @@ pow 0x1.059c76p+0 0x1.ff80bep+11
pow 0x1.7ac7cp+5 23
pow -0x1.7ac7cp+5 23
+pown 0 0
+pown 0 -0
+pown -0 0
+pown -0 -0
+
+pown 10 0
+pown 10 -0
+pown -10 0
+pown -10 -0
+
+pown 1 1
+pown 1 -1
+pown 1 0x4fffffffffffffff
+
+# pown (x, +-0) == 1.
+pown 32.75 0
+pown 32.75 -0
+pown -32.75 0
+pown -32.75 -0
+pown 0x1p72 0
+pown 0x1p72 -0
+pown 0x1p-72 0
+pown 0x1p-72 -0
+
+pown 0 1
+pown 0 11
+
+pown -0 1
+pown -0 11
+
+pown 0 2
+
+pown -0 2
+
+# pown (+0, y) == +0 for y an odd integer > 0.
+pown 0.0 27
+pown 0.0 0xffffff
+pown 0.0 0x1fffffffffffff
+
+# pown (-0, y) == -0 for y an odd integer > 0.
+pown -0 27
+pown -0 0xffffff
+pown -0 0x1fffffe
+pown -0 0x1fffffffffffff
+pown -0 0x3ffffffffffffe
+pown -0 0x7fffffffffffffff
+
+# pown (+0, y) == +0 for y > 0 and not an odd integer.
+pown 0.0 4
+pown 0.0 0x1000000
+
+# pown (-0, y) == +0 for y > 0 and not an odd integer.
+pown -0 4
+pown -0 0x1000000
+
+pown 2 4
+pown 256 8
+
+pown -1.0 -0xffffff
+pown -1.0 -0x1fffffe
+pown -1.0 -0x1fffffffffffff
+pown -1.0 -0x3ffffffffffffe
+pown -1.0 -0x7fffffffffffffff
+
+pown -1.0 0xffffff
+pown -1.0 0x1fffffe
+pown -1.0 0x1fffffffffffff
+pown -1.0 0x3ffffffffffffe
+pown -1.0 0x7fffffffffffffff
+
+pown -2.0 126
+pown -2.0 127
+pown -2.0 -126
+pown -2.0 -127
+
+pown -2.0 -0xffffff
+pown -2.0 -0x1fffffe
+pown -2.0 -0x1fffffffffffff
+pown -2.0 -0x3ffffffffffffe
+pown -2.0 -0x7fffffffffffffff
+
+pown -2.0 0xffffff
+pown -2.0 0x1fffffe
+pown -2.0 0x1fffffffffffff
+pown -2.0 0x3ffffffffffffe
+pown -2.0 0x7fffffffffffffff
+
+pown -max -2
+pown -max -3
+pown -max 2
+pown -max 3
+
+pown -max -0xffffff
+pown -max -0x1fffffe
+pown -max -0x1fffffffffffff
+pown -max -0x3ffffffffffffe
+pown -max -0x7fffffffffffffff
+
+pown -max 0xffffff
+pown -max 0x1fffffe
+pown -max 0x1fffffffffffff
+pown -max 0x3ffffffffffffe
+pown -max 0x7fffffffffffffff
+
+pown -0x1p65 2
+pown -0x1p65 3
+pown -0x1p65 4
+pown -0x1p65 5
+pown -0x1p43 3
+pown -0x1p43 4
+pown -0x1p43 5
+pown -0x1p33 4
+pown -0x1p33 5
+pown -0x1p26 5
+pown -0x1p-65 -2
+pown -0x1p-65 -3
+pown -0x1p-65 -4
+pown -0x1p-65 -5
+pown -0x1p-43 -3
+pown -0x1p-43 -4
+pown -0x1p-43 -5
+pown -0x1p-33 -4
+pown -0x1p-33 -5
+pown -0x1p-26 -5
+
+pown -0x1p513 2
+pown -0x1p513 3
+pown -0x1p513 4
+pown -0x1p513 5
+pown -0x1p342 3
+pown -0x1p342 4
+pown -0x1p342 5
+pown -0x1p257 4
+pown -0x1p257 5
+pown -0x1p205 5
+pown -0x1p-513 -2
+pown -0x1p-513 -3
+pown -0x1p-513 -4
+pown -0x1p-513 -5
+pown -0x1p-342 -3
+pown -0x1p-342 -4
+pown -0x1p-342 -5
+pown -0x1p-257 -4
+pown -0x1p-257 -5
+pown -0x1p-205 -5
+
+pown -0x1p8192 2
+pown -0x1p8192 3
+pown -0x1p8192 4
+pown -0x1p8192 5
+pown -0x1p5462 3
+pown -0x1p5462 4
+pown -0x1p5462 5
+pown -0x1p4097 4
+pown -0x1p4097 5
+pown -0x1p3277 5
+pown -0x1p64 257
+pown -0x1p-8192 -2
+pown -0x1p-8192 -3
+pown -0x1p-8192 -4
+pown -0x1p-8192 -5
+pown -0x1p-5462 -3
+pown -0x1p-5462 -4
+pown -0x1p-5462 -5
+pown -0x1p-4097 -4
+pown -0x1p-4097 -5
+pown -0x1p-3277 -5
+pown -0x1p-64 -257
+
+pown -0.5 126
+pown -0.5 127
+pown -0.5 -126
+pown -0.5 -127
+
+pown -0.5 -0xffffff
+pown -0.5 -0x1fffffe
+pown -0.5 -0x1fffffffffffff
+pown -0.5 -0x3ffffffffffffe
+pown -0.5 -0x7fffffffffffffff
+
+pown -0.5 0xffffff
+pown -0.5 0x1fffffe
+pown -0.5 0x1fffffffffffff
+pown -0.5 0x3ffffffffffffe
+pown -0.5 0x7fffffffffffffff
+
+pown -min -2
+pown -min -3
+pown -min 1
+pown -min 2
+pown -min 3
+
+pown -min -0xffffff
+pown -min -0x1fffffe
+pown -min -0x1fffffffffffff
+pown -min -0x3ffffffffffffe
+pown -min -0x7fffffffffffffff
+
+pown -min 0xffffff
+pown -min 0x1fffffe
+pown -min 0x1fffffffffffff
+pown -min 0x3ffffffffffffe
+pown -min 0x7fffffffffffffff
+
+pown 0x0.ffffffp0 10
+pown 0x0.ffffffp0 100
+pown 0x0.ffffffp0 1000
+pown 0x0.ffffffp0 0x1000000
+pown 0x0.ffffffp0 0x40000000
+pown 0x0.ffffffp0 0x48d15980
+pown 0x0.ffffffp0 -10
+pown 0x0.ffffffp0 -100
+pown 0x0.ffffffp0 -1000
+pown 0x0.ffffffp0 -0x1000000
+pown 0x0.ffffffp0 -0x40000000
+pown 0x0.ffffffp0 -0x48d15980
+pown 0x1.000002p0 0x1000000
+pown 0x1.000002p0 0x2468acc0
+pown 0x1.000002p0 -0x2468acc0
+
+pown 0x0.fffffffffffff8p0 0x48d159e26af37c00
+pown 0x0.fffffffffffff8p0 -0x48d159e26af37c00
+pown 0x1.0000000000001p0 0x2468acf13579be00
+pown 0x1.0000000000001p0 -0x2468acf13579be00
+
+pown -0x0.ffffffp0 10
+pown -0x0.ffffffp0 100
+pown -0x0.ffffffp0 1000
+pown -0x0.ffffffp0 0x1000000
+pown -0x0.ffffffp0 0x40000000
+pown -0x0.ffffffp0 0x48d15980
+pown -0x0.ffffffp0 -10
+pown -0x0.ffffffp0 -100
+pown -0x0.ffffffp0 -1000
+pown -0x0.ffffffp0 -0x1000000
+pown -0x0.ffffffp0 -0x40000000
+pown -0x0.ffffffp0 -0x48d15980
+pown -0x1.000002p0 0x1000000
+pown -0x1.000002p0 0x2468acc0
+pown -0x1.000002p0 -0x2468acc0
+
+pown -0x0.fffffffffffff8p0 0x48d159e26af37c00
+pown -0x0.fffffffffffff8p0 -0x48d159e26af37c00
+pown -0x1.0000000000001p0 0x2468acf13579be00
+pown -0x1.0000000000001p0 -0x2468acf13579be00
+
+pown 0x1.000002p0 0x40000000
+pown -0x1.000002p0 0x40000000
+pown 0x1.00000ep0 0x40000000
+pown -0x1.00000ep0 0x40000000
+
+pown 10.0 4932
+pown 10.0 4931
+pown 10.0 4930
+pown 10.0 4929
+pown 10.0 -4931
+pown 10.0 -4930
+pown 10.0 -4929
+pown 1e27 182
+pown 1e27 -182
+
+pown 2.0 -100000
+
+pown 0x1.00001p1 -126
+pown -0x1.00002p1 -126
+pown 0x1.00003p1 -126
+pown -0x1.00004p1 -126
+pown 0x1.00005p1 -126
+pown -0x1.00006p1 -126
+pown 0x1.00007p1 -126
+pown 0x1.00001p1 -969
+pown -0x1.00002p1 -969
+pown 0x1.00003p1 -969
+pown -0x1.00004p1 -969
+pown 0x1.00005p1 -969
+pown -0x1.00006p1 -969
+pown 0x1.00007p1 -969
+pown 0x1.00001p1 -1022
+pown -0x1.00002p1 -1022
+pown 0x1.00003p1 -1022
+pown -0x1.00004p1 -1022
+pown 0x1.00005p1 -1022
+pown -0x1.00006p1 -1022
+pown 0x1.00007p1 -1022
+pown 0x1.00001p1 -16382
+pown -0x1.00002p1 -16382
+pown 0x1.00003p1 -16382
+pown -0x1.00004p1 -16382
+pown 0x1.00005p1 -16382
+pown -0x1.00006p1 -16382
+pown 0x1.00007p1 -16382
+pown 0x1.00001p1 -16383
+pown -0x1.00002p1 -16383
+pown 0x1.00003p1 -16383
+pown -0x1.00004p1 -16383
+pown 0x1.00005p1 -16383
+pown -0x1.00006p1 -16383
+pown 0x1.00007p1 -16383
+pown 0x0.ffff1p-1 126
+pown -0x0.ffff2p-1 126
+pown 0x0.ffff3p-1 126
+pown -0x0.ffff4p-1 126
+pown 0x0.ffff5p-1 126
+pown -0x0.ffff6p-1 126
+pown 0x0.ffff7p-1 126
+pown 0x0.ffff1p-1 969
+pown -0x0.ffff2p-1 969
+pown 0x0.ffff3p-1 969
+pown -0x0.ffff4p-1 969
+pown 0x0.ffff5p-1 969
+pown -0x0.ffff6p-1 969
+pown 0x0.ffff7p-1 969
+pown 0x0.ffff1p-1 1022
+pown -0x0.ffff2p-1 1022
+pown 0x0.ffff3p-1 1022
+pown -0x0.ffff4p-1 1022
+pown 0x0.ffff5p-1 1022
+pown -0x0.ffff6p-1 1022
+pown 0x0.ffff7p-1 1022
+pown 0x0.ffff1p-1 16382
+pown -0x0.ffff2p-1 16382
+pown 0x0.ffff3p-1 16382
+pown -0x0.ffff4p-1 16382
+pown 0x0.ffff5p-1 16382
+pown -0x0.ffff6p-1 16382
+pown 0x0.ffff7p-1 16382
+pown 0x0.ffff1p-1 16383
+pown -0x0.ffff2p-1 16383
+pown 0x0.ffff3p-1 16383
+pown -0x0.ffff4p-1 16383
+pown 0x0.ffff5p-1 16383
+pown -0x0.ffff6p-1 16383
+pown 0x0.ffff7p-1 16383
+pown 0x2.000b3p0 -1022
+pown 0x2.000582p0 -1022
+
+pown 10 -1
+pown 10 -2
+pown 10 -3
+pown 10 -4
+pown 10 -5
+pown 10 -6
+pown 10 -7
+
+pown 0x0.ffffffffffffffffp0 1
+pown 0x0.ffffffffffffffffp0 2
+pown 0x0.ffffffffffffffffp0 3
+pown 0x0.ffffffffffffffffp0 4
+pown 0x0.ffffffffffffffffp0 5
+pown 0x0.ffffffffffffffffp0 6
+pown 0x0.ffffffffffffffffp0 7
+pown 0x0.ffffffffffffffffp0 -1
+pown 0x0.ffffffffffffffffp0 -2
+pown 0x0.ffffffffffffffffp0 -3
+pown 0x0.ffffffffffffffffp0 -4
+pown 0x0.ffffffffffffffffp0 -5
+pown 0x0.ffffffffffffffffp0 -6
+pown 0x0.ffffffffffffffffp0 -7
+
+pown 0x1.0000000000000002p0 1
+pown 0x1.0000000000000002p0 2
+pown 0x1.0000000000000002p0 3
+pown 0x1.0000000000000002p0 4
+pown 0x1.0000000000000002p0 5
+pown 0x1.0000000000000002p0 6
+pown 0x1.0000000000000002p0 7
+pown 0x1.0000000000000002p0 -1
+pown 0x1.0000000000000002p0 -2
+pown 0x1.0000000000000002p0 -3
+pown 0x1.0000000000000002p0 -4
+pown 0x1.0000000000000002p0 -5
+pown 0x1.0000000000000002p0 -6
+pown 0x1.0000000000000002p0 -7
+
+pown 0x1.7ac7cp+5 23
+pown -0x1.7ac7cp+5 23
+
powr 10 0
powr 10 -0
diff --git a/math/auto-libm-test-out-pown b/math/auto-libm-test-out-pown
new file mode 100644
index 0000000000..502706296a
--- /dev/null
+++ b/math/auto-libm-test-out-pown
@@ -0,0 +1,13182 @@
+pown 0 0
+= pown downward binary32 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest binary32 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero binary32 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward binary32 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown downward binary64 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest binary64 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero binary64 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward binary64 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown downward intel96 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest intel96 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero intel96 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward intel96 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown downward m68k96 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest m68k96 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero m68k96 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward m68k96 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown downward binary128 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest binary128 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero binary128 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward binary128 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown downward ibm128 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest ibm128 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero ibm128 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward ibm128 0x0p+0 0LL : 0x1p+0 : inexact-ok
+pown 0 -0
+= pown downward binary32 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest binary32 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero binary32 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward binary32 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown downward binary64 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest binary64 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero binary64 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward binary64 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown downward intel96 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest intel96 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero intel96 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward intel96 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown downward m68k96 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest m68k96 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero m68k96 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward m68k96 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown downward binary128 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest binary128 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero binary128 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward binary128 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown downward ibm128 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest ibm128 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero ibm128 0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward ibm128 0x0p+0 0LL : 0x1p+0 : inexact-ok
+pown -0 0
+= pown downward binary32 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest binary32 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero binary32 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward binary32 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown downward binary64 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest binary64 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero binary64 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward binary64 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown downward intel96 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest intel96 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero intel96 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward intel96 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown downward m68k96 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest m68k96 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero m68k96 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward m68k96 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown downward binary128 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest binary128 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero binary128 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward binary128 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown downward ibm128 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest ibm128 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero ibm128 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward ibm128 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+pown -0 -0
+= pown downward binary32 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest binary32 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero binary32 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward binary32 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown downward binary64 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest binary64 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero binary64 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward binary64 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown downward intel96 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest intel96 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero intel96 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward intel96 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown downward m68k96 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest m68k96 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero m68k96 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward m68k96 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown downward binary128 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest binary128 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero binary128 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward binary128 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown downward ibm128 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest ibm128 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero ibm128 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+= pown upward ibm128 -0x0p+0 0LL : 0x1p+0 : inexact-ok
+pown 10 0
+= pown downward binary32 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest binary32 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero binary32 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown upward binary32 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown downward binary64 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest binary64 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero binary64 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown upward binary64 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown downward intel96 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest intel96 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero intel96 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown upward intel96 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown downward m68k96 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest m68k96 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero m68k96 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown upward m68k96 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown downward binary128 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest binary128 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero binary128 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown upward binary128 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown downward ibm128 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest ibm128 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero ibm128 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown upward ibm128 0xap+0 0LL : 0x1p+0 : inexact-ok
+pown 10 -0
+= pown downward binary32 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest binary32 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero binary32 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown upward binary32 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown downward binary64 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest binary64 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero binary64 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown upward binary64 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown downward intel96 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest intel96 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero intel96 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown upward intel96 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown downward m68k96 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest m68k96 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero m68k96 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown upward m68k96 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown downward binary128 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown tonearest binary128 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown towardzero binary128 0xap+0 0LL : 0x1p+0 : inexact-ok
+= pown upward binary128 0xap+0 0LL : 0x1p+0