Commits

meisterluk committed fe532af

Fixing references to euklid.

  • Participants
  • Parent commits 0999082

Comments (0)

Files changed (6)

 '''
 
 import random
-from euklid import euklid as ggt
+from euklid import euclidean as ggt
 
 def eulerian_function(num):
     '''Eulerian function (phi)
         teiler = 0
 
         for x in xrange(num):
-            if euklid.euklid(x, num) == 1:
+            if euklid.euclidean(x, num) == 1:
                 teiler += 1
 
         e = 157
     teiler = 0
 
     for x in xrange(num):
-        if euklid.euklid(x, num) == 1:
+        if euklid.euclidean(x, num) == 1:
             teiler += 1
 
     return teiler

eulerian_function.py

     teiler = 0
 
     for x in xrange(num):
-        if euklid.euklid(x, num) == 1:
+        if euklid.euclidean(x, num) == 1:
             teiler += 1
 
     return teiler
                         (['number', int],)],
                 'd' : ['Is divisible?', 'basics.divisible(%d, %d)', \
                         (['divisible', int], ['by', int])],
-                'e' : ['Modern Euklidean algorithm', 'euklid.euklid_modern(%d, %d)', \
+                'e' : ['Modern Euklidean algorithm', 'euklid.euclidean_modern(%d, %d)', \
                         (['a', int], ['b', int])],
-                'f' : ['Modern Euklidean algorithm recursive', 'euklid.euklid_modern_rec(%d, %d)', \
+                'f' : ['Modern Euklidean algorithm recursive', 'euklid.euclidean_modern_rec(%d, %d)', \
                         (['a', int], ['b', int])],
-                'g' : ['Classic Euklidean algorithm', 'euklid.euklid_classic(%d, %d)', \
+                'g' : ['Classic Euklidean algorithm', 'euklid.euclidean_classic(%d, %d)', \
                         (['a', int], ['b', int])],
-                'h' : ['Classic Euklidean algorithm recursive', 'euklid.euklid_classic_rec(%d, %d)', \
+                'h' : ['Classic Euklidean algorithm recursive', 'euklid.euclidean_classic_rec(%d, %d)', \
                         (['a', int], ['b', int])],
-                'i' : ['Extended Euklidean algorithm', 'euklid.extended_euklid(%d, %d)', \
+                'i' : ['Extended Euklidean algorithm', 'euklid.extended_euclidean(%d, %d)', \
                         (['a', int], ['b', int])],
                 'j' : ['Extended Euklidean algorithm recursive', \
-                        'euklid.extended_euklid_rec(%d, %d)', (['a', int], ['b', int])],
+                        'euklid.extended_euclidean_rec(%d, %d)', (['a', int], ['b', int])],
                 'k' : ['Stein algorithm', 'euklid.stein_algorithm(%d, %d)', \
                         (['a', int], ['b', int])],
                 'l' : ['Speed battle of gcD algorithms', 'euklid.test(namespace="euklid")'],
 '''
 
 from basics import find_coprime as coprime
-from euklid import euklid as ggt
-from euklid import extended_euklid as ext
+from euklid import euclidean as ggt
+from euklid import extended_euclidean as ext
 from sieve import sieve_of_eratosthenes as sieve
 from square import square_and_multiply as sam
 from eulerian import eulerian_function