Description of problem: Assertion failed for import gmpy2;x=14098670982472701L;mod=(2L**27-1);assert (x % mod) == gmpy2.remainder(x,mod) Version-Release number of selected component (if applicable): python2-gmpy2.x86_64 2.0.8-1.fc24 mpfr-devel.x86_64 3.1.4-1.fc24 How reproducible: see description Actual results: assertion failed Expected results: passed Additional info: Please update to the latest upstream, mpfr-3.1.5 with gmpy2-2.0.8 compiled from source works fine.
mpfr-3.1.5-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-2a8c61e1cb
Did not work for me : dnf remove python2-gmpy2 mpfr-devel dnf --enablerepo=updates-testing --releasever=25 install python2-gmpy2-2.0.8-2.fc25 mpfr-devel-3.1.5-1.fc25 python see OP
mpfr 3.1.5 for fedora 24 is on the way.
mpfr-3.1.5-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-6c9d0d9a4f
mpfr-3.1.5-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.
Still broken, I am thrilled with the quality assurance. Please kindly try to run commands I posted. https://bugzilla.redhat.com/show_bug.cgi?id=1384480#c2
gmpy2.remainder(gmpy2.mpfr('14098670982472701'),gmpy2.mpfr('134217727')) -> mpfr('33159505.0') with gmpy2.local_context(gmpy2.context(), precision=100) as ctx: gmpy2.remainder(gmpy2.mpfr('14098670982472701'),gmpy2.mpfr('134217727')) -> mpfr('33159506.0',100) Voila! Please kindly think before you type and RTFM before you file a bug. Otherwise you only get ridiculed and your bug reports closed (sometimes even the meaningful ones once you build your reputation). Try to file a bug against a correct component. If you think mpfr is buggy, prepare a reproducer using mpfr, not some weird wrapper library written in some funny language which even changes behavior of its division operator from time to time. Read some basics about floating point numbers, like https://ece.uwaterloo.ca/~dwharder/NumericalAnalysis/02Numerics/Double/paper.pdf or https://people.eecs.berkeley.edu/~wkahan/ If your number exceeds approximately 2^50, you will get wrong results unless you do something with precision. If you want quality assurance, pay for rhel. And again, read the documentation before you file a bug.
echo 'scale=100;l(14098670982472701)/l(2)' | bc -l -> 53.646... Your number takes more than 53 bits. Setting 54 bits by gmpy2.local_context(gmpy2.context(), precision=54) is sufficient for a correct result, so I guess the computation done by mpfr is correct. If you think otherwise, please explain (of course I might be wrong).
mpfr-3.1.5-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.