Open GoogleCodeExporter opened 8 years ago
Actually only powers of 2 is affected.
Original comment by philippl...@gmail.com
on 19 Jul 2014 at 7:25
Does is work if you use a string? i.e. mpfr("0.5")
Original comment by casevh
on 19 Jul 2014 at 7:27
It apperas to work when it is a string.
Original comment by philippl...@gmail.com
on 19 Jul 2014 at 7:28
Interesting. What CPU do you have? (gmpy2 may be trying to use the instruction
set from a different CPU)
Original comment by casevh
on 19 Jul 2014 at 7:32
Intel i3 M 350 2.27 GHz
Original comment by philippl...@gmail.com
on 19 Jul 2014 at 7:34
[deleted comment]
Also, addition and subtraction gives the same error with powers of 2. So,
0.5 + mpfr(12.3)
or,
0.5 + mpfr(str(0.5))
breaks.
But,
mpfr(str(0.5))+mpfr(str(1.0))
works.
Original comment by philippl...@gmail.com
on 19 Jul 2014 at 7:43
This is strange. I can't recreate the issue. What happens if you try: mpfr(0) +
0.5
Can you test it outside of PyScripter?
What version of Python are you using?
Original comment by casevh
on 19 Jul 2014 at 7:43
I'll build a special version of gmpy2 to try and get better error messages.
That may take a couple of days.
What is the output of:
import sys
sys.version
Original comment by casevh
on 19 Jul 2014 at 8:03
Python 2.7
mpfr(0) + 0.5 breaks in PyScripter 2.5.3.0 x64
There are no problems due to this issue in IDLE shell, however.
Original comment by philippl...@gmail.com
on 19 Jul 2014 at 8:07
'2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)]'
Thanks for your replies, sounds like interesting work if anything.
Original comment by philippl...@gmail.com
on 19 Jul 2014 at 8:10
for your information, when used with pylab, the plotting sections,
pylab.ylim(0.0, 1.4*max(P))
would give an error when operating on a list of type mpfr, P. The following
workaround works though,
pylab.ylim(0.0, 1.4*float(max(P)))
Original comment by philippl...@gmail.com
on 19 Jul 2014 at 9:30
I've identified a possible cause. A test version is available at:
https://dl.dropboxusercontent.com/u/32175932/gmpy2-2.0.4.win-amd64-py2.7.exe
If it fixes this specific issue, there are still more changes I need to make
for a complete fix.
Original comment by casevh
on 21 Jul 2014 at 3:38
I've made 2.0.4b1 available via PyPI. Can you test the new version?
Original comment by casevh
on 5 Aug 2014 at 5:37
Sad to say that it still does not work. Thanks anyway. Sorry for not posting, I
am quite hesitant about these things. It is highly possible that there is a
problem with my PyScripter. My computer needs a remake, sorry again, and thanks
for all this.
I have a (conspiracy) theory that instead of compromising the ciphers that
people use, they compromise the rand stream. But that's another story...
Original comment by philippl...@gmail.com
on 5 Aug 2014 at 6:19
Btw, I confirm that gmpy2.version() gives:
'2.0.4b1'
Original comment by philippl...@gmail.com
on 5 Aug 2014 at 6:26
nvm about the cryptic comment, that almost misses the whole point
Original comment by philippl...@gmail.com
on 8 Aug 2014 at 3:57
Original issue reported on code.google.com by
philippl...@gmail.com
on 19 Jul 2014 at 7:23