[Ecls-list] Maxima + ECL error in rtest8; difference between interpreted & compiled code
Robert Dodier
robert.dodier at gmail.com
Sun May 15 19:20:51 UTC 2011
Hi everybody, I've compiled Maxima (current version from Git) with
ECL (current version from CVS). The test suite runs with 2 unexpected
errors, both in rtest8. These errors originate from calls to quad_qags
which are expected to return a result close to 0.
Here is a similar case which appears to tickle the same bug:
quad_qags (cos(x), x, 0, 3.141592652327421);
=> quad_qags(cos(x), x, 0, 3.141592652327421, epsrel = 1.e-8,
epsabs = 0.0, limit = 200)
but it should return something like:
[1.262372063675304e-9, 2.2102239413565408e-14, 21, 2]
It appears that there's an error triggered when quad_qags is trying
to print a message about the result being inexact.
I find that loading some of the Lisp files (translated from Fortran)
enables quad_qags to complete without error. So I guess there
is a difference between compiled and interpreted code somewhere
in the SLATEC stuff.
:lisp (load "src/numerical/slatec/xermsg.lisp");
:lisp (load "src/numerical/slatec/xerprn.lisp");
:lisp (load "src/numerical/slatec/xersve.lisp");
quad_qags (cos(x), x, 0, 3.141592652327421);
***MESSAGE FROM ROUTINE DQAGS IN LIBRARY SLATEC.
***INFORMATIVE MESSAGE, PROG CONTINUES, TRACEBACK REQUESTED
* ABNORMAL RETURN
* ERROR NUMBER = 2
*
***END OF MESSAGE
=> [1.262372063675304e-9, 2.2102239413565408e-14, 21, 2]
as expected.
It appears that all 3 Lisp files have to be loaded -- I didn't find
a subset which enables Maxima to do the right thing.
Thanks for any light you can shed on this problem.
Robert Dodier
More information about the ecl-devel
mailing list