#OTHER
authorStefan Vogel <sv@exept.de>
Tue, 22 Mar 2016 23:15:35 +0100
changeset 19405 2ac1a57337e2
parent 19404 a310d47c43ab
child 19412 1e842c25e51e
child 19413 2337a2d9861c
#OTHER class: Integer::ModuloNumber Add: asInteger
Integer.st
--- a/Integer.st	Tue Mar 22 17:39:46 2016 +0100
+++ b/Integer.st	Tue Mar 22 23:15:35 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1988 by Claus Gittinger
               All Rights Reserved
@@ -756,6 +754,8 @@
     "Modified: / 15.11.1999 / 20:35:20 / cg"
 ! !
 
+
+
 !Integer class methodsFor:'class initialization'!
 
 initialize
@@ -801,6 +801,7 @@
     "Modified: 18.7.1996 / 12:26:38 / cg"
 ! !
 
+
 !Integer class methodsFor:'prime numbers'!
 
 flushPrimeCache
@@ -1176,6 +1177,7 @@
     ^ self == Integer
 ! !
 
+
 !Integer methodsFor:'*Roe'!
 
 acceptRoeVisitor: aVisitor
@@ -3482,7 +3484,7 @@
     ^ fibUsingDict value:self
 
     "the running time is mostly dictated by the LargeInteger multiplication performance...
-     (therefore, we get O(n²) execution times, even for a linear number of multiplications)
+     (therefore, we get O(n²) execution times, even for a linear number of multiplications)
 
      Time millisecondsToRun:[50000 fib_iterative]  312    (DUO 1.7Ghz CPU)
      Time millisecondsToRun:[50000 fib_helper]     109
@@ -4859,6 +4861,7 @@
     "Created: / 09-01-2012 / 17:18:06 / cg"
 ! !
 
+
 !Integer methodsFor:'special modulo arithmetic'!
 
 add_32:anInteger
@@ -5592,6 +5595,12 @@
 
 !Integer::ModuloNumber methodsFor:'converting'!
 
+asInteger
+    "return the modulus"
+
+    ^ modulus
+!
+
 asModuloNumber
 
     ^ self