Re: Correction of a minor bug

6 views
Skip to first unread message

Burcin Erocal

unread,
Jul 15, 2012, 3:36:34 PM7/15/12
to pynac...@googlegroups.com
Hi Sebastien,

On Sun, 15 Jul 2012 09:25:35 -0700 (PDT)
Sebastien Gouezel <sebastie...@gmail.com> wrote:

> I stumbled recently on a very minor bug in Sage: the output of
> latex(x^(2/3)) gives no parentheses around the exponent 2/3 (this
> seems to be a reasonable behavior), but in more complicated
> expressions like latex(x^(2/3)+1), parentheses are put around the
> exponent. Even worse, in latex(x^(2/3)+x^(-2/3)), there are
> parentheses around the positive exponent, but not around the negative
> one!
>
> I traced this to pynac, more precisely to the file ginac/power.cpp,
> line 204, which is currently "exponent.print(c, level)"
> This line shoud rather be exponent.print(c, 0), I see no reason why
> the level should be used in the printing of the exponent.

many thanks for tracking this down. I committed the patch already:

https://bitbucket.org/burcin/pynac/changeset/3fcc1e99171f


We should also open a ticket on the Sage tracker for doctest fixes.


Cheers,
Burcin

Sebastien Gouezel

unread,
Jul 16, 2012, 4:35:24 PM7/16/12
to pynac...@googlegroups.com


I added a patch fixing the doctests to the sage tracker (ticket #13262)
Reply all
Reply to author
Forward
0 new messages