I preprocessing this script with another python script and inserting
the values returned from latex() into a latex document, and some of
the equations are running off the page. How do I set the global
printing precision to make things look nicer?
Thanks,
Bill
This is a very annoying behaviour introduced with some merge of
mpmath, but I think the fix should be fairly easy, as described here:
http://code.google.com/p/sympy/issues/detail?id=1052#c22
I still hope Fredrik will find time to fix it, as he understands this
part the best, but if not, I'll try to look at it before a release and
fix it myself. Any help with this is appreciated.
Ondrej
class StrPrinter....
...
...
def _print_Real(self, expr):
prec = expr._prec
if prec < 5:
dps = 0
else:
dps = prec_to_dps(expr._prec)
return mlib.to_str(expr._mpf_, dps, strip_zeros=True)#<-- i
changed False to True
...
...
Should this not be the default? I am trying to think of an instance
where someone might want to keep all the zeros for a simple floating
point like 1.0 at 15 dps?
-Bill
If you want, as an exercise, try to run all sympy tests with your
patch to see if something gets broken. If not, try to send it as a
regular patch using git, see here for a tutorial:
http://docs.sympy.org/sympy-patches-tutorial.html#quick-start
Thanks,
Ondrej
Yes, just execute
bin/test sympy
Ondrej