Issue 207 in mpmath: 1000000000 decimal places crash.

2 views
Skip to first unread message

mpm...@googlecode.com

unread,
Apr 19, 2011, 4:53:24 PM4/19/11
to mpmath...@googlegroups.com
Status: New
Owner: ----

New issue 207 by matos.fr...@gmail.com: 1000000000 decimal places crash.
http://code.google.com/p/mpmath/issues/detail?id=207

What steps will reproduce the problem?
1. Give to a number a precision of 1000000000 decimal places.

What is the expected output? What do you see instead?
The window of python close.

What version of the product are you using? On what operating system?
python 3.2, Windows 7 SP1.

Please provide any additional information below.
This only works with the gmpy enable and problably the don't crash with him
disabled but it's not tested because it's too slow.


mpm...@googlecode.com

unread,
Apr 20, 2011, 12:41:30 PM4/20/11
to mpmath...@googlegroups.com

Comment #1 on issue 207 by fredrik....@gmail.com: 1000000000 decimal places
crash.
http://code.google.com/p/mpmath/issues/detail?id=207

1 billion decimal places is more than 3 billion bits, so the precision
doesn't fit in a machine integer on 32-bit systems (2^31-1 =
2,147,483,647). If you have a 64-bit system, this should work fine. My
suggestion is that you get a 64-bit system :)

mpm...@googlecode.com

unread,
May 11, 2011, 6:25:40 PM5/11/11
to mpmath...@googlegroups.com

Comment #2 on issue 207 by Vinzent.Steinberg: 1000000000 decimal places
crash.
http://code.google.com/p/mpmath/issues/detail?id=207

I wonder why it crashes, it should raise a MemoryError instead, shouldn't
it? (At least this is what happens on my system.)

mpm...@googlecode.com

unread,
Jan 23, 2012, 2:31:48 AM1/23/12
to mpmath...@googlegroups.com
Updates:
Status: Started
Owner: cas...@gmail.com

Comment #3 on issue 207 by cas...@gmail.com: 1000000000 decimal places
crash.
http://code.google.com/p/mpmath/issues/detail?id=207

The mpmath helper functions in gmpy use the C long type internally. A C
long is 32 bits on both 32 and 64-bit versions of Windows. I have
implemented a fix that uses a 64-bit integer type on 64-bit Windows in the
development version of gmpy2. The issue doesn't impact Linux systems since
a C long is 64 bits on 64-bit versions of Linux. I'll update this issue
when I release the next version of gmpy2. If anyone would like a test
build, just let me know.

Reply all
Reply to author
Forward
0 new messages