In this pull request:
https://github.com/sympy/sympy/pull/635
we have found a possible bug in mpmath, that Mario fixed with this patch:
https://github.com/pernici/sympy/commit/5745821120f01ff4638b5d87472649c307648800
Just see the pull request for background information. Do you think
that this patch should
be applied to mpmath upstream? It seems to fix the problem.
Ondrej
Yes, it probably should.
Mario, can you commit this to the mpmath svn repository?
Fredrik
On Sun, Oct 30, 2011 at 1:07 PM, mario <mario....@gmail.com> wrote:
> Hi Fredrik,
> I committed the same fix to mpmath which I put in sympy, but it does
> not work.
Thanks!
> I wanted to increase the precision in computing exp_pade; to do this I
> wrote in calculus.py
>
> ```
> if method == 'pade':
> prec = ctx.prec
> ctx.prec += 2*A.rows
> A = ctx.matrix(A)
> res = ctx._exp_pade(A)
> ```
>
> and it works in sympy, but not in mpmath.
> In fact putting e.g. `ctx.prec += 2*A.rows + 10` in mpmath nothing
> changes, putting it in sympy it increases the
> precision of norm(d,inf) in the test by 3 digits.
> If in mpmath in the test I increase `mp.dps` by `3` before calling
> `expm(a1, method='pade')` the precision of norm(d,inf) in the test
> increases by 3 digits.
> What am I doing wrong?
I don't know. I tried adding " + 10" as above and it decreased
norm(d,inf) in the test. All tests currently pass for me.
Fredrik