Hi: The output of sympy.ccode(1+sympy.I) is '1+I'
However, in c++14 mode, like g++ -std=c++14 source.cpp, the g++ compiler does not think I is the imaginary unit. But in the http://en.cppreference.com/w/cpp/numeric/complex, I know that after using namespace std::complex_literals; I can use 1i to represent the imaginary unit. So how to tell ccode not to convert sympy.I into I but 1i? I just know that there just exists ccode to convert sympy expression into c code. But I can not find any cppcode to convert sympy expression into c++ code. -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/4177732d-3956-4f12-b2b9-7edc27e845a4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
