diff --git a/calc_big_expon.bc b/calc_big_expon.bc index 371f0d0..a78230f 100644 --- a/calc_big_expon.bc +++ b/calc_big_expon.bc @@ -1,8 +1,7 @@ # recursive routine to calculate c^d%n -# by reaking it down. Works only where -# d is a power of 2. +# by breaking it down using residues. # define x ( c,d,n) { #-1; d; -1; @@ -41,4 +40,3 @@ define t(c,d,n) { } } - diff --git a/calc_pi.php b/calc_pi.php index d75eefc..b8123ba 100644 --- a/calc_pi.php +++ b/calc_pi.php @@ -1,12 +1,13 @@
End Time == %s
\n",$date); ?> + +
c " $c " d " $d " n " $n "
"` date=`date | sed 's\:\_\g' | sed 's\ \_\g'` -#echo $date +echo "date on this server" $date + +echo "" +cat calc_big_expon.bc +echo "r=1;" +echo "t($c,$d,$n);" +echo "r;" +echo "" -#echo "invoking bc " -#more calc_big_expon.$$.$date.bc -#bc < calc_big_expon.$$.$date.bc -#echo "bc invoked " -#ls -l calc_big_expon.$$.$date.bc -result=`bc < calc_big_expon.$$.$date.bc | tail -1` -#echo $args $result -echo $result -rm -rf calc_big_expon.$$.$date.bc +echo "
End Time == %s
\n",$date); +printf("End Time == %s me=%s
\n",$date,$me); printf(" - if ( $m ) { ?> +The decoding process calculates the value of c ^ d % n. @@ -105,10 +105,10 @@ to the power of e, and then applying the modulus for n (i.e. p times q). The value c ^ d ( printf(" %s ^ %s ",$c,$d); ?> ) in this case would produce a number with approx - echo $digits ?> decimal digits ! + decimal digits !
- $gt100k = `./gt100k $digits`; +Obviously this is unacceptable and would cause memory and processing time problems. @@ -117,11 +117,11 @@ to the power of e, and then applying the modulus for n (i.e. p times q).
Note that for this very large value, the bc script may take up to - $mins_est = (($digits/1000000) * ($digits/1000000)) * 1.5; + minutes to finish this calculation.
- } ?> +
diff --git a/find_phi.php b/find_phi.php
index 0b30d54..db1e1da 100644
--- a/find_phi.php
+++ b/find_phi.php
@@ -1,7 +1,7 @@
Generating PHI the secret Modulus- + which is the result of (%s-1)*(%s-1) \n", $p,$q); |
- + | - + | -> -> -> -> +> +> +> +>
- +
+p.s. +
+If this software is installed be sure to chmod +x the sh and bc files. +
p | - + | - + |