# [Maxima] format package and exp

Javier Sanchez javier_home at terra.es
Thu Mar 1 10:47:27 CST 2007

```  Thanks for your help.

The definition for the exptest(f) function that you suggest works fine.

I am sure that there must be something that can be done with tellsimp but I
find format more convenient in my case.

These are some of the things that I know how to do with "format" and your
help. In no way I mean that you can not do it with standard comands and
maybe
tellsimp, just that I do not know how.

I can define different test functions so that I can apply different
simplifications

exptest1(f):=not(atom(f)) and inpart(f,0)="^" and inpart(f,1)=%e and not
freeof(Ic1,f)\$
exptest2(f):=not(atom(f)) and inpart(f,0)="^" and inpart(f,1)=%e and not
freeof(Ic2,f)\$
logtest(f):=not(atom(f)) and op(f)='log\$
.
.
.

I can do some simplifications like the following

format(foo,%match(exptest1),%arg(2),((Rq*Ic1*(1+x))/(2*Vt*A2*(B+1)))*(%poly(A1)-1),%factor)

where I use the semantic description of the desired form (I tell Maxima
the form that I want).

Thanks for your help and interest

Javi

Richard Fateman escribió:

>1. Whatever simplification you have in mind for the power Z in %e^Z, why
>don't you use tellsimp for this process, if it is not already something done
>by maxima? You have not said what simplification you have in mind, so maybe
>a built-in program (like ratsimp) does it already.
>
>2.  you could do this:  exptest(f):= (not (atom(f)) and op(f)="^" and
>inpart(f,1)=%e.
>
>RJF
>
>
>
>>-----Original Message-----
>>From: maxima-bounces at math.utexas.edu
>>[mailto:maxima-bounces at math.utexas.edu] On Behalf Of Javier Sanchez
>>Sent: Thursday, March 01, 2007 1:52 AM
>>To: maxima at math.utexas.edu
>>Subject: [Maxima] format package and exp
>>
>>What I want to do is to simplify the argument of the
>>exponential function.
>>
>>I am using the "format" package and I konw how to simplify
>>the argument
>>of different operators by building test functions.
>>
>>What I do not know is how to do it with the exponential
>>function. I know
>>that exp(x) is automatically simplified to %e^x. What I want
>>to do is to
>>find
>>a way of finding the argument of the exponential in an
>>expression, i.e.
>>build the
>>equivalent of the following function
>>
>>logtest(f):=not(atom(f)) and op(f)='log
>>
>>but with the exponential
>>
>>exptest(f):=not(atom(f) and op(f)='the exponential operator
>>in the rigth
>>form
>>
>>Thanks
>>
>>Javi
>>
>>
>>
>>______________________________________________
>>LLama Gratis a cualquier PC del Mundo.
>>Llamadas a fijos y msviles desde 1 cintimo por minuto.
>>http://es.voice.yahoo.com
>>
>>
>>
>
>
>
>
>

______________________________________________
LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
```