Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.1167.mcz ==================== Summary ==================== Name: Kernel-nice.1167 Author: nice Time: 25 April 2018, 11:09:01.928037 am UUID: fd3a4e4a-925e-1842-9c73-f7f5736dd21c Ancestors: Kernel-eem.1166 I shall not invoke super floorLog: with a different radix. Ouch, probably a remnant from my ancestor method floorLog10 that I generalized. =============== Diff against Kernel-eem.1166 =============== Item was changed: ----- Method: Fraction>>floorLog: (in category 'mathematical functions') ----- floorLog: radix "Unlike super, this version is exact when radix is integer" | d n | + radix isInteger ifFalse: [^super floorLog: radix]. - radix isInteger ifFalse: [^super floorLog: 10]. n := numerator floorLog: radix. d := denominator floorLog: radix. ^(numerator * (radix raisedTo: d)) < (denominator * (radix raisedTo: n)) ifTrue: [n - d - 1] ifFalse: [n - d]! Item was changed: ----- Method: Integer>>floorLog: (in category 'mathematical functions') ----- floorLog: radix "Unlike super, this version is exact when radix is integer" + radix isInteger ifFalse: [^super floorLog: radix]. - radix isInteger ifFalse: [^super floorLog: 10]. self <= 0 ifTrue: [^DomainError signal: 'floorLog: is only defined for x > 0.0']. ^(self numberOfDigitsInBase: radix) - 1! |
Hmm, I already corrected this in 2016, in
Kernel-nice.1017
But then I broke it in
Kernel-nice.1018
when merging another
Kernel-nice.1017
which I posted in the inbox...2018-04-25 11:10 GMT+02:00 <[hidden email]>: Nicolas Cellier uploaded a new version of Kernel to project The Trunk: |
Free forum by Nabble | Edit this page |