signum() evaluation is too slow



This would work.  This particular simplification would be applicable only to arguments to the signum() function.  I 
don't know if anyone would want a different simplifier just for signum() arguments.  Although the sin(), tan() and cos() 
functions could also benefit from a separate simplifier just for their arguments too.  Since sin(10^3000000*2*%pi+a) 
could be simplified to just sin(a).  Similar results apply to the other trig functions and also probably to the 
unit_step() function, I think.  Periodic functions created with pw.mac's periodic() function would also benefit.  I 
don't know how to create a Maxima function that does not simplify its arguments, so that the function could get the 
arguments "as is"?  I always get the result of the simplifier before my function gets started.

Rich

  From: Stavros Macrakis
  Sent: Saturday, January 30, 2010 2:23 PM
  To: Richard Hennessy
  Cc: maxima at math.utexas.edu
  Subject: Re: [Maxima] signum() evaluation is too slow


  Since x^7 is monotone increasing, wouldn't a better simplification be simply signum(x-1)?

  Anyway, the more basic question in this thread is: how much effort should a simplifying function make?  Earlier 
versions of Macsyma/Maxima were pretty conservative about this, on the theory that simplification should be a 
lightweight operation. With faster machines, we can afford to be less conservative today, but still need to be careful 
about 'heavy' operations like factorization.

                -s


  On Fri, Jan 29, 2010 at 6:32 PM, Richard Hennessy <rich.hennessy at verizon.net> wrote:


    I do think it would be cool if signum(x^7-1) could be converted to a product of signum()'s but not if it is done 
automatically.  It can be done by functions in pw.mac and in abs_integrate.mac, so perhaps factoring is not needed for 
the argument to signum().  Any thoughts?

    (%i1) (display2d:false,load(pw))$
    (%i2) factor(x^7-1);
    (out2) (x-1)*(x^6+x^5+x^4+x^3+x^2+x+1)
    (%i3) signum(x^7-1);
    (out3) signum(x^7-1)
    (%i4) simpsignum(%);
    (out4) signum(x-1)*signum(x^6+x^5+x^4+x^3+x^2+x+1)
    (%i5)

    Rich





    _______________________________________________
    Maxima mailing list
    Maxima at math.utexas.edu
    http://www.math.utexas.edu/mailman/listinfo/maxima