Sergey B Kirpichev
Sergey B Kirpichev
PR ready for review: https://github.com/mpmath/mpmath/pull/924 Quadruple precision used per default, on my box: ``` $ time python demo/sofa.py 2.2195316688719674255462841007968 real 0m45.997s user 0m44.124s sys 0m0.340s ``` BTW, MathWorld's article seems...
PR https://github.com/python/cpython/pull/121672 is available for review. I think this should finally fix this issue.
@ambv, probably this may be closed
@bohdantan, I got on your example ``` >>> import mpmath ... ... def eqs(n, z): ... eq1 = mpmath.fdiv(mpmath.polylog(n-1, z), mpmath.polylog(n, z)) - 2.4193548387096775 ... eq2 = mpmath.fdiv(-mpmath.diff(lambda v: mpmath.polylog(v,...
CC @tornaria, as Sage people might be interested in this feature.
CC @oscarbenjamin, you may want this for python-flint
> I added a PyLongWriter API similar to what @encukou proposed. Yes, that looks better and should fix speed regression. I'll try to benchmark that, perhaps tomorrow. But cost is...
> My concern is to avoid the problem https://github.com/capi-workgroup/api-evolution/issues/36 : avoid exposing _PyLong_New() object until it's fully initialized. But _PyLong_New() doesn't create of incompletely initialized object. Yes, it's a garbage...
> The bits_per_limb is almost always the same as limb_bits unless it is like CPython's format ...or libtommath. It's like CPython's format, but... Not the same.
I did some testing for current version (an update to [this](https://github.com/python/cpython/pull/121339#discussion_r1665013092) benchmarking): ``` $ python -m timeit -r20 -s 'from gmpy2 import mpz;x=mpz(10**2)' 'int(x)' 2000000 loops, best of 20: 111...