defint.lisp and limit.lisp ver. 1-12-2012: gcl bug?



On Jan. 12, 2012, Dan Gildea wrote, in fixing and closing
bug # 3470385 - 
    integrate (exp (sqrt) ) gcl bug
the following:
------------------------------
>Fixed in limit.lisp and defint.lisp.
>We still need domain:complex to prevent (-1)^(2/3) => -1.
>
>(%i4) domain:complex;
>(%o4) complex
>(%i5) integrate(exp(sqrt(x^3)),x,0,1);
>(%o5) 2*((-1)^(1/3)*gamma_incomplete(2/3,-1)-(-1)^(1/3)*gamma(2/3))/3
--------------------------------------------

I have downloaded the new limit.lisp and new defint.lisp
from git, and ** gcl **  does not get the same results.
Effectively a meaningless result is returned, so I can
not check the above.

----------------------------------------------------------------
Maxima 5.25.1 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)

(%i1) load("defint-new.lisp");
(%o1) "c:/work2/defint-new.lisp"

(%i2) load("limit-new.lisp");
(%o2) "c:/work2/limit-new.lisp"

(%i3) domain:complex;
(%o3) complex

(%i4) integrate(exp(sqrt(x^3)),x,0,1);

(%o4) %e^sqrt(x^3)
-------------------------------
Just to explore other options in gcl:
try domain = real and try
radexpand=false

first domain = real

(%i5) domain:real;
(%o5) real

(%i6) integrate(exp(sqrt(x^3)),x,0,1);
(%o6) %e^x^(3/2)

(%i7) radexpand;
(%o7) true

next domain = real, radexpand=false

(%i8) radexpand:false;
(%o8) false

(%i9) domain;
(%o9) real

(%i10) integrate(exp(sqrt(x^3)),x,0,1);
(%o10) %e^sqrt(x^3)

finally domain=complex, radexpand=false

(%i13) domain:complex;

(%o13) complex
(%i14) integrate(exp(sqrt(x^3)),x,0,1);
(%o14) %e^sqrt(x^3)
------------------------------------
On Jan 12 I wrote

>Here I consider a different (but related via a simple
>change of variables)  integral, and compare in detail
>the results from Maxima and Mathematica (using the
>Wolfram alpha site).
>(%i1) integrate(exp(y)/y^(4/5),y,1,2);
>(%o1) gamma_incomplete(1/5,-2)-gamma_incomplete(1/5,-1)

>/*  MMa NIntegrate[Exp[y]/y^(4/5),{y,1,2}] yields
>  
>    (-1)^(4/5)*(Gamma[1/5,-2] - Gamma[1/5,-1])    
>    
>    does not agree with Maxima, since in Mathematica
>    (-1)^(4/5) float value is not 1.0, whereas
>    is does have value 1.0 in Maxima.  */
>  
>
>(%i1) integrate(exp(y)/y^(4/5),y,1,2);
>(%o1) gamma_incomplete(1/5,-2)-gamma_incomplete(1/5,-1)

> etc.  
-----------------------------
Here I try that same integral using the defint-new.lisp
and limit-new.lisp (versions posted 1-12-2012)

(%i15) radexpand:true;
(%o15) true

(%i16) [radexpand,domain];
(%o16) [true,complex]

(%i17) integrate(exp(y)/y^(4/5),y,1,2);
(%o17) %e^y/y^(4/5)
--------------------------------------
The new defint.lisp (1-12-2012) does change the
evaluation of (-1)^(4/5) if domain=complex:

-----------------------------------
(%i18) (-1)^(4/5);
(%o18) (-1)^(4/5)

(%i19) float(%);
(%o19) 1.0*(-1)^(4/5)

(%i20) expand(float(rectform( (-1)^(4/5))));
(%o20) 0.58778525229247*%i-0.80901699437495

(%i21) domain;
(%o21) complex

(%i22) domain:real;
(%o22) real

(%i23) expand(float(rectform( (-1)^(4/5))));
(%o23) 1.0
---------------------------------------------

Ted Woollett