Dear all, while working with print_latex(), I found the following unexpected behaviour: the expression `p' is assigned the value 1/2-1/2*I, but then it is transformed into the following latex form: \frac{1}{2}\frac{-1}{2} i I am using version 1.0.11. Best wishes Alessandro Zaccagnini #include <iostream> #include <ginac/ginac.h> using namespace GiNaC; int main() { GiNaC::ex p; p = numeric(1)/2 + numeric(-1)/2*I; std::cout << p << " "; p.print(print_latex(std::cout)); return 0; }
Hi! On Wed, Oct 23, 2002 at 10:53:47AM +0200, Alessandro Zaccagnini wrote:
the expression `p' is assigned the value 1/2-1/2*I, but then it is transformed into the following latex form: \frac{1}{2}\frac{-1}{2} i
Fixed. Negative fractions are now output as -\frac{n}{d} instead of \frac{-n}{d} (the rest of the code seemed to expect this behavior; this is why the plus sign was missing). Bye, Christian -- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/
participants (2)
-
Alessandro Zaccagnini
-
Christian Bauer