T(nextafter, dd_d)
T(nextafterf, ff_f)
T(nextafterl, ll_l)
+T(nexttoward, ll_d)
+T(nexttowardf, ll_f)
T(nexttowardl, ll_l)
T(pow, dd_d)
T(powf, ff_f)
--- /dev/null
+#!/bin/sh
+
+D=../sanity
+
+sed 's/^T(//;s/,//;s/)//' functions.h | while read N T
+do
+ case $T in
+ d_*|f_*|l_*) ./gen $N >$D/$N.h <<EOF
+-8.06684839057968126823036836721962107
++4.34523984933830528860918339265097582
+-8.38143342755524846875570469976848365
+-6.53167358191348375502677177380274565
++9.26705696697258528046907106996633473
++0.66198589809950443806520229507072615
+-0.40660392238535529519351490505650392
++0.56175974622072409170769641066459813
++0.77415229659130372834006997382367211
+-0.67876370263940246316802166606111153
+EOF
+ ;;
+ di_*|fi_*|li_*) ./gen $N >$D/$N.h <<EOF
+-8.06684839057968126823036836721962107 -2
++4.34523984933830528860918339265097582 -1
+-8.38143342755524846875570469976848365 0
+-6.53167358191348375502677177380274565 1
++9.26705696697258528046907106996633473 2
++0.66198589809950443806520229507072615 3
+-0.40660392238535529519351490505650392 4
++0.56175974622072409170769641066459813 5
++0.77415229659130372834006997382367211 6
+-0.67876370263940246316802166606111153 7
+EOF
+ ;;
+ dd_*|ff_*|ll_*) ./gen $N >$D/$N.h <<EOF
+-8.06684839057968126823036836721962107 +4.53566256067686864057537788388811764
++4.34523984933830528860918339265097582 -8.88799136300345123622768770110757083
+-8.38143342755524846875570469976848365 -2.76360733737958805493258686740202557
+-6.53167358191348375502677177380274565 +4.56753527684274348416184388263831508
++9.26705696697258528046907106996633473 +4.81139208435979589730560859417420750
+-6.45004555606023597579444426311945845 +0.66207179233767389593411946503559251
++7.85889025304169636815211127446301636 +0.05215452675006224789817853073306709
+-0.79205451198489594412029014134600873 +7.67640268511754002832536318951411755
++0.61570267319792408792325107549103713 +2.01190257903248027376896111888376742
+-0.55875868236091523814033056701077708 +0.03223983060263803856752696457418850
+EOF
+ ;;
+ *) echo "bad type: $T"
+ ;;
+ esac
+done
+
int mpnearbyint(struct t *t) { return mpd1(t, wrap_nearbyint) || (t->e&=~INEXACT, 0); }
int mpnearbyintf(struct t *t) { return mpf1(t, wrap_nearbyint) || (t->e&=~INEXACT, 0); }
int mpnearbyintl(struct t *t) { return mpl1(t, wrap_nearbyint) || (t->e&=~INEXACT, 0); }
-int mpnextafter(struct t *t) { return -1; }
-int mpnextafterf(struct t *t) { return -1; }
-int mpnextafterl(struct t *t) { return -1; }
-int mpnexttowardl(struct t *t) { return -1; }
+// TODO: hard to implement with mpfr
+int mpnextafter(struct t *t)
+{
+ feclearexcept(FE_ALL_EXCEPT);
+ t->y = nextafter(t->x, t->x2);
+ t->e = getexcept();
+ t->dy = 0;
+ return 0;
+}
+int mpnextafterf(struct t *t)
+{
+ feclearexcept(FE_ALL_EXCEPT);
+ t->y = nextafterf(t->x, t->x2);
+ t->e = getexcept();
+ t->dy = 0;
+ return 0;
+}
+int mpnextafterl(struct t *t)
+{
+ feclearexcept(FE_ALL_EXCEPT);
+ t->y = nextafterl(t->x, t->x2);
+ t->e = getexcept();
+ t->dy = 0;
+ return 0;
+}
+int mpnexttoward(struct t *t)
+{
+ feclearexcept(FE_ALL_EXCEPT);
+ t->y = nexttoward(t->x, t->x2);
+ t->e = getexcept();
+ t->dy = 0;
+ return 0;
+}
+int mpnexttowardf(struct t *t)
+{
+ feclearexcept(FE_ALL_EXCEPT);
+ t->y = nexttowardf(t->x, t->x2);
+ t->e = getexcept();
+ t->dy = 0;
+ return 0;
+}
+int mpnexttowardl(struct t *t) { return mpnextafterl(t); }
int mppow(struct t *t) { return mpd2(t, mpfr_pow); }
int mppowf(struct t *t) { return mpf2(t, mpfr_pow); }
int mppowl(struct t *t) { return mpl2(t, mpfr_pow); }
int mpj1(struct t *t) { return mpd1(t, mpfr_j1); }
int mpy0(struct t *t) { return mpd1(t, mpfr_y0); }
int mpy1(struct t *t) { return mpd1(t, mpfr_y1); }
-int mpscalb(struct t *t) { return -1; }
-int mpscalbf(struct t *t) { return -1; }
+// TODO: non standard functions
+int mpscalb(struct t *t)
+{
+ setupfenv(t->r);
+ t->y = scalb(t->x, t->x2);
+ t->e = getexcept();
+ t->dy = 0; // wrong
+ return 0;
+}
+int mpscalbf(struct t *t)
+{
+ setupfenv(t->r);
+ t->y = scalbf(t->x, t->x2);
+ t->e = getexcept();
+ t->dy = 0; // wrong
+ return 0;
+}
int mpj0f(struct t *t) { return mpf1(t, mpfr_j0); }
int mpj0l(struct t *t) { return mpl1(t, mpfr_j0); }
int mpj1f(struct t *t) { return mpf1(t, mpfr_j1); }
int mpnextafter(struct t *t) { return mpd2(t, nextafter); }
int mpnextafterf(struct t *t) { return mpf2(t, nextafterf); }
int mpnextafterl(struct t *t) { return mpl2(t, nextafterl); }
+int mpnexttoward(struct t *t)
+{
+ feclearexcept(FE_ALL_EXCEPT);
+ t->y = nexttoward(t->x, t->x2);
+ t->e = getexcept();
+ t->dy = 0;
+ return 0;
+}
+int mpnexttowardf(struct t *t)
+{
+ feclearexcept(FE_ALL_EXCEPT);
+ t->y = nexttowardf(t->x, t->x2);
+ t->e = getexcept();
+ t->dy = 0;
+ return 0;
+}
int mpnexttowardl(struct t *t) { return mpl2(t, nexttowardl); }
int mppow(struct t *t) { return mpd2(t, pow); }
int mppowf(struct t *t) { return mpf2(t, powf); }
--- /dev/null
+#include <stdint.h>
+#include <stdio.h>
+#include "util.h"
+
+static struct ll_l t[] = {
+#if LDBL_MANT_DIG == 53
+DHEADERS
+#elif LDBL_MANT_DIG == 64
+HEADERS
+#endif
+};
+
+int main(void)
+{
+ #pragma STDC FENV_ACCESS ON
+ long double y;
+ float d;
+ int e, i, err = 0;
+ struct ll_l *p;
+
+ for (i = 0; i < sizeof t/sizeof *t; i++) {
+ p = t + i;
+
+ if (p->r < 0)
+ continue;
+ fesetround(p->r);
+ feclearexcept(FE_ALL_EXCEPT);
+ y = ___(p->x, p->x2);
+ e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
+
+ if (!checkexcept(e, p->e, p->r)) {
+ printf("%s:%d: bad fp exception: %s ___(%La,%La)=%La, want %s",
+ p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
+ printf(" got %s\n", estr(e));
+ err++;
+ }
+ d = ulperrl(y, p->y, p->dy);
+ if (!checkulp(d, p->r)) {
+ printf("%s:%d: %s ___(%La,%La) want %La got %La ulperr %.3f = %a + %a\n",
+ p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy);
+ err++;
+ }
+ }
+ return !!err;
+}
--- /dev/null
+#include <stdint.h>
+#include <stdio.h>
+#include "util.h"
+
+static struct ll_l t[] = {
+#if LDBL_MANT_DIG == 53
+DHEADERS
+#elif LDBL_MANT_DIG == 64
+HEADERS
+#endif
+};
+
+int main(void)
+{
+ #pragma STDC FENV_ACCESS ON
+ long double y;
+ float d;
+ int e, i, err = 0;
+ struct ll_l *p;
+
+ for (i = 0; i < sizeof t/sizeof *t; i++) {
+ p = t + i;
+
+ if (p->r < 0)
+ continue;
+ fesetround(p->r);
+ feclearexcept(FE_ALL_EXCEPT);
+ y = ___(p->x, p->x2);
+ e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
+
+ if (!checkexcept(e, p->e, p->r)) {
+ printf("%s:%d: bad fp exception: %s ___(%La,%La)=%La, want %s",
+ p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
+ printf(" got %s\n", estr(e));
+ err++;
+ }
+ d = ulperrl(y, p->y, p->dy);
+ if (!checkulp(d, p->r)) {
+ printf("%s:%d: %s ___(%La,%La) want %La got %La ulperr %.3f = %a + %a\n",
+ p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy);
+ err++;
+ }
+ }
+ return !!err;
+}
#include "util.h"
static struct dd_d t[] = {
+#include "sanity/nextafter.h"
};
#include "util.h"
static struct ff_f t[] = {
+#include "sanity/nextafterf.h"
};
static struct ll_l t[] = {
#if LDBL_MANT_DIG == 53
+#include "sanity/nextafter.h"
#elif LDBL_MANT_DIG == 64
+#include "sanity/nextafterl.h"
#endif
};
--- /dev/null
+#include <stdint.h>
+#include <stdio.h>
+#include "util.h"
+
+static struct ll_l t[] = {
+#if LDBL_MANT_DIG == 53
+#include "sanity/nexttoward.h"
+
+#elif LDBL_MANT_DIG == 64
+#include "sanity/nexttoward.h"
+
+#endif
+};
+
+int main(void)
+{
+ #pragma STDC FENV_ACCESS ON
+ long double y;
+ float d;
+ int e, i, err = 0;
+ struct ll_l *p;
+
+ for (i = 0; i < sizeof t/sizeof *t; i++) {
+ p = t + i;
+
+ if (p->r < 0)
+ continue;
+ fesetround(p->r);
+ feclearexcept(FE_ALL_EXCEPT);
+ y = nexttoward(p->x, p->x2);
+ e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
+
+ if (!checkexcept(e, p->e, p->r)) {
+ printf("%s:%d: bad fp exception: %s nexttoward(%La,%La)=%La, want %s",
+ p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
+ printf(" got %s\n", estr(e));
+ err++;
+ }
+ d = ulperrl(y, p->y, p->dy);
+ if (!checkulp(d, p->r)) {
+ printf("%s:%d: %s nexttoward(%La,%La) want %La got %La ulperr %.3f = %a + %a\n",
+ p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy);
+ err++;
+ }
+ }
+ return !!err;
+}
--- /dev/null
+#include <stdint.h>
+#include <stdio.h>
+#include "util.h"
+
+static struct ll_l t[] = {
+#if LDBL_MANT_DIG == 53
+#include "sanity/nexttowardf.h"
+
+#elif LDBL_MANT_DIG == 64
+#include "sanity/nexttowardf.h"
+
+#endif
+};
+
+int main(void)
+{
+ #pragma STDC FENV_ACCESS ON
+ long double y;
+ float d;
+ int e, i, err = 0;
+ struct ll_l *p;
+
+ for (i = 0; i < sizeof t/sizeof *t; i++) {
+ p = t + i;
+
+ if (p->r < 0)
+ continue;
+ fesetround(p->r);
+ feclearexcept(FE_ALL_EXCEPT);
+ y = nexttowardf(p->x, p->x2);
+ e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
+
+ if (!checkexcept(e, p->e, p->r)) {
+ printf("%s:%d: bad fp exception: %s nexttowardf(%La,%La)=%La, want %s",
+ p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
+ printf(" got %s\n", estr(e));
+ err++;
+ }
+ d = ulperrl(y, p->y, p->dy);
+ if (!checkulp(d, p->r)) {
+ printf("%s:%d: %s nexttowardf(%La,%La) want %La got %La ulperr %.3f = %a + %a\n",
+ p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy);
+ err++;
+ }
+ }
+ return !!err;
+}
static struct ll_l t[] = {
#if LDBL_MANT_DIG == 53
+#include "sanity/nexttoward.h"
#elif LDBL_MANT_DIG == 64
+#include "sanity/nexttowardl.h"
#endif
};
--- /dev/null
+T(RN, -0x1.02239f3c6a8f1p+3, 0x1.22484b9ef31fp+2, -0x1.02239f3c6a8fp+3, 0x0p+0, 0)
+T(RN, 0x1.161868e18bc67p+2, -0x1.1c6a6cdce75e8p+3, 0x1.161868e18bc66p+2, 0x0p+0, 0)
+T(RN, -0x1.0c34b3e01e6e7p+3, -0x1.61bde29e83f6dp+1, -0x1.0c34b3e01e6e6p+3, 0x0p+0, 0)
+T(RN, -0x1.a206f0a19dcc4p+2, 0x1.24527f7b576acp+2, -0x1.a206f0a19dcc3p+2, 0x0p+0, 0)
+T(RN, 0x1.288bbb0d6a1e6p+3, 0x1.33edd910a3c01p+2, 0x1.288bbb0d6a1e5p+3, 0x0p+0, 0)
+T(RN, -0x1.9ccd8be03f495p+2, 0x1.52fb12ef638a1p-1, -0x1.9ccd8be03f494p+2, 0x0p+0, 0)
+T(RN, 0x1.f6f80ed2eab44p+2, 0x1.ab3ff8575b21dp-5, 0x1.f6f80ed2eab43p+2, 0x0p+0, 0)
+T(RN, -0x1.95882b433fad3p-1, 0x1.eb4a2e7ce0693p+2, -0x1.95882b433fad2p-1, 0x0p+0, 0)
+T(RN, 0x1.3b3d617ae3c4ap-1, 0x1.01860611d75e1p+1, 0x1.3b3d617ae3c4bp-1, 0x0p+0, 0)
+T(RN, -0x1.1e159e36313eep-1, 0x1.081bd34224213p-5, -0x1.1e159e36313edp-1, 0x0p+0, 0)
--- /dev/null
+T(RN, -0x1.0223ap+3, 0x1.22484cp+2, -0x1.02239ep+3, 0x0p+0, 0)
+T(RN, 0x1.161868p+2, -0x1.1c6a6cp+3, 0x1.161866p+2, 0x0p+0, 0)
+T(RN, -0x1.0c34b4p+3, -0x1.61bde2p+1, -0x1.0c34b2p+3, 0x0p+0, 0)
+T(RN, -0x1.a206fp+2, 0x1.24528p+2, -0x1.a206eep+2, 0x0p+0, 0)
+T(RN, 0x1.288bbcp+3, 0x1.33eddap+2, 0x1.288bbap+3, 0x0p+0, 0)
+T(RN, -0x1.9ccd8cp+2, 0x1.52fb12p-1, -0x1.9ccd8ap+2, 0x0p+0, 0)
+T(RN, 0x1.f6f80ep+2, 0x1.ab3ff8p-5, 0x1.f6f80cp+2, 0x0p+0, 0)
+T(RN, -0x1.95882cp-1, 0x1.eb4a2ep+2, -0x1.95882ap-1, 0x0p+0, 0)
+T(RN, 0x1.3b3d62p-1, 0x1.018606p+1, 0x1.3b3d64p-1, 0x0p+0, 0)
+T(RN, -0x1.1e159ep-1, 0x1.081bd4p-5, -0x1.1e159cp-1, 0x0p+0, 0)
--- /dev/null
+T(RN, -0x1.02239f3c6a8f13dep+3L, 0x1.22484b9ef31efd4p+2L, -0x1.02239f3c6a8f13dcp+3L, 0x0p+0, 0)
+T(RN, 0x1.161868e18bc67782p+2L, -0x1.1c6a6cdce75e83acp+3L, 0x1.161868e18bc6778p+2L, 0x0p+0, 0)
+T(RN, -0x1.0c34b3e01e6e682cp+3L, -0x1.61bde29e83f6cb16p+1L, -0x1.0c34b3e01e6e682ap+3L, 0x0p+0, 0)
+T(RN, -0x1.a206f0a19dcc3948p+2L, 0x1.24527f7b576abb6p+2L, -0x1.a206f0a19dcc3946p+2L, 0x0p+0, 0)
+T(RN, 0x1.288bbb0d6a1e5bdap+3L, 0x1.33edd910a3c00b7p+2L, 0x1.288bbb0d6a1e5bd8p+3L, 0x0p+0, 0)
+T(RN, -0x1.9ccd8be03f4949a2p+2L, 0x1.52fb12ef638a1222p-1L, -0x1.9ccd8be03f4949ap+2L, 0x0p+0, 0)
+T(RN, 0x1.f6f80ed2eab43b22p+2L, 0x1.ab3ff8575b21cf92p-5L, 0x1.f6f80ed2eab43b2p+2L, 0x0p+0, 0)
+T(RN, -0x1.95882b433fad2dd4p-1L, 0x1.eb4a2e7ce06930dap+2L, -0x1.95882b433fad2dd2p-1L, 0x0p+0, 0)
+T(RN, 0x1.3b3d617ae3c4a65p-1L, 0x1.01860611d75e1052p+1L, 0x1.3b3d617ae3c4a652p-1L, 0x0p+0, 0)
+T(RN, -0x1.1e159e36313ee67cp-1L, 0x1.081bd34224212bp-5L, -0x1.1e159e36313ee67ap-1L, 0x0p+0, 0)
--- /dev/null
+T(RN, -0x1.02239f3c6a8f13dep+3L, 0x1.22484b9ef31efd4p+2L, -0x1.02239f3c6a8fp+3, 0x0p+0, INEXACT)
+T(RN, 0x1.161868e18bc67782p+2L, -0x1.1c6a6cdce75e83acp+3L, 0x1.161868e18bc66p+2, 0x0p+0, INEXACT)
+T(RN, -0x1.0c34b3e01e6e682cp+3L, -0x1.61bde29e83f6cb16p+1L, -0x1.0c34b3e01e6e6p+3, 0x0p+0, INEXACT)
+T(RN, -0x1.a206f0a19dcc3948p+2L, 0x1.24527f7b576abb6p+2L, -0x1.a206f0a19dcc3p+2, 0x0p+0, INEXACT)
+T(RN, 0x1.288bbb0d6a1e5bdap+3L, 0x1.33edd910a3c00b7p+2L, 0x1.288bbb0d6a1e5p+3, 0x0p+0, INEXACT)
+T(RN, -0x1.9ccd8be03f4949a2p+2L, 0x1.52fb12ef638a1222p-1L, -0x1.9ccd8be03f494p+2, 0x0p+0, INEXACT)
+T(RN, 0x1.f6f80ed2eab43b22p+2L, 0x1.ab3ff8575b21cf92p-5L, 0x1.f6f80ed2eab43p+2, 0x0p+0, INEXACT)
+T(RN, -0x1.95882b433fad2dd4p-1L, 0x1.eb4a2e7ce06930dap+2L, -0x1.95882b433fad2p-1, 0x0p+0, INEXACT)
+T(RN, 0x1.3b3d617ae3c4a65p-1L, 0x1.01860611d75e1052p+1L, 0x1.3b3d617ae3c4bp-1, 0x0p+0, INEXACT)
+T(RN, -0x1.1e159e36313ee67cp-1L, 0x1.081bd34224212bp-5L, -0x1.1e159e36313edp-1, 0x0p+0, INEXACT)
--- /dev/null
+T(RN, -0x1.02239f3c6a8f13dep+3L, 0x1.22484b9ef31efd4p+2L, -0x1.02239ep+3, 0x0p+0, INEXACT)
+T(RN, 0x1.161868e18bc67782p+2L, -0x1.1c6a6cdce75e83acp+3L, 0x1.161866p+2, 0x0p+0, INEXACT)
+T(RN, -0x1.0c34b3e01e6e682cp+3L, -0x1.61bde29e83f6cb16p+1L, -0x1.0c34b2p+3, 0x0p+0, INEXACT)
+T(RN, -0x1.a206f0a19dcc3948p+2L, 0x1.24527f7b576abb6p+2L, -0x1.a206eep+2, 0x0p+0, INEXACT)
+T(RN, 0x1.288bbb0d6a1e5bdap+3L, 0x1.33edd910a3c00b7p+2L, 0x1.288bbap+3, 0x0p+0, INEXACT)
+T(RN, -0x1.9ccd8be03f4949a2p+2L, 0x1.52fb12ef638a1222p-1L, -0x1.9ccd8ap+2, 0x0p+0, INEXACT)
+T(RN, 0x1.f6f80ed2eab43b22p+2L, 0x1.ab3ff8575b21cf92p-5L, 0x1.f6f80cp+2, 0x0p+0, INEXACT)
+T(RN, -0x1.95882b433fad2dd4p-1L, 0x1.eb4a2e7ce06930dap+2L, -0x1.95882ap-1, 0x0p+0, INEXACT)
+T(RN, 0x1.3b3d617ae3c4a65p-1L, 0x1.01860611d75e1052p+1L, 0x1.3b3d64p-1, 0x0p+0, INEXACT)
+T(RN, -0x1.1e159e36313ee67cp-1L, 0x1.081bd34224212bp-5L, -0x1.1e159cp-1, 0x0p+0, INEXACT)
--- /dev/null
+T(RN, -0x1.02239f3c6a8f13dep+3L, 0x1.22484b9ef31efd4p+2L, -0x1.02239f3c6a8f13dcp+3L, 0x0p+0, 0)
+T(RN, 0x1.161868e18bc67782p+2L, -0x1.1c6a6cdce75e83acp+3L, 0x1.161868e18bc6778p+2L, 0x0p+0, 0)
+T(RN, -0x1.0c34b3e01e6e682cp+3L, -0x1.61bde29e83f6cb16p+1L, -0x1.0c34b3e01e6e682ap+3L, 0x0p+0, 0)
+T(RN, -0x1.a206f0a19dcc3948p+2L, 0x1.24527f7b576abb6p+2L, -0x1.a206f0a19dcc3946p+2L, 0x0p+0, 0)
+T(RN, 0x1.288bbb0d6a1e5bdap+3L, 0x1.33edd910a3c00b7p+2L, 0x1.288bbb0d6a1e5bd8p+3L, 0x0p+0, 0)
+T(RN, -0x1.9ccd8be03f4949a2p+2L, 0x1.52fb12ef638a1222p-1L, -0x1.9ccd8be03f4949ap+2L, 0x0p+0, 0)
+T(RN, 0x1.f6f80ed2eab43b22p+2L, 0x1.ab3ff8575b21cf92p-5L, 0x1.f6f80ed2eab43b2p+2L, 0x0p+0, 0)
+T(RN, -0x1.95882b433fad2dd4p-1L, 0x1.eb4a2e7ce06930dap+2L, -0x1.95882b433fad2dd2p-1L, 0x0p+0, 0)
+T(RN, 0x1.3b3d617ae3c4a65p-1L, 0x1.01860611d75e1052p+1L, 0x1.3b3d617ae3c4a652p-1L, 0x0p+0, 0)
+T(RN, -0x1.1e159e36313ee67cp-1L, 0x1.081bd34224212bp-5L, -0x1.1e159e36313ee67ap-1L, 0x0p+0, 0)
--- /dev/null
+T(RN, -0x1.02239f3c6a8f1p+3, 0x1.22484b9ef31fp+2, nan, 0x0p+0, INEXACT|INVALID)
+T(RN, 0x1.161868e18bc67p+2, -0x1.1c6a6cdce75e8p+3, nan, 0x0p+0, INEXACT|INVALID)
+T(RN, -0x1.0c34b3e01e6e7p+3, -0x1.61bde29e83f6dp+1, nan, 0x0p+0, INEXACT|INVALID)
+T(RN, -0x1.a206f0a19dcc4p+2, 0x1.24527f7b576acp+2, nan, 0x0p+0, INEXACT|INVALID)
+T(RN, 0x1.288bbb0d6a1e6p+3, 0x1.33edd910a3c01p+2, nan, 0x0p+0, INEXACT|INVALID)
+T(RN, -0x1.9ccd8be03f495p+2, 0x1.52fb12ef638a1p-1, nan, 0x0p+0, INEXACT|INVALID)
+T(RN, 0x1.f6f80ed2eab44p+2, 0x1.ab3ff8575b21dp-5, nan, 0x0p+0, INEXACT|INVALID)
+T(RN, -0x1.95882b433fad3p-1, 0x1.eb4a2e7ce0693p+2, nan, 0x0p+0, INEXACT|INVALID)
+T(RN, 0x1.3b3d617ae3c4ap-1, 0x1.01860611d75e1p+1, nan, 0x0p+0, INEXACT|INVALID)
+T(RN, -0x1.1e159e36313eep-1, 0x1.081bd34224213p-5, nan, 0x0p+0, INEXACT|INVALID)
--- /dev/null
+T(RN, -0x1.0223ap+3, 0x1.22484cp+2, nan, 0x0p+0, INEXACT|INVALID)
+T(RN, 0x1.161868p+2, -0x1.1c6a6cp+3, nan, 0x0p+0, INEXACT|INVALID)
+T(RN, -0x1.0c34b4p+3, -0x1.61bde2p+1, nan, 0x0p+0, INEXACT|INVALID)
+T(RN, -0x1.a206fp+2, 0x1.24528p+2, nan, 0x0p+0, INEXACT|INVALID)
+T(RN, 0x1.288bbcp+3, 0x1.33eddap+2, nan, 0x0p+0, INEXACT|INVALID)
+T(RN, -0x1.9ccd8cp+2, 0x1.52fb12p-1, nan, 0x0p+0, INEXACT|INVALID)
+T(RN, 0x1.f6f80ep+2, 0x1.ab3ff8p-5, nan, 0x0p+0, INEXACT|INVALID)
+T(RN, -0x1.95882cp-1, 0x1.eb4a2ep+2, nan, 0x0p+0, INEXACT|INVALID)
+T(RN, 0x1.3b3d62p-1, 0x1.018606p+1, nan, 0x0p+0, INEXACT|INVALID)
+T(RN, -0x1.1e159ep-1, 0x1.081bd4p-5, nan, 0x0p+0, INEXACT|INVALID)
#include "util.h"
static struct dd_d t[] = {
+#include "sanity/scalb.h"
};
#include "util.h"
static struct ff_f t[] = {
+#include "sanity/scalbf.h"
};