andyvand / gmpy

Automatically exported from code.google.com/p/gmpy
GNU Lesser General Public License v3.0
0 stars 0 forks source link

mpz(1.721116539913617e-052) crashes #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from gmpy import mpz
>>> mpz(1.721116539913617e-052)

crashes Python.

Original issue reported on code.google.com by fredrik....@gmail.com on 29 Jul 2008 at 6:35

GoogleCodeExporter commented 9 years ago
This crash occurs on Windows but not on Linux. It appears to be a bug in GMP 
when 
compiled on Windows using mingw. I added a test in gmpy.c to force small vlaue 
of a 
float to zero before calling GMP.

Patch will be committed in a few minutes.

Original comment by casevh on 30 Jul 2008 at 4:12

GoogleCodeExporter commented 9 years ago
This turns out to be a bug in GMP 4.2.1 that is fixed in GMP 4.2.2. It is not OS
specific other than that I built the Windows binaries using GMP 4.2.1 because 
that
version of GMP is still licensed under LGPL 2+. 

Original comment by casevh on 2 Aug 2008 at 8:19