equal
deleted
inserted
replaced
870 ! |
870 ! |
871 |
871 |
872 raisedToInteger:exp |
872 raisedToInteger:exp |
873 "return the receiver raised to exp" |
873 "return the receiver raised to exp" |
874 |
874 |
875 |result e t |
875 |result e t| |
876 | |
876 |
877 |
877 "use the addition chaining algorithm, |
878 "use the addition chaining algorithm" |
878 which is much faster for big exp-arguments" |
879 |
879 |
880 result := 1. |
880 result := 1. |
881 t := self. |
881 t := self. |
882 exp < 0 ifTrue:[ |
882 exp < 0 ifTrue:[ |
883 e := exp negated. |
883 e := exp negated. |
1164 ! ! |
1164 ! ! |
1165 |
1165 |
1166 !ArithmeticValue class methodsFor:'documentation'! |
1166 !ArithmeticValue class methodsFor:'documentation'! |
1167 |
1167 |
1168 version |
1168 version |
1169 ^ '$Header: /cvs/stx/stx/libbasic/ArithmeticValue.st,v 1.49 2003-06-17 09:10:25 cg Exp $' |
1169 ^ '$Header: /cvs/stx/stx/libbasic/ArithmeticValue.st,v 1.50 2003-06-17 09:11:17 cg Exp $' |
1170 ! ! |
1170 ! ! |
1171 |
1171 |
1172 ArithmeticValue initialize! |
1172 ArithmeticValue initialize! |