--- a/Integer.st Tue Mar 22 08:03:27 2016 +0000
+++ b/Integer.st Wed Mar 23 07:50:28 2016 +0000
@@ -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
@@ -4860,6 +4862,7 @@
"Created: / 09-01-2012 / 17:18:06 / cg"
! !
+
!Integer methodsFor:'special modulo arithmetic'!
add_32:anInteger
@@ -5593,6 +5596,12 @@
!Integer::ModuloNumber methodsFor:'converting'!
+asInteger
+ "return the modulus"
+
+ ^ modulus
+!
+
asModuloNumber
^ self