Comment #36 on issue 1052 by ondrej.certik: 2.0 * x**2 should print more  
nicely
http://code.google.com/p/sympy/issues/detail?id=1052

I refactored the StrPrinter and PrettyPrinter a bit and implemented a  
full_prec
profile option. Patches attached (discard the previous patch). Now it works  
like this:

In [1]: 3.4*x
Out[1]: 3.4⋅x

In [2]: 3.4*x/x
Out[2]: 3.40000000000000

In [3]: sstr(3.4*x, full_prec=True)
Out[3]: '3.40000000000000*x'

In [4]: sstr(3.4*x/x, full_prec=False)
Out[4]: '3.4'

In [5]: sstr(3.4*x/x, full_prec="auto")
Out[5]: '3.40000000000000'

In [6]: sstr(3.4*x, full_prec="auto")
Out[6]: '3.4*x'



The default is "auto".

What do you think about this behavior, is it ok now?

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to