#2243 stack overflow on floor of expression containing log(-1)

open
nobody
5
2017-03-06
2011-07-31
No

I find that this:

floor (log (2^(floor (log (- 1)) - 1) - 1));

causes a stack overflow. Happens w/ current Git Maxima + Clisp and SBCL.

Some similar examples just take a while to run to completion -- maybe it is not an unbounded recursion, but rather a problem that could be solved by using a bigger stack. I didn't investigate that.

That is the simplest example I could find -- removing some of the bits makes it run to completion.

Discussion

  • Barton Willis

    Barton Willis - 2011-08-01

    Also, rectform(log(2^floor(log(-1))-1) --> crash.

     
  • Robert Dodier

    Robert Dodier - 2017-03-06

    Another, less trivial example from the same source: floor(log(5*10^(floor(log(-56099/1125000)/log(10))-5)-56099/1125000)/log(10));

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks