gmpy
gmpy copied to clipboard
General Multi-Precision arithmetic for Python 2.6+/3+ (GMP, MPIR, MPFR, MPC)
` from time import time import gmpy2 from gmpy2 import mpfr import mpmath as mpm from mpmath import mpf import math def primes_less_than(n): if n < 3: return [] if...
The Appveyor builds are failing on Windows. It looks like the conda-forge recipe provide an old version of MPFR. Is it possible to specify the most recent version of MPFR...
Releases
Could you please tag releases via github so its simpler for package maintainers to package the software?
Note: I am specifically discussing float/mpfr inputs. The behavior of the `math.ceil`, `math.floor`, `math.trunc`, and `round` changed between Python 2 and Python 3. In Python 2.x, a float was always...
Only the first of these expressions gives the correct result:- ``` Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:16:31) [MSC v.1600 64 bit (AMD64)] on win32 >>> from gmpy2 import mpz,...
I was trying to understand which of the many `is_X_prp` to use and I benchmarked all the prp functions in [colab](https://colab.research.google.com/drive/1i5Fr0Jt9IZlVGDAreRn94g4tZmhZ4YqK?authuser=0#scrollTo=yzoqALVPxbP8). I'm not sure if this is helpful for other...
I would like to complete the following before releasing 2.1.0b1: 1. Support the new thread-local storage C-API that will be introduced with Python 3.7. 2. Increase test coverage. 3. Add...
When constructing a mpfr from an mpfr the precision of the input is used not the context. ```python get_context().precision = 10 x = mpfr('0.3') # mpfr('0.2998',10) get_context().precision = 5 y...
[bug_report.txt](https://github.com/aleaxit/gmpy/files/96131/bug_report.txt) A simple floating-point addition x+y in with precision 4 (i.e. IEEE mantissa width 3), with 3 bits for exponent (emax=3, emin=-4) for x = mpfr('0.75'), y = mpfr('0.03125') incorrectly...
I am trying to port my gmpy2-using Python scripts to the Raspberry Pi2. I have the ARM dev tools installed on the Ubuntu sub-system for Windows 10. Instructions for cross-compiling...