Integer.st
changeset 15902 873997dcf4cf
parent 15841 7c222b07168f
child 15911 0dfd943efdf5
equal deleted inserted replaced
15901:6202bd600f65 15902:873997dcf4cf
  1382      1 >> -5
  1382      1 >> -5
  1383      64 >> 5
  1383      64 >> 5
  1384     "
  1384     "
  1385 ! !
  1385 ! !
  1386 
  1386 
       
  1387 
  1387 !Integer methodsFor:'bcd conversion'!
  1388 !Integer methodsFor:'bcd conversion'!
  1388 
  1389 
  1389 decodeFromBCD
  1390 decodeFromBCD
  1390     "return a number representing the value of the BCD encoded receiver."
  1391     "return a number representing the value of the BCD encoded receiver."
  1391 
  1392 
  4996 
  4997 
  4997     "fast (using moduloNumber with almost same-sized dividend and divisor):
  4998     "fast (using moduloNumber with almost same-sized dividend and divisor):
  4998      |m|
  4999      |m|
  4999 
  5000 
  5000      m := self new modulus:123456789901398721398721931729371293712943794254034548369328469438562948623498659238469234659823469823658423659823658.
  5001      m := self new modulus:123456789901398721398721931729371293712943794254034548369328469438562948623498659238469234659823469823658423659823658.
  5001      Time millisecondsToRun:[
  5002     m modulusOf:874928459437598375937451931729371293712943794254034548369328469438562948623498659238469234659823469823658423659823658.
  5002         100000 timesRepeat:[
  5003 10730930127807326146398409623772237722337234475792709784029183368622308259008044569184592041059181058049458041058052     ]
  5003             m modulusOf:874928459437598375937451931729371293712943794254034548369328469438562948623498659238469234659823469823658423659823658.
       
  5004         ]
       
  5005      ]
       
  5006     "
  5004     "
  5007 
  5005 
  5008     "Modified: / 3.5.1999 / 14:30:32 / stefan"
  5006     "Modified: / 3.5.1999 / 14:30:32 / stefan"
  5009 ! !
  5007 ! !
  5010 
  5008 
  5018 ! !
  5016 ! !
  5019 
  5017 
  5020 !Integer class methodsFor:'documentation'!
  5018 !Integer class methodsFor:'documentation'!
  5021 
  5019 
  5022 version
  5020 version
  5023     ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.288 2013-12-02 20:00:24 stefan Exp $'
  5021     ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.289 2014-01-23 16:11:45 stefan Exp $'
  5024 !
  5022 !
  5025 
  5023 
  5026 version_CVS
  5024 version_CVS
  5027     ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.288 2013-12-02 20:00:24 stefan Exp $'
  5025     ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.289 2014-01-23 16:11:45 stefan Exp $'
  5028 ! !
  5026 ! !
  5029 
  5027 
  5030 
  5028 
  5031 Integer initialize!
  5029 Integer initialize!