#653 freeof (exp, exp(x)) yields true

Lisp Core (471)

freeof (exp, exp(x)) => true
freeof (sin, sin(x)) => false
(kill (f), freeof (f, f(x))) => false

Exponentials are always stored as %e^something, so
freeof (%e, exp(x)) => false

Dunno what is the right policy here. Substituting %e
for exp in the argument list (which is consistent with
the otherwise universal policy of substituting %e^x for
exp(x)) won't work right:
freeof (exp, exp(x)) hypothetically => false (OK)
freeof (exp, %e*2) hypothetically => false (OOPS)

Another answer is to not substitute %e^x for exp(x) but
that will have widespread effects (to put it mildly).


  • Stavros Macrakis

    Logged In: YES

    This is not a freeof issue.

    It is not that exponentials are "stored as" %e^x, it is that
    the expression exp(x) is simplified to %e^x. The function
    'exp' just never appears in a simplified expression.

    Similarly sin(%i) simplifies to %i*sinh(1). Surely you
    don't expect freeof to "find" the sin in %i*sinh(1) or to
    "find" the exp in 2^n (which is precisely equivalent to

    Of course, Maxima is not completely consistent about when it
    canonicalizes and when it does not (even when this is
    feasible). For example, by default it does *not* simplify
    exp(n*log(2)) to 2^n, but to %e^(log(2)*n); it does not
    simplify n! to gamma(n+1); etc.

  • Robert Dodier

    Robert Dodier - 2005-01-25

    Logged In: YES

    Based on comments from Stavros, I'm closing this as a
    non-bug; the observed effect is a consequence of
    simplification. I'll add something about the effect of
    simplification to the freeof description.

  • Robert Dodier

    Robert Dodier - 2005-01-25
    • status: open --> closed

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

Sign up for the SourceForge newsletter:

No, thanks