class: Integer
changed: #readFromRomanString:
use string instead of array of chars
--- a/Integer.st Sun Apr 19 11:46:54 2015 +0200
+++ b/Integer.st Sun Apr 19 12:17:10 2015 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1988 by Claus Gittinger
All Rights Reserved
@@ -430,7 +432,7 @@
stopOnSeparator finish|
romanValues := Dictionary
- withKeys:#($M $D $C $L $X $V $I)
+ withKeys:'MDCLXVI' "/ #($M $D $C $L $X $V $I)
andValues:#(1000 500 100 50 10 5 1).
(stopOnSeparator := aStringOrStream isStream) ifFalse:[
@@ -820,6 +822,7 @@
"
! !
+
!Integer class methodsFor:'prime numbers'!
flushPrimeCache
@@ -3032,7 +3035,7 @@
^ fibUsingDict value:self
"the running time is mostly dictated by the LargeInteger multiplication performance...
- (therefore, we get O² execution times, even for a linear number of multiplications)
+ (therefore, we get O² 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
@@ -4390,6 +4393,7 @@
"Created: / 09-01-2012 / 17:18:06 / cg"
! !
+
!Integer methodsFor:'special modulo arithmetic'!
add_32:anInteger
@@ -5118,11 +5122,11 @@
!Integer class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.308 2015-02-18 14:40:28 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.309 2015-04-19 10:17:10 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.308 2015-02-18 14:40:28 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.309 2015-04-19 10:17:10 cg Exp $'
! !