<!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">I think my prior post was trashed because of zip file ---</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; DO NOT FOLLOW THE URL</FONT>

<BR><FONT SIZE=2 FACE="Arial">It caused my system to spawn unlimited copies of Mozilla.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Here is post without attachments; I can supply source separately.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Re:&nbsp; 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>

<BR><FONT SIZE=2 FACE="Arial">kruso@comcast.net</FONT>

<BR><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">&nbsp;&nbsp; 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">&nbsp;&nbsp; b&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8069490149</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp; b^3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 525458337307039866916945777949</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp; b^3 % m&nbsp;&nbsp;&nbsp;&nbsp; 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">&nbsp;&nbsp; modPow:&nbsp; 8069490149^3 % 11522063093 = 1591935989 </FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp; bubPow:&nbsp; 8069490149^3 % 11522063093 = 5886903285 </FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp; Check</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp; base^3:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 525458337307039866916945777949</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp; base^3 / modulus:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 45604535669160813448</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp; * modulus:&nbsp;&nbsp;&nbsp; 525458337307039866911058874664</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp; Difference:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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.&nbsp; Batch file</FONT>

<BR><FONT SIZE=2 FACE="Arial">clk.bat runs verification.</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">Regards,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">John Kruso</FONT>
</P>

</BODY>
</HTML>