Number.st
changeset 24157 c75b75fd3aaf
parent 23619 90c9530305b7
child 24158 fb63564d89d8
--- a/Number.st	Sun May 26 11:03:10 2019 +0200
+++ b/Number.st	Sun May 26 11:03:44 2019 +0200
@@ -1252,6 +1252,7 @@
 	^(self - aNumber) abs < accuracy
 ! !
 
+
 !Number methodsFor:'converting'!
 
 % aNumber
@@ -1942,18 +1943,22 @@
      For protocol completeness wrt. Squeak and ST80."
 
     anInteger >= 0 ifTrue:[
-	^ self * (1 bitShift:anInteger)
+        ^ self * (1 bitShift:anInteger)
     ].
     ^ self / (1 bitShift:anInteger negated)
 
     "
-     123 timesTwoPower:0   -> 123
-     123 timesTwoPower:1   -> 246
-     123 timesTwoPower:2   -> 492
-     123 timesTwoPower:3   -> 984
+     123 timesTwoPower:0  = 123*1 -> 123
+     123 timesTwoPower:1  = 123*2 -> 246
+     123 timesTwoPower:2  = 123*4 -> 492
+     123 timesTwoPower:3  = 123*8 -> 984
 
      (2 timesTwoPower: -150) timesTwoPower: 150  -> 2
+     (2 timesTwoPower: 150) timesTwoPower: -150  -> 2
+     (2 timesTwoPower: 150) timesTwoPower: -149  -> 4  
     "
+
+    "Modified (comment): / 26-05-2019 / 03:26:09 / Claus Gittinger"
 ! !
 
 !Number methodsFor:'measurement values'!