<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7226.0">
<TITLE>Math.modPow</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Re: Mono.Math.ForIronPython library (BigInteger)</FONT>
<BR><FONT SIZE=2 FACE="Arial">-------------------------------------------------</FONT>
<BR><FONT SIZE=2 FACE="Arial">John Kruso</FONT>
<BR><FONT SIZE=2 FACE="Arial">10 Nov 2004<FONT FACE="Arial" SIZE=2 COLOR="#000000"> <<ironnote.zip>> </FONT></FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">-------------------------------------------------</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Was calculating factors and got:</FONT>
<BR><FONT SIZE=2 FACE="Arial"> 8069490149.modPow(3,11522063093) = 1591935989</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Ran bigCheck.py to get:</FONT>
<BR><FONT SIZE=2 FACE="Arial"> b 8069490149</FONT>
<BR><FONT SIZE=2 FACE="Arial"> b^3 525458337307039866916945777949</FONT>
<BR><FONT SIZE=2 FACE="Arial"> b^3 % m 5886903285</FONT>
<BR><FONT SIZE=2 FACE="Arial">(Get same results running IronPythonConsole bigCheck.py,</FONT>
<BR><FONT SIZE=2 FACE="Arial">because power and modulo run separately are correct.)</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Wrote a straight-forward function in bigTest.cs to</FONT>
<BR><FONT SIZE=2 FACE="Arial">verify the problem:</FONT>
<BR><FONT SIZE=2 FACE="Arial"> modPow: 8069490149^3 % 11522063093 = 1591935989 </FONT>
<BR><FONT SIZE=2 FACE="Arial"> bubPow: 8069490149^3 % 11522063093 = 5886903285 </FONT>
<BR><FONT SIZE=2 FACE="Arial"> Check</FONT>
<BR><FONT SIZE=2 FACE="Arial"> base^3: 525458337307039866916945777949</FONT>
<BR><FONT SIZE=2 FACE="Arial"> base^3 / modulus: 45604535669160813448</FONT>
<BR><FONT SIZE=2 FACE="Arial"> * modulus: 525458337307039866911058874664</FONT>
<BR><FONT SIZE=2 FACE="Arial"> Difference: 5886903285</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">-------------------------------------------------</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Have included library source bigint.cs and batch</FONT>
<BR><FONT SIZE=2 FACE="Arial">file clkbi.bat used to create library. Batch file</FONT>
<BR><FONT SIZE=2 FACE="Arial">clk.bat runs verification.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">-------------------------------------------------</FONT>
<BR><FONT SIZE=2 FACE="Arial">As a separate issue/nonissue:</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">When I run IronPythonConsole, I get following files</FONT>
<BR><FONT SIZE=2 FACE="Arial">generated in the directory of the python script that</FONT>
<BR><FONT SIZE=2 FACE="Arial">I execute:</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"> snippets.dll</FONT>
<BR><FONT SIZE=2 FACE="Arial"> snippets.pdb</FONT>
<BR><FONT SIZE=2 FACE="Arial"> __main__.exe</FONT>
<BR><FONT SIZE=2 FACE="Arial"> __main__.pdb</FONT>
</P>
</BODY>
</HTML>