[sympy] Re: Printing Precision

2009-02-20 Thread Ondrej Certik
On Fri, Feb 20, 2009 at 11:37 AM, William Purcell wrote: >> If you want, as an exercise, try to run all sympy tests with your >> patch to see if something gets broken. > > I ran the test_evalf test. (see Issue 1052). I will try running the other > tests. > Is there a 'top-level' script to do this

[sympy] Re: Printing Precision

2009-02-20 Thread William Purcell
> If you want, as an exercise, try to run all sympy tests with your > patch to see if something gets broken. I ran the test_evalf test. (see Issue 1052). I will try running the other tests. Is there a 'top-level' script to do this? > If not, t

[sympy] Re: Printing Precision

2009-02-20 Thread Ondrej Certik
On Fri, Feb 20, 2009 at 7:32 AM, William Purcell wrote: > > A hack I'm going to use for now is changing the return in > str.StrPrinter._print_Real to the following > > class StrPrinter > ... > ... >   def _print_Real(self, expr): >        prec = expr._prec >        if prec < 5: >            d

[sympy] Re: Printing Precision

2009-02-20 Thread William Purcell
>From re-reading issue 1052, it looks like this question has been answered. On Fri, Feb 20, 2009 at 9:32 AM, William Purcell wrote: > A hack I'm going to use for now is changing the return in > str.StrPrinter._print_Real to the following > > class StrPrinter > ... > ... > def _print_Real(s

[sympy] Re: Printing Precision

2009-02-20 Thread William Purcell
A hack I'm going to use for now is changing the return in str.StrPrinter._print_Real to the following class StrPrinter ... ... def _print_Real(self, expr): prec = expr._prec if prec < 5: dps = 0 else: dps = prec_to_dps(expr._prec) ret

[sympy] Re: Printing Precision

2009-02-19 Thread Ondrej Certik
Hi William, On Thu, Feb 19, 2009 at 8:57 PM, William Purcell wrote: > I have seen issues 1019 and 1052 on how to handle printing of sig. > digits but haven't seen a solution.  I am running the attached script > and getting things like > pH = > [ 95.0] > [-40.0] > [ 60