This is a current limitation of IronPython implementation. I am filing it as a 
bug for us to seriously investigate.

Thanks for your help with the repro!

Martin

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of HEMMI, Shigeru
Sent: Thursday, August 10, 2006 1:38 AM
To: Discussion of IronPython
Subject: Re: [IronPython] Bug of big integer manipulation

Thanks for the answer.

I was able to take a log with  -X:ExceptionDetail, but since Japanese, log file 
includes Japanse characters; I removed them by hand. I was not able to which 
numbers were involved. The log file is attached.

Please note that there are two problems; one is "ValueError: value too big" 
problem which we do not encounter with CPython. The other is an infinite loop 
bug.

Please also note that NZMATH is pure python, having simple module structure and 
we will be able to duplicate the problem if you download it.

Best regards,

2006/8/10, Martin Maly <[EMAIL PROTECTED]>:
> By any chance, were you able to determine which operation caused the 
> exception and which numbers were involved? What would help me find out what 
> the problem is faster would be get a call stack (for that, could you please 
> run your repro with -X:ExceptionDetail switch? Then ideally if you could find 
> out what the big integer numbers were with which the operation failed, that 
> would be ideal.
>
> Thanks!
> Martin
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of HEMMI,
> Shigeru
> Sent: Tuesday, August 08, 2006 4:31 PM
> To: Discussion of IronPython
> Subject: [IronPython] Bug of big integer manipulation
>
> Hello,
>
> NZMATH is a Python based number theory oriented calculation system developed 
> by Tokyo Metropolitan University. The URL is 
> http://tnt.math.metro-u.ac.jp/nzmath/.
>
> Using NZMATH, I encounterd a bug of big integer manipulation.
>
> IronPython
> ============================
> C:\IronPython-2604>ipy
> IronPython 1.0.2411 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. 
> All rights reserved.
> >>> import sys
> >>> sys.path.append(r'C:\Python24\Lib')
> >>> sys.path.append(r'C:\Python24\Lib\site-packages')
> >>> from nzmath import prime
> >>> prime.nextPrime(256)
> 257
> >>> nx = sys.maxint
> >>> prime.nextPrime(nx*nx)
> Traceback (most recent call last):
>   File , line 0, in <stdin>##115
>   File C:\Python24\Lib\site-packages\nzmath\prime.py, line 158, in nextPrime
>   File C:\Python24\Lib\site-packages\nzmath\prime.py, line 206, in primeq
>   File C:\Python24\Lib\site-packages\nzmath\prime.py, line 188, in smallSpsp
>   File C:\Python24\Lib\site-packages\nzmath\prime.py, line 41, in spsp
> ValueError: value too big
> >>> prime.nextPrime(nx)  ## Seems going into infinite loop.
>
> CPython
> ============================
> C:\IronPython-2604>python
> Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on 
> win32 Type "help", "copyright", "credits" or "license" for more information.
> >>> import sys
> >>> from nzmath import prime
> >>> nx = sys.maxint
> >>> prime.nextPrime(nx*nx)
> 4611686014132420667L
> >>> prime.nextPrime(nx)
> 2147483659L
> >>>
>
> Regards,
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to