[PURRS-devel] print_latex() bug

Alessandro Zaccagnini zaccagni at prmat.math.unipr.it
Wed Oct 23 10:53:47 CEST 2002


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;
}



More information about the PURRS-devel mailing list