Test suite failures with cvs version?



Hello Ray,

the term you have found is a simple phase factor which is formulated very
general. This is not necessary within a numerically routine and can be changed
by a simple condition. I will post the new version. 

It is somethink like

-1/2(log(1/z) ... and all other terms 

is %i*pi if z is real and negative and otherwise zero.

This can be done in the bigfloat-routines too. I had already placed a comment on
this topic in the code.

Dieter Kaiser

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

Raymond Toy wrote:
> If you haven't figure it out already, the complex term comes from
> expintegral_ei(-1/2).  The other parts in %o36 actually come out to
> 1/4/sqrt(%e), both symbolically and numerically.
> 
> The issue is the expression
> 
> (- (* 0.5 (- (log z) (log (/ 1 z)))) (log (- z)))
> 
> in expintegral-ei.
> 
> If z is -0.5, this is 0.  If z is #c(-0.5 0), it is #c(0 3.14159).
> 
> I'll have to think some more about which is correct....

Here's the issue.  With cmucl, I get:

(log (/ -0.5)) -> #C(0.6931471805599453 3.141592653589793)
(log (/ #c(-0.5 0)) -> #C(0.6931471805599453 -3.141592653589793)

This happens because (/ #c(-0.5 0)) -> #c(-2.0 -0.0).  Hence, it is
below the negative axis and gets -pi*%i.

I'm guessing, but I think sbcl would have the same issue.  I think clisp
doesn't really deal with signed zeroes.  Ecl currently doesn't, but I
think it tries to in the CVS version.

Ray