Nicolas Cellier uploaded a new version of KernelTests to project The Trunk: http://source.squeak.org/trunk/KernelTests-nice.293.mcz
==================== Summary ====================
Name: KernelTests-nice.293 Author: nice Time: 1 May 2015, 3:16:46.949 pm UUID: fb60846c-b40a-4f89-9ec5-1260cfbf0319 Ancestors: KernelTests-mt.292
Tests asserting floorLog: exactness for Number performing exact arithmetic.
This was inbox KernelTests-nice.239 / 11 December 2012
=============== Diff against KernelTests-mt.292 ===============
Item was added: + ----- Method: FractionTest>>testFloorLogExactness (in category 'tests - mathematical functions') ----- + testFloorLogExactness + + 1 + (Float fminDenormalized floorLog: 10) to: -1 do: [:n | + self assert: ((10 raisedTo: n) floorLog: 10) = n]. + + "Float version is not exact for at least 2 reasons: + 1/(10 raisedTo: n) asFloat is not exact + (aFloat log: radix) is not exact + + (1 + (Float fminDenormalized floorLog: 10) to: -1) count: [:n | + ((10 raisedTo: n) asFloat floorLog: 10) ~= n]." + !
Item was added: + ----- Method: IntegerTest>>testFloorLogExactness (in category 'tests - mathematical functions') ----- + testFloorLogExactness + + 1 to: (Float fmax floorLog: 10) do: [:n | + self assert: ((10 raisedTo: n) floorLog: 10) = n]. + + "Float version is not exact for at least 2 reasons: + (10 raisedTo: n) asFloat is not exact for n > 22 + (aFloat log: radix) is not exact + + (1 to: (Float fmax floorLog: 10)) count: [:n | + ((10 raisedTo: n) asFloat floorLog: 10) ~= n]."!
Item was added: + ----- Method: ScaledDecimalTest>>testFloorLogExactness (in category 'tests - mathematical functions') ----- + testFloorLogExactness + 1 + (Float fminDenormalized floorLog: 10) to: (Float fmax floorLog: 10) do: [:n | + self assert: ((10 raisedTo: n) asScaledDecimal floorLog: 10) = n description: 'floorLog should be exact for ScaledDecimals'.]!
squeak-dev@lists.squeakfoundation.org