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.
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 :)
I wonder why it crashes, it should raise a MemoryError instead, shouldn't
it? (At least this is what happens on my system.)
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.