Menu

#2836 is(equal(...)) leads to slow factor(...)

None
open
nobody
None
5
2015-03-02
2014-11-05
Nils Bruin
No

Not so much a bug per se, but something that takes perhaps a little longer than it should and hence might benefit from some attention:

is (equal(1,exp(256*(x+1))));

takes surprisingly long to arrive at the answer "unknown". It seems this is caused by a factorization attempt (smaller example):

(%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'm not sure there is actually something that can be done about this. Robert requested a report for this at sage-devel: https://groups.google.com/d/msg/sage-devel/L-92S0eLOqY/2MnI2lPyb_IJ

Discussion

  • Gunter Königsmann

    I assume this to be another symptom of Issue #2851.

     
  • Nils Bruin

    Nils Bruin - 2015-03-02

    The issue you mention (not the one you link to--the link is just to this ticket) seems to be concerned with mishandling/overflow of the facts database. The particular issue here is traced back to a very time-consuming factorization (see the remark by Robert Dodier about a stack trace on the group discussion linked to). It would surprise me if this factorization makes any references to the facts database, so I would expect these two issues to be relatively independent.

     

Log in to post a comment.