#170 zeroequiv extremely slow (minor)

Lisp Core (471)


zeroequiv(expr,x) takes over a minute, though it is not at
all subtle how non-zero it is:

..., x=0.1 => -3.31-4.44i
..., x=0.9 => 6.39-4.44i
..., x=1.1 => 7.38
..., x=1.5 => 6.38
..., x=20 => 6.28

Zeroequiv is really supposed to be quick and dirty....


  • Robert Dodier

    Robert Dodier - 2006-07-01
    • labels: --> Lisp Core
  • Dieter Kaiser

    Dieter Kaiser - 2009-01-17
    • status: open --> pending
  • Dieter Kaiser

    Dieter Kaiser - 2009-01-17

    This bug report is related to SF[593530] "Zeroequiv issues". zeroequiv is not used for in core functions. Problems are known and documented. This is the result for the example:

    (%i9) expr:LOG(x^2+SQRT(2)*x+1)-LOG(x^2-SQRT(2)*x+1)+2*ATAN((2*x+SQRT(2))/SQRT(2))
    (%i10) zeroequiv(expr,x);
    (%o10) dontknow

    On a Windows system with GCL 2.6.8 and a CPU with 1.8 GHZ we get

    (%i11) for i:1 thru 100000 do zeroequiv(expr,x);
    Evaluation took 15.8900 seconds (15.8900 elapsed)
    (%o11) done

    One call to zeroequiv needs about 16/100,000 seconds. Setting resolution to "wont fix" and status to pending.

    Dieter Kaiser

  • Stavros Macrakis

    In Maxima 5.15, the original expression (but in lower case) takes 0.02 sec and correctly gives false.

    zeroequiv(LOG(1),x) correctly gives dontknow and returns instantaneously since Maxima function names are now lower-case (unlike in 2002 when the bug report was submitted).

    Closing as fixed.

  • Stavros Macrakis

    • status: pending --> closed

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

Sign up for the SourceForge newsletter:

No, thanks