[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gcl-devel] rtest8.mac test failure
From: |
Robert Dodier |
Subject: |
Re: [Gcl-devel] rtest8.mac test failure |
Date: |
Wed, 2 Jul 2014 00:01:02 +0000 (UTC) |
User-agent: |
slrn/1.0.1 (Linux) |
On 2014-06-30, Camm Maguire <address@hidden> wrote:
> Greetings! When compiling some functions that were previously
> interpreted under gcl, I have one small test failure on 32bit intel
> only:
>
> ev (e7, alfa=2, vita=1); (of rtest8.mac)
>
> returns
>
> [0.052961027786557, 4.8572257327350623E-17, 50, 0]
>
> insead of
>
> [0.052961027786557, 5.551115123125785E-17, 50, 0]
I've modified that test so that the test on the second value is an
absolute error test (not a relative error as implemented by
float_approx_equal which is called by run_testsuite). I think that
will make the error ass when the values differ as you have shown.
I've pushed the change as commit aa3e9ab, shown below.
I didn't try to find any similar problems so there could be others.
best
Robert Dodier
PS.
diff --git a/tests/rtest8.mac b/tests/rtest8.mac
index de8417b..9d2749d 100644
--- a/tests/rtest8.mac
+++ b/tests/rtest8.mac
@@ -413,8 +413,14 @@ quad_qaws (foo (u), u, au, bu, alfa, vita, wfn,
epsrel=1e-8, epsabs=0.0, limit=4
e7 : ev (e7, foo(u)=1/u, au=1, bu=2, wfn=1);
quad_qaws (1/u, u, 1, 2, alfa, vita, 1, epsrel=1e-8, epsabs=0.0, limit=48);
-ev (e7, alfa=2, vita=1);
-[.05296102778655729, 5.551115123125782E-17, 50, 0];
+/* expect [.05296102778655729, 5.551115123125782E-17, 50, 0] */
+(ev (e7, alfa=2, vita=1),
+ [float_approx_equal (%%[1], .05296102778655729),
+ /* checking relative error is problematic when expected value is close to
zero; check absolute error instead */
+ is (abs (%%[2] - 5.551115123125782E-17) < float_approx_equal_tolerance),
+ is (%%[3] = 50),
+ is (%%[4] = 0)]);
+[true, true, true, true];
/* Tests for bfallroots. Same as the allroots tests above */
bfallroots(x=0);