|
From: Stavros M. (Σ. Μ. <mac...@al...> - 2016-11-05 19:29:45
|
There is no standard way of doing that as far as I know.
But I've made a few changes to the output formatting routines which will
allow you to customize this behavior.
Just save the attached file somewhere then load("<full pathname>").
Then the variable showasnegexp will control this behavior:
Controls displaying A^-B as 1/A^B, where A is a mapatom.
If true, always displays as A^-B.
If false, never.
If a list of mapatoms, those are displayed as A^-B.
For example:
showasnegexp: [x]$
a/x => a*x^-1 << because x is in the list
1/a*1/x => x^-1/a
<< because a is not in the list
1/(1+x) => 1/(1+x) << only variables, not expressions, displayed like this
showasnegexp: true$
a/x => a*x^-1
1/a*1/x => a^-1*x^-1 << all variables shown like this
Hope this is useful. Feedback welcome.
-s
On Thu, Nov 3, 2016 at 11:23 AM, Graeme Paterson <gp...@ms...> wrote:
> On 11/3/2016 8:25 AM, Stavros Macrakis (Σταῦρος Μακράκης) wrote:
> > Please reply to the list; different people have different areas of
> > expertise. For example, I know nothing about wxMaxima.
> >
> > tex() (and for that matter string()) do respect exptdispflag, so the
> > necessary hooks are there.
> >
> > -s
> >
> > On Wed, Nov 2, 2016 at 8:05 AM, Graeme Paterson <gp...@ms...
> > <mailto:gp...@ms...>> wrote:
> >
> > On 11/1/2016 1:38 PM, Stavros Macrakis (Σταῦρος Μακράκης) wrote:
> > > Does exptdispflag:false do what you want?:
> > >
> > > (%i1) exptdispflag:false$
> > >
> > > (%i2) (x+1)/(x-1);
> > >
> > > - 1
> > > (%o2) (x - 1) (x + 1)
> > >
> > > (%i3) (x+1)+1/(x+2);
> > >
> > > - 1
> > > (%o3) (x + 2) + x + 1
>
> No. In your examples I want the negative exponent to only apply to x as
> in x^-1
>
>
> ------------------------------------------------------------
> ------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> _______________________________________________
> Maxima-discuss mailing list
> Max...@li...
> https://lists.sourceforge.net/lists/listinfo/maxima-discuss
>
|