[IronPython] Bug of big integer manipulation
HEMMI, Shigeru
textdirected at gmail.com
Thu Aug 10 10:46:18 CEST 2006
I wrote:
> The log file is attached.
Sorry, "A non-text attachment was scrubbed..." occured.
I resend the attachment file again with .txt extension.
-------------- next part --------------
C:\NZMATH-0.5.1>dir
2006/08/10 17:28 <DIR> .
2006/08/10 17:28 <DIR> ..
2006/08/08 20:42 4,214 CHANGES.txt
2006/08/08 20:42 835 HISTORY.txt
2006/08/10 17:16 61,440 ipy.exe
2006/08/10 17:16 45,056 IronMath.dll
2006/08/10 17:16 1,527,808 IronPython.dll
2006/08/08 20:42 1,563 LICENSE.txt
2006/08/08 20:42 <DIR> manual
2006/08/08 20:42 <DIR> nzmath
2006/08/08 20:42 288 PKG-INFO
2006/08/08 20:42 1,916 README.txt
2006/08/08 20:42 5,466 setup.py
2006/08/08 20:42 5,428 tutorial.txt
C:\NZMATH-0.5.1>ipy -X:ExceptionDetail
IronPython 1.0.2413 on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import sys
>>> sys.path.append(r'C:\Python24\Lib')
>>> from nzmath import prime
>>> nx = sys.maxint
>>> mx = nx*nx
>>> mx
4611686014132420609L
>>> prime.nextPrime(mx)
value too big
IronPython.Runtime.Operations.LongOps.PowerMod(BigInteger x, Object y, Object z)
IronPython.Runtime.Operations.IntOps.PowerMod(Int32 x, Object y, Objectz)
IronPython.Runtime.Operations.Ops.PowerMod(Object x, Object y, Object z)
IronPython.Modules.Builtin.Pow(Object x, Object y, Object z)
IronPython.Runtime.Calls.FastCallableAny.Call(ICallerContext context, Object arg0, Object arg1, Object arg2)
IronPython.Runtime.Calls.BuiltinFunction.Call(ICallerContext context, Object arg0, Object arg1, Object arg2)
IronPython.Runtime.Operations.Ops.CallWithContext(ICallerContext context, Object func, Object arg0, Object arg1, Object arg2)
nzmath.prime.spsp$f1(Object n, Object base, Object s, Object t) C:\NZMATH-0.5.1\nzmath\prime.py:line 43
IronPython.Runtime.Calls.Function4.Call(ICallerContext context, Object arg0, Object arg1)
IronPython.Runtime.Operations.Ops.CallWithContext(ICallerContext context, Object func, Object arg0, Object arg1)
nzmath.prime.smallSpsp$f17(Object n) C:\NZMATH-0.5.1\nzmath\prime.py:line 278
IronPython.Runtime.Calls.Function1.Call(ICallerContext context, Object arg0)
IronPython.Runtime.Operations.Ops.CallWithContext(ICallerContext context, Object func, Object arg0)
nzmath.prime.primeq$f18(Object n) C:\NZMATH-0.5.1\nzmath\prime.py:line 297
IronPython.Runtime.Calls.Function1.Call(ICallerContext context, Object arg0)
IronPython.Runtime.Operations.Ops.CallWithContext(ICallerContext context, Object func, Object arg0)
nzmath.prime.nextPrime$f15(Object n) C:\NZMATH-0.5.1\nzmath\prime.py:line 246
IronPython.Runtime.Calls.Function1.Call(ICallerContext context, Object arg0)
IronPython.Runtime.Operations.Ops.CallWithContext(ICallerContext context, Object func, Object arg0)
<stdin>##114(ModuleScope )
IronPython.Hosting.CompiledCodeDelegate.Invoke(ModuleScope moduleScope)
IronPython.Hosting.CompiledCode.Run(ModuleScope moduleScope)
IronPython.Hosting.PythonEngine.ExecuteToConsole(String text, EngineModule engineModule, IDictionary`2 locals)
IronPython.Hosting.PythonEngine.ExecuteToConsole(String text)
IronPythonConsole.PythonCommandLine.DoOneInteractive()
IronPythonConsole.PythonCommandLine.<RunInteractiveLoop>b__6(Boolean& continueInteractionArgument)
IronPythonConsole.PythonCommandLine.TryInteractiveAction(InteractiveAction interactiveAction, Boolean& continueInteraction)
ValueError: value too big
>>> prime.nextPrime(nx)
********** Going into an infinite loop; Interrupt with Ctrl+C ***********
IronMath.BigInteger.op_Multiply(BigInteger x, BigInteger y)
IronMath.BigInteger.Square()
IronMath.BigInteger.ModPow(Int32 power, BigInteger mod)
IronPython.Runtime.Operations.LongOps.PowerMod(BigInteger x, Int32 y, BigInteger z)
IronPython.Runtime.Operations.LongOps.PowerMod(BigInteger x, Int32 y, Object z)
IronPython.Runtime.Operations.LongOps.PowerMod(BigInteger x, Object y, Object z)
IronPython.Runtime.Operations.IntOps.PowerMod(Int32 x, Object y, Objectz)
IronPython.Runtime.Operations.Ops.PowerMod(Object x, Object y, Object z)
IronPython.Modules.Builtin.Pow(Object x, Object y, Object z)
IronPython.Runtime.Calls.FastCallableAny.Call(ICallerContext context, Object arg0, Object arg1, Object arg2)
IronPython.Runtime.Calls.BuiltinFunction.Call(ICallerContext context, Object arg0, Object arg1, Object arg2)
IronPython.Runtime.Operations.Ops.CallWithContext(ICallerContext context, Object func, Object arg0, Object arg1, Object arg2)
nzmath.prime.spsp$f1(Object n, Object base, Object s, Object t) C:\NZMATH-0.5.1\nzmath\prime.py:line 43
IronPython.Runtime.Calls.Function4.Call(ICallerContext context, Object arg0, Object arg1)
IronPython.Runtime.Operations.Ops.CallWithContext(ICallerContext context, Object func, Object arg0, Object arg1)
nzmath.prime.smallSpsp$f17(Object n) C:\NZMATH-0.5.1\nzmath\prime.py:line 278
IronPython.Runtime.Calls.Function1.Call(ICallerContext context, Object arg0)
IronPython.Runtime.Operations.Ops.CallWithContext(ICallerContext context, Object func, Object arg0)
nzmath.prime.primeq$f18(Object n) C:\NZMATH-0.5.1\nzmath\prime.py:line 297
IronPython.Runtime.Calls.Function1.Call(ICallerContext context, Object arg0)
IronPython.Runtime.Operations.Ops.CallWithContext(ICallerContext context, Object func, Object arg0)
nzmath.prime.nextPrime$f15(Object n) C:\NZMATH-0.5.1\nzmath\prime.py:line 246
IronPython.Runtime.Calls.Function1.Call(ICallerContext context, Object arg0)
IronPython.Runtime.Operations.Ops.CallWithContext(ICallerContext context, Object func, Object arg0)
<stdin>##118(ModuleScope )
IronPython.Hosting.CompiledCodeDelegate.Invoke(ModuleScope moduleScope)
IronPython.Hosting.CompiledCode.Run(ModuleScope moduleScope)
IronPython.Hosting.PythonEngine.ExecuteToConsole(String text, EngineModule engineModule, IDictionary`2 locals)
IronPython.Hosting.PythonEngine.ExecuteToConsole(String text)
IronPythonConsole.PythonCommandLine.DoOneInteractive()
IronPythonConsole.PythonCommandLine.<RunInteractiveLoop>b__6(Boolean& continueInteractionArgument)
IronPythonConsole.PythonCommandLine.TryInteractiveAction(InteractiveAction interactiveAction, Boolean& continueInteraction)
KeyboardInterrupt:
>>>
More information about the Ironpython-users
mailing list