On 2014-11-04, Nils Bruin <nbr...@sfu.ca> wrote:

> sage DOES call Maxima with
>
> is (equal(1,exp(256*(x+1))));
>
> which indeed can take quite a while. In fact, profile data indicates nearly 
> all time reported is spent on that statement.

A stack trace shows that Maxima is trying to factor 1 - exp(256*(x + 1))
as an intermediate step in trying to figure out the sign (+, -, zero)
of that expression, which turns it into a mess and takes a long time;
I don't know where the time is eaten up. Smaller versions show how it
goes:

(%i1) display2d : false $
(%i2) showtime : true $
Evaluation took 0.0000 seconds (0.0001 elapsed) using 32 bytes.
(%i3) factor (1 - exp(8*(x + 1)));
Evaluation took 0.0280 seconds (0.0251 elapsed) using 401.672 KB.
(%o3) -(%e^(x+1)-1)*(%e^(x+1)+1)*(%e^(2*x+2)+1)*(%e^(4*x+4)+1)
(%i4) factor (1 - exp(32*(x + 1)));
Evaluation took 0.1960 seconds (0.1962 elapsed) using 6.866 MB.
(%o4) -(%e^(x+1)-1)*(%e^(x+1)+1)*(%e^(2*x+2)+1)*(%e^(4*x+4)+1)*(%e^(8*x+8)+1)
                   *(%e^(16*x+16)+1)
(%i5) factor (1 - exp(64*(x + 1)));
Evaluation took 1.4401 seconds (1.4433 elapsed) using 58.820 MB.
(%o5) -(%e^(x+1)-1)*(%e^(x+1)+1)*(%e^(2*x+2)+1)*(%e^(4*x+4)+1)*(%e^(8*x+8)+1)
                   *(%e^(16*x+16)+1)*(%e^(32*x+32)+1)

I don't know a work-around for is(equal(1,exp(256*(x+1)))). As always,
a bug report will be very helpful. http://sourceforge.net/p/maxima/bugs

Sorry I can't be more helpful,

Robert Dodier

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to