Positive add and mul, LaTeX printing
Dear All, I think it would be nice if GiNaC will learn that a sum or product of two positive expressions is again a positive expression. This will help, for example, to simply formulae like ((1+x)^{1/2})^2, where x is a positive symbol. It would be also a better LaTeX printing of complicated formulae if \mathrm will be used instead of \mbox (the later is not scaled in fractions, for example). I am attaching a patch which makes these two things. Best wishes, Vladimir -- Vladimir V. Kisil email: kisilv@maths.leeds.ac.uk -- www: http://maths.leeds.ac.uk/~kisilv/
Hi, On Tue, Sep 15, 2009 at 02:22:45PM +0100, Vladimir V. Kisil wrote:
I think it would be nice if GiNaC will learn that a sum or product of two positive expressions is again a positive expression.
Sounds sensible.
This will help, for example, to simply formulae like ((1+x)^{1/2})^2, where x is a positive symbol.
I hope no simplifications of this kind will be done automatically.
It would be also a better LaTeX printing of complicated formulae if \mathrm will be used instead of \mbox (the later is not scaled in fractions, for example).
I agree.
I am attaching a patch which makes these two things.
\begin{tip} Your patch does two absolutely unrelated things. It's better to spilt such patches into independent parts (this makes merging and identifying bugs a bit simpler). \end{tip} Best regards, Alexei
On Tue, 15 Sep 2009 20:33:36 +0300, Alexei Sheplyakov <varg@metalica.kh.ua> said: ASh> \begin{tip} ASh> Your patch does two absolutely unrelated things. It's better to ASh> spilt such patches into independent parts (this makes merging ASh> and identifying bugs a bit simpler). ASh> \end{tip}
Yes, I will do this the next time Best wishes, Vladimir -- Vladimir V. Kisil email: kisilv@maths.leeds.ac.uk -- www: http://maths.leeds.ac.uk/~kisilv/
participants (2)
-
Alexei Sheplyakov
-
Vladimir V. Kisil