Date: Fri, 13 Jan 2012 19:58:14 -0700 From: Ian Lepore <freebsd@damnhippie.dyndns.org> To: freebsd-arm@freebsd.org Cc: David Schultz <das@freebsd.org> Subject: Re: fenv.h fixes for softfloat Message-ID: <1326509894.48691.100.camel@revolution.hippie.lan> In-Reply-To: <20120111175516.GA99475@zim.MIT.EDU> References: <20120108183605.GA36775@zim.MIT.EDU> <1326144525.2199.32.camel@revolution.hippie.lan> <20120111052634.GA96534@zim.MIT.EDU> <20120111101833.GA88428@ci0.org> <1326291254.2419.55.camel@revolution.hippie.lan> <20120111175516.GA99475@zim.MIT.EDU>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2012-01-11 at 12:55 -0500, David Schultz wrote: > On Wed, Jan 11, 2012, Ian Lepore wrote: > > I can probably find time to work with it a bit more, I just wanted to > > quickly post the initial results, especially in case the feedback was > > along the lines of "thanks, but testing in an 8.2 environment won't > > work." We rely pretty heavily on floating point math on ARM at work, so > > I may even be able to dedicate some non-hobbyist cycles to it (it occurs > > to me that running the whole suite of regression tests now that we've > > upgraded from 6.2->8.2 would probably be wise). > > That would be great. A few of the libm regression tests and libm > functions depend on fenv.h working, by the way. But most of the > important stuff should work. These are the results of running all the regression tests (except those requiring complex number support) after applying the minor tweaks to David's original patches. The build and run conditions are the same as I mentioned earlier in the thread. I looked into why test-lrint failed, and got as far as determing that the rint() routine is raising FE_INVALID when it executes either of the two "w = TWO52[sx]" expressions in the routine. The path from there leads deep into places my innumeracy won't let me go. The other errors also look to be more related to numerical details of the implementation than to the changes in the environment support, and I'm really really not a math guy, so this seems like a good time to lob it back to someone who actually understands the code. ---------- test-conj ---------- 1..42 ok 1 # conjf(0.0 + 0.0I) ok 2 # conj(0.0 + 0.0I) ok 3 # conjl(0.0 + 0.0I) ok 4 # conjf(0.0 + 1.0I) ok 5 # conj(0.0 + 1.0I) ok 6 # conjl(0.0 + 1.0I) ok 7 # conjf(1.0 + 0.0I) ok 8 # conj(1.0 + 0.0I) ok 9 # conjl(1.0 + 0.0I) ok 10 # conjf(-1.0 + 0.0I) ok 11 # conj(-1.0 + 0.0I) ok 12 # conjl(-1.0 + 0.0I) ok 13 # conjf(1.0 + -0.0I) ok 14 # conj(1.0 + -0.0I) ok 15 # conjl(1.0 + -0.0I) ok 16 # conjf(0.0 + -1.0I) ok 17 # conj(0.0 + -1.0I) ok 18 # conjl(0.0 + -1.0I) ok 19 # conjf(2.0 + 4.0I) ok 20 # conj(2.0 + 4.0I) ok 21 # conjl(2.0 + 4.0I) ok 22 # conjf(0.0 + infI) ok 23 # conj(0.0 + infI) ok 24 # conjl(0.0 + infI) ok 25 # conjf(0.0 + -infI) ok 26 # conj(0.0 + -infI) ok 27 # conjl(0.0 + -infI) ok 28 # conjf(inf + 0.0I) ok 29 # conj(inf + 0.0I) ok 30 # conjl(inf + 0.0I) ok 31 # conjf(nan + 1.0I) ok 32 # conj(nan + 1.0I) ok 33 # conjl(nan + 1.0I) ok 34 # conjf(1.0 + nanI) ok 35 # conj(1.0 + nanI) ok 36 # conjl(1.0 + nanI) ok 37 # conjf(nan + nanI) ok 38 # conj(nan + nanI) ok 39 # conjl(nan + nanI) ok 40 # conjf(-inf + infI) ok 41 # conj(-inf + infI) ok 42 # conjl(-inf + infI) ---------- test-csqrt ---------- 1..15 ok 1 - csqrt ok 2 - csqrt ok 3 - csqrt ok 4 - csqrt ok 5 - csqrt ok 6 - csqrt ok 7 - csqrt ok 8 - csqrt ok 9 - csqrt ok 10 - csqrt ok 11 - csqrt ok 12 - csqrt ok 13 - csqrt ok 14 - csqrt ok 15 - csqrt ---------- test-exponential ---------- 1..3 ok 1 - exponential ok 2 - exponential ok 3 - exponential ---------- test-fenv ---------- 1..8 ok 1 - fenv ok 2 - fenv ok 3 - fenv ok 4 - fenv ok 5 - fenv ok 6 - fenv ok 7 - fenv ok 8 - fenv ---------- test-fma ---------- 1..19 ok 1 - fma zeroes ok 2 - fma zeroes ok 3 - fma zeroes ok 4 - fma zeroes ok 5 - fma infinities ok 6 - fma infinities ok 7 - fma infinities ok 8 - fma infinities ok 9 - fma NaNs ok 10 - fma small z ok 11 - fma small z ok 12 - fma small z ok 13 - fma small z ok 14 - fma big z ok 15 - fma big z ok 16 - fma big z ok 17 - fma big z ok 18 - fma accuracy Assertion failed: (fpequal((fmaf)((0x1.800002p+0), (0x1.800002p+0), (-0x1.000002p-46)), (0x1.200002p+1))), function test_double_rounding, file test-fma.c, line 456. Abort trap ---------- test-fmaxmin ---------- 1..12 ok 1 - big = 0, small = 0 ok 2 - big = 10, small = 9.999996185302734375 ok 3 - big = 10.000003814697265625, small = 10 ok 4 - big = -1, small = -1 ok 5 - big = -1, small = -0 fmaxl(0, nan) raised 0x1 fmaxl(0, nan) = nan, expected 0 fmaxl(nan, 0) raised 0x1 fminl(0, nan) raised 0x1 fminl(0, nan) = nan, expected 0 fminl(nan, 0) raised 0x1 FAILURE in rounding mode 0 not ok 6 - big = 0, small = nan fmaxl(inf, nan) raised 0x1 fmaxl(inf, nan) = nan, expected inf fmaxl(nan, inf) raised 0x1 fminl(inf, nan) raised 0x1 fminl(inf, nan) = nan, expected inf fminl(nan, inf) raised 0x1 FAILURE in rounding mode 0 not ok 7 - big = inf, small = nan ok 8 - big = inf, small = 0 ok 9 - big = -1, small = -inf ok 10 - big = 1, small = -inf fmaxl(nan, nan) raised 0x1 fmaxl(nan, nan) raised 0x1 fminl(nan, nan) raised 0x1 fminl(nan, nan) raised 0x1 FAILURE in rounding mode 0 not ok 11 - big = nan, small = nan ok 12 - big = 0, small = -0 ---------- test-ilogb ---------- 1..3 ok 1 - ilogb ok 2 - ilogbf Assertion failed: (i == e), function main, file test-ilogb.c, line 80. Abort trap ---------- test-invtrig ---------- 1..7 ok 1 - special ok 2 - atan2 special ok 3 - accuracy ok 4 - atan2 p2x ok 5 - tiny inputs ok 6 - atan huge inputs ok 7 - inverse ---------- test-logarithm ---------- 1..3 ok 1 - logarithm ok 2 - logarithm ok 3 - logarithm ---------- test-lrint ---------- 1..1 Assertion failed: (fetestexcept(FE_ALL_EXCEPT) == (0)), function run_tests, file test-lrint.c, line 81. Abort trap ---------- test-lround ---------- 1..1 Assertion failed: (fetestexcept(FE_ALL_EXCEPT) == (0)), function main, file test-lround.c, line 74. Abort trap ---------- test-nan ---------- 1..1 ok 1 - nan ---------- test-nearbyint ---------- 1..12 ok 1 # nearbyint(+-0) ok 2 # modf(+-0) ok 3 # nearbyint(+-0.5) ok 4 # modf(+-0.5) ok 5 # nearbyint(+-3.14159) ok 6 # modf(+-3.14159) ok 7 # nearbyint(+-65536.5) ok 8 # modf(+-65536.5) ok 9 # nearbyint(+-inf) Assertion failed: (fpequal(out, modf(in, &ipart))), function test_modf, file test-nearbyint.c, line 147. Abort trap ---------- test-next ---------- 1..5 ok 1 - next ok 2 - next ok 3 - next ok 4 - next 216: idd(nexttoward(INFINITY, DBL_MAX * 2.0L)) returned inf, expecting 0x1.fffffffffffffp+1023 Abort trap ---------- test-rem ---------- 1..2 ok 1 - rem ok 2 - rem ---------- test-trig ---------- 1..3 ok 1 - trig ok 2 - trig ok 3 - trig -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1326509894.48691.100.camel>