Bill James

Results 15 comments of Bill James

[bernoulli_gmpy2.py.zip](https://github.com/aleaxit/gmpy/files/5969581/bernoulli_gmpy2.py.zip) I am running on a mac and probably would have difficulty building it. I had deleted the gmpy version of the bernoulli code but I made a stab at...

That is already a big improvement. Looking forward to what you come up with in the end. I think mpmath is doing the exponentiation in floating point and a standard...

I spent some time today and extracted the integer power code from mpmath and created a test script using it. I even was able to get it working with mpfrs...

[pow_int.py.zip](https://github.com/aleaxit/gmpy/files/6000089/pow_int.py.zip) When I brought over the mpmath code, I left out a bit that appears to be significant. The attached version includes it. It still produces answers that are sometimes...

I decided to concentrate on a function that only handled integer powers and updated the code to have a function mpfr_pow_int_int(m, n, prec) which returns a mpfr that is m...

I plugged the mpfr_pow_int_int function into the original test code that I posted and got the below results: mpmath time: 74.97047686576843 gmpy2 time: 99.737459897995 -8.1239576158479399e-1273471 On the order of the...

Added function mpfr_pow_int(m, n, prec) to accept mpfr parameter as base. Cleaned up code and made some changes needed for negative input and bases. [pow_int.py.zip](https://github.com/aleaxit/gmpy/files/6005106/pow_int.py.zip)

I now think that the python pow functions that I created from the mpmath code are performance wise equal to the mpmath version. In fact it might be slightly faster....

changing the line `zeta_prod *= f_one - p_mn` in the test code to: `zeta_prod = zeta_prod - zeta_prod * p_mn` I get the below results: mpmath time: 47.429802894592285 gmpy2 time:...

I'm good for now, no need to rush a solution. I am refactoring my bernoulli code due to the changed line: `zeta_prod = zeta_prod - zeta_prod * p_mn` My parallel...