[IronPython] Math.modPow

Kruso, John jkruso at cis.ctc.edu
Wed Nov 10 21:28:30 CET 2004


Re:  Mono.Math.ForIronPython library (BigInteger)
-------------------------------------------------
John Kruso
10 Nov 2004 <<ironnote.zip>> 

-------------------------------------------------

Was calculating factors and got:
   8069490149.modPow(3,11522063093) = 1591935989

Ran bigCheck.py to get:
   b           8069490149
   b^3         525458337307039866916945777949
   b^3 % m     5886903285
(Get same results running IronPythonConsole bigCheck.py,
because power and modulo run separately are correct.)

Wrote a straight-forward function in bigTest.cs to
verify the problem:
   modPow:  8069490149^3 % 11522063093 = 1591935989 
   bubPow:  8069490149^3 % 11522063093 = 5886903285 
   Check
   base^3:       525458337307039866916945777949
   base^3 / modulus:       45604535669160813448
   * modulus:    525458337307039866911058874664
   Difference:                       5886903285

-------------------------------------------------

Have included library source bigint.cs and batch
file clkbi.bat used to create library.  Batch file
clk.bat runs verification.

-------------------------------------------------
As a separate issue/nonissue:

When I run IronPythonConsole, I get following files
generated in the directory of the python script that
I execute:

   snippets.dll
   snippets.pdb
   __main__.exe
   __main__.pdb

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20041110/66eb64f6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ironnote.zip
Type: application/x-zip-compressed
Size: 26341 bytes
Desc: ironnote.zip
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20041110/66eb64f6/attachment.bin>


More information about the Ironpython-users mailing list