LargeInteger.st
changeset 2793 e40dedf51177
parent 2788 e4436755d153
child 2816 62edd11b5e66
equal deleted inserted replaced
2792:2ae1f2e3d11f 2793:e40dedf51177
   242 
   242 
   243 / aNumber
   243 / aNumber
   244     "return the quotient of the receiver and the argument, aNumber"
   244     "return the quotient of the receiver and the argument, aNumber"
   245 
   245 
   246     aNumber isInteger ifTrue:[
   246     aNumber isInteger ifTrue:[
   247 	^ (Fraction numerator:self
   247         ^ Fraction numerator:self
   248 		  denominator:aNumber) reduced
   248                   denominator:aNumber
   249     ].
   249     ].
   250 
   250 
   251     "this is a q&d hack - we loose lots of precision here ..."
   251     "this is a q&d hack - we loose lots of precision here ..."
   252     ^ (self asFloat / aNumber asFloat)
   252     ^ (self asFloat / aNumber asFloat)
       
   253 
       
   254     "Modified: 28.7.1997 / 19:07:55 / cg"
   253 !
   255 !
   254 
   256 
   255 // aNumber
   257 // aNumber
   256     "return the quotient of the receiver and the argument, aNumber.
   258     "return the quotient of the receiver and the argument, aNumber.
   257      The result is truncated toward negative infinity and negative,
   259      The result is truncated toward negative infinity and negative,
  2050 ! !
  2052 ! !
  2051 
  2053 
  2052 !LargeInteger class methodsFor:'documentation'!
  2054 !LargeInteger class methodsFor:'documentation'!
  2053 
  2055 
  2054 version
  2056 version
  2055     ^ '$Header: /cvs/stx/stx/libbasic/LargeInteger.st,v 1.46 1997-07-26 17:46:55 cg Exp $'
  2057     ^ '$Header: /cvs/stx/stx/libbasic/LargeInteger.st,v 1.47 1997-07-28 17:11:35 cg Exp $'
  2056 ! !
  2058 ! !