This looks like a bug. The precision parameter is being ignored. Aaron Meurer
On Wed, Dec 16, 2020 at 11:51 AM jesse....@gmail.com <jesse.car...@gmail.com> wrote: > > Hi - > > Is it possible to set the precision of printed floating point values when > using ccode, cxxcode, etc? Using the 'precision' parameter does not seem to > do anything. > > For instance, the following: > T = sym.Symbol('T') > f = 0.00437791*T**2 > print(sym.cxxcode(f, precision=8)) > > produces: > > 0.0043779099999999996*std::pow(T, 2) > > Thanks. > > - Jesse > > > -- > 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 sympy+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/adfc7377-602e-4442-b5c3-aebd3d2c529dn%40googlegroups.com. -- 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 sympy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6J_fy%3DvDcu7WfJt1py7sYeN0U6Kn5ksnYQL0WAX2tiHgg%40mail.gmail.com.