ArithmeticValue.st
branchjv
changeset 17754 5322906cdb6a
parent 17736 26cfea63471d
child 17761 b0e5971141bc
--- a/ArithmeticValue.st	Thu Feb 25 22:58:21 2010 +0000
+++ b/ArithmeticValue.st	Mon Mar 08 21:39:02 2010 +0000
@@ -203,6 +203,7 @@
     ^ self == ArithmeticValue
 ! !
 
+
 !ArithmeticValue methodsFor:'arithmetic'!
 
 * something
@@ -1013,64 +1014,63 @@
     result := 1.
     t := self.
     exp < 0 ifTrue:[
-	e := exp negated.
+        e := exp negated.
     ] ifFalse:[
-	e := exp.
+        e := exp.
     ].
 
     [e ~~ 0] whileTrue:[
-	[(e bitAnd:1) == 0] whileTrue:[
-	    e := e bitShift:-1.
-	    t := t * t.
-	].
-	e := e - 1.
-	result := result * t.
+        [(e bitAnd:1) == 0] whileTrue:[
+            e := e bitShift:-1.
+            t := t * t.
+        ].
+        e := e - 1.
+        result := result * t.
     ].
 
     (exp < 0) ifTrue:[
-	^ 1 / result
+        ^ 1 / result
     ].
 
     ^ result
 
-
     "
      (2 raisedToInteger:216)
      (2 raisedTo:216)
--> 105312291668557186697918027683670432318895095400549111254310977536
+            -> 105312291668557186697918027683670432318895095400549111254310977536
 
      (2 raisedToInteger:216) asFloat
      (2 raisedTo:216) asFloat
--> 1.05312E+65
+            -> 1.05312E+65
 
      (2 raisedToInteger:500)
      (2 raisedTo:500)
--> 3273390607896141870013189696827599152216642046043064789483291368096133796404674554883270092325904157150886684127560071009217256545885393053328527589376
+            -> 3273390607896141870013189696827599152216642046043064789483291368096133796404674554883270092325904157150886684127560071009217256545885393053328527589376
      2 raisedToInteger:10
--> 1024
+            -> 1024
     -2 raisedToInteger:10
--> 1024
+            -> 1024
      -2 raisedToInteger:9
--> -512
+            -> -512
      10 raisedToInteger:-10
--> (1/10000000000)
+            -> (1/10000000000)
      2 raisedToInteger:0
--> 1
+            -> 1
      2 raisedToInteger:-1
--> (1/2)
+            -> (1/2)
 
      Time millisecondsToRun:[
-	10000 timesRepeat:[
-	    (2 raisedToInteger:500)
-	]
+        10000 timesRepeat:[
+            (2 raisedToInteger:500)
+        ]
      ]
 
      Time millisecondsToRun:[
-	|bigNum|
-	bigNum := 2 raisedToInteger:500.
-	10 timesRepeat:[
-	    (bigNum raisedToInteger:500)
-	]
+        |bigNum|
+        bigNum := 2 raisedToInteger:500.
+        10 timesRepeat:[
+            (bigNum raisedToInteger:500)
+        ]
      ]
     "
 
@@ -1284,11 +1284,12 @@
 !ArithmeticValue class methodsFor:'documentation'!
 
 version
-    ^ '$Id: ArithmeticValue.st 10482 2009-12-04 20:30:11Z vranyj1 $'
+    ^ '$Id: ArithmeticValue.st 10505 2010-03-08 21:39:02Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/ArithmeticValue.st,v 1.84 2009/12/01 22:11:48 cg Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/ArithmeticValue.st,v 1.85 2010/03/06 10:06:53 cg Exp §'
 ! !
 
 ArithmeticValue initialize!
+