Help for this page

Select Code to Download


  1. or download this
    use warnings; 
    use strict; 
    ...
            while (0 != $a) { $n = int($b / $a); ($a, $b, $x, $y) = ($b - 
    +$n * $a, $a, $y - $n * $x, $x); } 
            $y % $m; 
    }
    
  2. or download this
    # WRONG, DO NOT USE
    use warnings; 
    ...
            while (0 != $a) { $n = int($b / $a); ($a, $b, $x, $y) = ($b - 
    +$n * $a, $a, $y - $n * $x, $x); } 
            $y % $m; 
    }