Test suite failures with cvs version?



Hello Ray,

Thank you very much for your work on the Exponential Integrals. 

The next time I would check in some changes to handle the tests for numerical
evaluation more consistent and correct.

You have posted:

>This is probably why maxima compute log(-z) incorrectly.  It does take the
>phase term of -z modulo 2*%pi.

I think the problem is more easy. With the default value for logexpand Maxima
simplifies log(1/z) to -log(z) and we get 1/2*(log(z)-(log(1/z)) = 0 for all
values. But we know that this is wrong for a negative real value. 

I have worked on this problem. But we have a lot of problems with the functions
for the complex components: abs (cabs), carg, signum, realpart, imagpart. Only
with a full support of this functions, it is possible to implement the complex
characteristics of the functions completely and to avoid errors e. g. with the
log function.

I have posted a complex sign function $csign on this mailing list and have
implemented the complex components completely. The testsuite had no problems
with the extensions, but I did not check in the code, because this code might
cause very subtle changes.

Dieter Kaiser

-----Urspr?ngliche Nachricht-----
Von: raymond.toy at ericsson.com [mailto:raymond.toy at ericsson.com] 
Gesendet: Dienstag, 28. Oktober 2008 17:40
An: Dieter Kaiser
Cc: maxima at math.utexas.edu
Betreff: Re: AW: [Maxima] Test suite failures with cvs version?

Dieter Kaiser wrote:
> Hello Ray,
> 
> It seems to me that I am a bit tired. Again I was too fast. I did the check
for
> conjugate values with different algorithm and not with conjugate values. 
> 
> Now I arrived at this routine:
> 
> (defun expintegral-ei (z)
>   (+
>     (- (expintegral-e 1 (- z)))
> ;    (- (* 0.5 (- (log z) (log (/ 1 z)))) (log (- z)))
>     (cond 
>       ((> (imagpart z) 0)
>        ;; Positive imaginary part. Add phase %i*%pi.
>        (complex 0 (float pi)))
>       ((< (imagpart z) 0)
>        ;; Negative imaginary part. Add phase -%i*%pi.
>        (complex 0 (- (float pi))))
>       ((> (realpart z) 0)
>        ;; Positive real value. Add phase -%i*pi.
>        (complex 0 (- (float pi))))
>        ;; Negative real value. No phase factor.
>       (t 0))))
> 
> Again the results I obtained with GCL:

I've checked this version in now, since all the exponential integral
tests pass on cmucl.

There is one issue with ecl where 169 fails for -1+14*%i, but it is due
to a bug in ecl.  This bug is supposed to be fixed in the CVS version of
yesterday or so, so I'm not going to do fix that in maxima.

Yay!  Now there are a couple more issues with cmucl and rtest_gamma,
where tests 264, 311, 313, and 319 fail.  Looks like the accuracy is a
bit off.  Since all other Lisps (clisp, gcl, ecl), I will blame cmucl
for this.  I need to look into this issue a bit more to see what the
actual problem is.

Ray