[IronPython] Math.modPow

Kruso, John jkruso at cis.ctc.edu
Thu Nov 11 18:43:24 CET 2004

I think my prior post was trashed because of zip file ---
It caused my system to spawn unlimited copies of Mozilla.

Here is post without attachments; I can supply source separately.

Re:  Mono.Math.ForIronPython library (BigInteger)
John Kruso
10 Nov 2004
kruso at comcast.net

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 
   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.


John Kruso
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20041111/bf40c87c/attachment.html>

More information about the Ironpython-users mailing list