(%i32) n:9,a:0,b:3,x:-5/6;
(%o32) 9
(%i33) orthopoly_returns_intervals : true;
(%o33) true
(%i34) exact : float(jacobi_p(n,a,b,x));
(%o34) 0.5660762409911204
(%i35) approx : jacobi_p(n,float(a),float(b),float(x));
(%o35) interval(0.5660762409910873, 3.1780473026681246e-14)
(%i36) abs(exact - part(approx, 1)) <= part(approx, 2);
(%o36) 3.3084646133829665e-14 <= 3.1780473026681246e-14
This is a failing test case from rtest_orthopoly.mac. The test generates random inputs, and the values above cause a failure.
jacobi_p calls hypergeo21, which gives an error interval. The test checks that the exact rational result falls within this error interval. I think that the problem is that there is already some imprecision in the input to hypergeo21. In this case, hypergeo21 is called with 11/12 in the exact version, but the floating point version of (1+5/6)/2 = 11/12 generates 0.9166666666666667d0, where as float(11/12) gives 0.9166666666666666d0.
increased tolerance to account for rounding in conversion of initial rational to float
[3af1fb3b4b9270359aa8a77ebe2e86a5fbbc6d1d]
Related
Commit: [3af1fb]