multBySmallInt: arg | carry newValue |
" private internal method "
arg < 0 ifTrue: [ ^ (self multBySmallInt: arg negated) negated ].
carry <- 0. newValue <- List new.
values do: [:e | carry <- e * arg + carry.
newValue add: (carry rem: 100). carry <- carry quo: 100 ].
[ carry > 0 ] whileTrue: [ newValue add: (carry rem: 100). carry <- carry quo: 100 ].
^ LargePositive new: newValue asByteArray