Re: [PATCH 1/1] This fixes issue 1329. Also: printing for math constants

2009-04-09 Thread Fabian Seoane
Tomek B wrote: > Sure. The problem was that ccode printer was giving wrong results, > Example: > ccode((2*tau)**Rational(7,2)) -> '8*pow(2,(1/2))*pow(tau,(7/2))' > > which is wrong (because 1/2 evaluates to 0 in C). I meant in the patch description. Please put that (git commit --amend) and I'll

[PATCH] Issue 1329: ccode printer wrong output + minor enhancements

2009-04-09 Thread Tomasz Buchert
--- sympy/printing/ccode.py| 21 + sympy/printing/tests/test_ccode.py | 27 ++- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/sympy/printing/ccode.py b/sympy/printing/ccode.py index e62786e..a1341b5 100644 --- a/sympy/p

Re: [PATCH 1/1] Fixed spelling in GAsympy.txt

2009-04-09 Thread Ondrej Certik
On Mon, Apr 6, 2009 at 1:49 PM, Aaron S. Meurer wrote: > > Yes.  The very fact that I noticed that that file had errors was that > I was searching the sympy directory for the word "derivative" and I > accidently typed "dervitive," which was one of the errors.  So you > aren't the only one. Thank

Re: [PATCH] Issue 1329: ccode printer wrong output + minor enhancements

2009-04-09 Thread Ondrej Certik
Looks good, this is in. Ondrej On Thu, Apr 9, 2009 at 3:51 PM, Tomasz Buchert wrote: > > --- >  sympy/printing/ccode.py            |   21 + >  sympy/printing/tests/test_ccode.py |   27 ++- >  2 files changed, 39 insertions(+), 9 deletions(-) > > diff

Re: make nsolve() easier to use for onedimensional functions

2009-04-09 Thread Ondrej Certik
On Wed, Apr 8, 2009 at 7:44 AM, Vinzent Steinberg wrote: > Two issues: > > Use nsolve(x, f, x0) or nsolve(f, x, x0)? Please note that solve(f, x) but > lambdify(x, f) is used. I would keep lambdify(x, f), as this is what python lambda is. But solve (f, x), as this is imho how solvers in scipy wo

Re: rename msolve() to nsolve() and use mpmath for numerical rootfinding

2009-04-09 Thread Ondrej Certik
./setup test_doc works, but ./setup.py test fails with: _ sympy.solvers.solvers.nsolve _ File "/home/ondrej/repos/sympy/sympy/solvers/solvers.py", line 826, in sympy.s

Re: Issue 1098 Patch

2009-04-09 Thread Ondrej Certik
On Sun, Apr 5, 2009 at 10:39 PM, Ondrej Certik wrote: > On Sun, Apr 5, 2009 at 1:57 PM, Luke wrote: >> So this was my first patch, I hope I did everything correctly.  I >> added tests for issue 1098 to make sure that >> >> (x * m/s).integrate((x, 1*s, 5*s)) == integrate(x*m/s,(x, 1*s, 5*s)) >> >