#2202 plot2d problem from 5.24.0

closed
nobody
5
2012-08-18
2011-06-03
No

The following plot does not execute in recent releases of MAXIMA.
y(x):=log(abs(1/(1+exp(%i*x))))$
plot2d( y(x),[x,0.1,1])$

MAXIMA complains with "sign: argument cannot be imaginary; found %i"
but works with MAXIMA 5.20.1

Discussion

  • Aleksas

    Aleksas - 2011-06-07

    abs change to cabs:

    y(x):=log(cabs(1/(1+exp(%i*x))))$
    plot2d( y(x),[x,0.1,1])$

    work with maxima 5.24.0

     
  • sergio pesenti

    sergio pesenti - 2011-06-14

    Thanks alex. It works fine. However, I had some other trouble while defining my functions with cabs. For instance, the code

    simp:false$
    define(y(x),log(cabs(1/(1+exp(%i*x)))))$
    simp:true$
    y(1.0);

    does not evaluate completely the numerical value.
    But it works if I use ":=" to define the function. Here the code

    simp:false$
    y(x):=log(cabs(1/(1+exp(%i*x))))$
    simp:true$
    y(1.0);

    evaluates perfectly. I actually need to set "simp" to "false" because the expressions I deal with in my real case are quite complicated. I need to prevent a simplification at this stage to avoid MAXIMA to start an
    endless evaluation while defining my expressions.

     
  • Raymond Toy

    Raymond Toy - 2012-08-18

    Closing bug again (already was marked fixed).

     
  • Raymond Toy

    Raymond Toy - 2012-08-18
    • status: open --> closed
     

Log in to post a comment.