diff options
Diffstat (limited to 'tools/regression/lib')
-rw-r--r-- | tools/regression/lib/libc/nss/mach | 47 | ||||
-rw-r--r-- | tools/regression/lib/libc/resolv/mach | 47 | ||||
-rw-r--r-- | tools/regression/lib/msun/test-ctrig.c | 2 | ||||
-rw-r--r-- | tools/regression/lib/msun/test-exponential.c | 13 | ||||
-rw-r--r-- | tools/regression/lib/msun/test-fma.c | 40 | ||||
-rw-r--r-- | tools/regression/lib/msun/test-invctrig.c | 8 | ||||
-rw-r--r-- | tools/regression/lib/msun/test-invtrig.c | 27 |
7 files changed, 71 insertions, 113 deletions
diff --git a/tools/regression/lib/libc/nss/mach b/tools/regression/lib/libc/nss/mach index ab7ce24..4b47ebb 100644 --- a/tools/regression/lib/libc/nss/mach +++ b/tools/regression/lib/libc/nss/mach @@ -1,32 +1,17 @@ # $FreeBSD$ localhost -above.warped.net anoncvs.cirr.com -anoncvs.isc.netbsd.org -anoncvs.leo.org -anoncvs.netbsd.lt -anoncvs.netbsd.ro anoncvs.netbsd.se antioche.antioche.eu.org -boulder.tele.dk centaurus.4web.cz chur.math.ntnu.no console.netbsd.org -cvs.fi.netbsd.org -cvs.mikrolahti.fi cvs.netbsd.org -cvsup-netbsd.leo.org cvsup.netbsd.se -cvsup.pasta.cs.uit.no -ftp.bitcon.no ftp.chg.ru -ftp.duth.gr ftp.estpak.ee ftp.fsn.hu ftp.funet.fi -ftp.grondar.za -ftp.leo.org -ftp.netbsd.lt ftp.netbsd.org ftp.nluug.nl ftp.plig.org @@ -34,60 +19,28 @@ ftp.uni-erlangen.de ftp.xgate.co.kr gd.tuwien.ac.at gort.ludd.luth.se -grappa.unix-ag.uni-kl.de -info.wins.uva.nl irc.warped.net knug.youn.co.kr -lala.iri.co.jp mail.jp.netbsd.org -mail.kr.netbsd.org mail.netbsd.org melanoma.cs.rmit.edu.au mirror.aarnet.edu.au -mirror.netbsd.com.br -mirror03.inet.tele.dk moon.vub.ac.be -nbwww.sergei.cc net.bsd.cz netbsd.3miasto.net netbsd.4ka.mipt.ru -netbsd.apk.od.ua netbsd.csie.nctu.edu.tw netbsd.enderunix.org netbsd.ftp.fu-berlin.de -netbsd.netlead.com.au -netbsd.nsysu.edu.tw netbsd.pair.com -netbsd.stevens-tech.edu -netbsd.triada.bg -netbsd.unix.net.nz -netbsd.unixtech.be -netbsd.vejas.lt -netbsd.wagener-consulting.lu -netbsd.zarco.org netbsdiso.interoute.net.uk -netbsdwww.bitcon.no -netbsdwww.cordef.com.pl netbsdwww.cs.rmit.edu.au netbsdwww.interoute.net.uk -news.gw.com ns.netbsd.org -pigu.iri.co.jp -pluto.cdpa.nsysu.edu.tw -projects.slowass.net -server6.pasta.cs.uit.no skeleton.phys.spbu.ru -snoopy.allbsd.org -spike.allbsd.org -sundry.netbsd.org -tanya.sergei.cc -web-a.fi.gw.com -web-a.us.gw.com -web.netbsd.mirror.arhea.net www.en.netbsd.de www.netbsd.cl www.netbsd.nl www.netbsd.org www.netbsd.ro -zathras.netbsd.org zeppo.rediris.es diff --git a/tools/regression/lib/libc/resolv/mach b/tools/regression/lib/libc/resolv/mach index ab7ce24..4b47ebb 100644 --- a/tools/regression/lib/libc/resolv/mach +++ b/tools/regression/lib/libc/resolv/mach @@ -1,32 +1,17 @@ # $FreeBSD$ localhost -above.warped.net anoncvs.cirr.com -anoncvs.isc.netbsd.org -anoncvs.leo.org -anoncvs.netbsd.lt -anoncvs.netbsd.ro anoncvs.netbsd.se antioche.antioche.eu.org -boulder.tele.dk centaurus.4web.cz chur.math.ntnu.no console.netbsd.org -cvs.fi.netbsd.org -cvs.mikrolahti.fi cvs.netbsd.org -cvsup-netbsd.leo.org cvsup.netbsd.se -cvsup.pasta.cs.uit.no -ftp.bitcon.no ftp.chg.ru -ftp.duth.gr ftp.estpak.ee ftp.fsn.hu ftp.funet.fi -ftp.grondar.za -ftp.leo.org -ftp.netbsd.lt ftp.netbsd.org ftp.nluug.nl ftp.plig.org @@ -34,60 +19,28 @@ ftp.uni-erlangen.de ftp.xgate.co.kr gd.tuwien.ac.at gort.ludd.luth.se -grappa.unix-ag.uni-kl.de -info.wins.uva.nl irc.warped.net knug.youn.co.kr -lala.iri.co.jp mail.jp.netbsd.org -mail.kr.netbsd.org mail.netbsd.org melanoma.cs.rmit.edu.au mirror.aarnet.edu.au -mirror.netbsd.com.br -mirror03.inet.tele.dk moon.vub.ac.be -nbwww.sergei.cc net.bsd.cz netbsd.3miasto.net netbsd.4ka.mipt.ru -netbsd.apk.od.ua netbsd.csie.nctu.edu.tw netbsd.enderunix.org netbsd.ftp.fu-berlin.de -netbsd.netlead.com.au -netbsd.nsysu.edu.tw netbsd.pair.com -netbsd.stevens-tech.edu -netbsd.triada.bg -netbsd.unix.net.nz -netbsd.unixtech.be -netbsd.vejas.lt -netbsd.wagener-consulting.lu -netbsd.zarco.org netbsdiso.interoute.net.uk -netbsdwww.bitcon.no -netbsdwww.cordef.com.pl netbsdwww.cs.rmit.edu.au netbsdwww.interoute.net.uk -news.gw.com ns.netbsd.org -pigu.iri.co.jp -pluto.cdpa.nsysu.edu.tw -projects.slowass.net -server6.pasta.cs.uit.no skeleton.phys.spbu.ru -snoopy.allbsd.org -spike.allbsd.org -sundry.netbsd.org -tanya.sergei.cc -web-a.fi.gw.com -web-a.us.gw.com -web.netbsd.mirror.arhea.net www.en.netbsd.de www.netbsd.cl www.netbsd.nl www.netbsd.org www.netbsd.ro -zathras.netbsd.org zeppo.rediris.es diff --git a/tools/regression/lib/msun/test-ctrig.c b/tools/regression/lib/msun/test-ctrig.c index 9f9b88d..475b6c5 100644 --- a/tools/regression/lib/msun/test-ctrig.c +++ b/tools/regression/lib/msun/test-ctrig.c @@ -427,6 +427,7 @@ test_large(void) test_odd_tol(ctanh, z, CMPLXL(1.0, 8.95257245135025991216632140458264468e-309L), DBL_ULP()); +#if !defined(__i386__) z = CMPLXL(30, 0x1p1023L); test_odd_tol(ctanh, z, CMPLXL(1.0, -1.62994325413993477997492170229268382e-26L), @@ -436,6 +437,7 @@ test_large(void) CMPLXL(0.878606311888306869546254022621986509L, -0.225462792499754505792678258169527424L), DBL_ULP()); +#endif z = CMPLXL(710.6, 0.78539816339744830961566084581987572L); test_odd_tol(csinh, z, diff --git a/tools/regression/lib/msun/test-exponential.c b/tools/regression/lib/msun/test-exponential.c index 010e0fd..df552ee 100644 --- a/tools/regression/lib/msun/test-exponential.c +++ b/tools/regression/lib/msun/test-exponential.c @@ -66,13 +66,22 @@ __FBSDID("$FreeBSD$"); } while (0) /* Test all the functions that compute b^x. */ -#define testall0(x, result, exceptmask, excepts) do { \ +#define _testall0(x, result, exceptmask, excepts) do { \ test(exp, x, result, exceptmask, excepts); \ test(expf, x, result, exceptmask, excepts); \ test(exp2, x, result, exceptmask, excepts); \ test(exp2f, x, result, exceptmask, excepts); \ +} while (0) + +/* Skip over exp2l on platforms that don't support it. */ +#if LDBL_PREC == 53 +#define testall0 _testall0 +#else +#define testall0(x, result, exceptmask, excepts) do { \ + _testall0(x, result, exceptmask, excepts); \ test(exp2l, x, result, exceptmask, excepts); \ } while (0) +#endif /* Test all the functions that compute b^x - 1. */ #define testall1(x, result, exceptmask, excepts) do { \ @@ -102,12 +111,14 @@ run_generic_tests(void) testall0(-INFINITY, 0.0, ALL_STD_EXCEPT, 0); testall1(-INFINITY, -1.0, ALL_STD_EXCEPT, 0); +#if !defined(__i386__) /* exp(big) == Inf, overflow exception */ testall0(50000.0, INFINITY, ALL_STD_EXCEPT & ~FE_INEXACT, FE_OVERFLOW); testall1(50000.0, INFINITY, ALL_STD_EXCEPT & ~FE_INEXACT, FE_OVERFLOW); /* exp(small) == 0, underflow and inexact exceptions */ testall0(-50000.0, 0.0, ALL_STD_EXCEPT, FE_UNDERFLOW | FE_INEXACT); +#endif testall1(-50000.0, -1.0, ALL_STD_EXCEPT, FE_INEXACT); } diff --git a/tools/regression/lib/msun/test-fma.c b/tools/regression/lib/msun/test-fma.c index 1fcf889..7adbd81 100644 --- a/tools/regression/lib/msun/test-fma.c +++ b/tools/regression/lib/msun/test-fma.c @@ -31,11 +31,13 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include <sys/param.h> #include <assert.h> #include <fenv.h> #include <float.h> #include <math.h> #include <stdio.h> +#include <stdlib.h> #include "test-utils.h" @@ -473,44 +475,58 @@ int main(int argc, char *argv[]) { int rmodes[] = { FE_TONEAREST, FE_UPWARD, FE_DOWNWARD, FE_TOWARDZERO }; - int i; + int i, j; + +#if defined(__i386__) + printf("1..0 # SKIP all testcases fail on i386\n"); + exit(0); +#endif + + j = 1; printf("1..19\n"); - for (i = 0; i < 4; i++) { + for (i = 0; i < nitems(rmodes); i++, j++) { + printf("rmode = %d\n", rmodes[i]); fesetround(rmodes[i]); test_zeroes(); - printf("ok %d - fma zeroes\n", i + 1); + printf("ok %d - fma zeroes\n", j); } - for (i = 0; i < 4; i++) { + for (i = 0; i < nitems(rmodes); i++, j++) { + printf("rmode = %d\n", rmodes[i]); fesetround(rmodes[i]); test_infinities(); - printf("ok %d - fma infinities\n", i + 5); + printf("ok %d - fma infinities\n", j); } fesetround(FE_TONEAREST); test_nans(); - printf("ok 9 - fma NaNs\n"); + printf("ok %d - fma NaNs\n", j); + j++; - for (i = 0; i < 4; i++) { + for (i = 0; i < nitems(rmodes); i++, j++) { + printf("rmode = %d\n", rmodes[i]); fesetround(rmodes[i]); test_small_z(); - printf("ok %d - fma small z\n", i + 10); + printf("ok %d - fma small z\n", j); } - for (i = 0; i < 4; i++) { + for (i = 0; i < nitems(rmodes); i++, j++) { + printf("rmode = %d\n", rmodes[i]); fesetround(rmodes[i]); test_big_z(); - printf("ok %d - fma big z\n", i + 14); + printf("ok %d - fma big z\n", j); } fesetround(FE_TONEAREST); test_accuracy(); - printf("ok 18 - fma accuracy\n"); + printf("ok %d - fma accuracy\n", j); + j++; test_double_rounding(); - printf("ok 19 - fma double rounding\n"); + printf("ok %d - fma double rounding\n", j); + j++; /* * TODO: diff --git a/tools/regression/lib/msun/test-invctrig.c b/tools/regression/lib/msun/test-invctrig.c index 78b1119..34e78a1 100644 --- a/tools/regression/lib/msun/test-invctrig.c +++ b/tools/regression/lib/msun/test-invctrig.c @@ -281,21 +281,21 @@ test_axes(void) for (i = 0; i < sizeof(nums) / sizeof(nums[0]); i++) { /* Real axis */ z = CMPLXL(nums[i], 0.0); - if (fabs(nums[i]) <= 1) { + if (fabsl(nums[i]) <= 1) { testall_tol(cacosh, z, CMPLXL(0.0, acos(nums[i])), 1); testall_tol(cacos, z, CMPLXL(acosl(nums[i]), -0.0), 1); testall_tol(casin, z, CMPLXL(asinl(nums[i]), 0.0), 1); testall_tol(catanh, z, CMPLXL(atanh(nums[i]), 0.0), 1); } else { testall_tol(cacosh, z, - CMPLXL(acosh(fabs(nums[i])), + CMPLXL(acosh(fabsl(nums[i])), (nums[i] < 0) ? pi : 0), 1); testall_tol(cacos, z, CMPLXL((nums[i] < 0) ? pi : 0, - -acosh(fabs(nums[i]))), 1); + -acosh(fabsl(nums[i]))), 1); testall_tol(casin, z, CMPLXL(copysign(pi / 2, nums[i]), - acosh(fabs(nums[i]))), 1); + acosh(fabsl(nums[i]))), 1); testall_tol(catanh, z, CMPLXL(atanh(1 / nums[i]), pi / 2), 1); } diff --git a/tools/regression/lib/msun/test-invtrig.c b/tools/regression/lib/msun/test-invtrig.c index 2523d59..2110df4 100644 --- a/tools/regression/lib/msun/test-invtrig.c +++ b/tools/regression/lib/msun/test-invtrig.c @@ -63,14 +63,23 @@ __FBSDID("$FreeBSD$"); #define test(func, x, result, excepts) \ test_tol(func, (x), (result), 0, (excepts)) -#define testall_tol(prefix, x, result, tol, excepts) do { \ +#define _testall_tol(prefix, x, result, tol, excepts) do { \ test_tol(prefix, (double)(x), (double)(result), \ (tol) * ldexp(1.0, 1 - DBL_MANT_DIG), (excepts)); \ test_tol(prefix##f, (float)(x), (float)(result), \ (tol) * ldexpf(1.0, 1 - FLT_MANT_DIG), (excepts)); \ +} while (0) + +#if LDBL_PREC == 53 +#define testall_tol _testall_tol +#else +#define testall_tol(prefix, x, result, tol, excepts) do { \ + _testall_tol(prefix, x, result, tol, excepts); \ test_tol(prefix##l, (x), (result), \ (tol) * ldexpl(1.0, 1 - LDBL_MANT_DIG), (excepts)); \ } while (0) +#endif + #define testall(prefix, x, result, excepts) \ testall_tol(prefix, (x), (result), 0, (excepts)) @@ -83,14 +92,23 @@ __FBSDID("$FreeBSD$"); #define test2(func, y, x, result, excepts) \ test2_tol(func, (y), (x), (result), 0, (excepts)) -#define testall2_tol(prefix, y, x, result, tol, excepts) do { \ +#define _testall2_tol(prefix, y, x, result, tol, excepts) do { \ test2_tol(prefix, (double)(y), (double)(x), (double)(result), \ (tol) * ldexp(1.0, 1 - DBL_MANT_DIG), (excepts)); \ test2_tol(prefix##f, (float)(y), (float)(x), (float)(result), \ (tol) * ldexpf(1.0, 1 - FLT_MANT_DIG), (excepts)); \ +} while (0) + +#if LDBL_PREC == 53 +#define testall2_tol _testall2_tol +#else +#define testall2_tol(prefix, y, x, result, tol, excepts) do { \ + _testall2_tol(prefix, y, x, result, tol, excepts); \ test2_tol(prefix##l, (y), (x), (result), \ (tol) * ldexpl(1.0, 1 - LDBL_MANT_DIG), (excepts)); \ } while (0) +#endif + #define testall2(prefix, y, x, result, excepts) \ testall2_tol(prefix, (y), (x), (result), 0, (excepts)) @@ -431,6 +449,11 @@ int main(int argc, char *argv[]) { +#if defined(__i386__) + printf("1..0 # SKIP fails all assertions on i386\n"); + return (0); +#endif + printf("1..7\n"); test_special(); |