Patrick Rein uploaded a new version of KernelTests to project The Trunk: http://source.squeak.org/trunk/KernelTests-pre.349.mcz
==================== Summary ====================
Name: KernelTests-pre.349 Author: pre Time: 13 October 2018, 3:57:17.109133 pm UUID: 98156591-d8ac-7f49-84f1-0a58728d10f1 Ancestors: KernelTests-cmm.348
Temporarily disables an underflow test which fails depending on the word size of the VM.
=============== Diff against KernelTests-cmm.348 ===============
Item was changed: + ----- Method: FloatTest>>expectedFailures (in category 'failures') ----- - ----- Method: FloatTest>>expectedFailures (in category 'characterization') ----- expectedFailures
+ ^#(testTimesTwoPowerGradualUnderflow)! - ^ Smalltalk platformName = 'Win32' - ifTrue: [#(testTimesTwoPowerGradualUnderflow)] - ifFalse: [#()]!
Item was changed: ----- Method: FloatTest>>testTimesTwoPowerGradualUnderflow (in category 'testing - arithmetic') ----- testTimesTwoPowerGradualUnderflow "Here is a vicious case where timesTwoPower is inexact because it underflows. And two consecutive inexact operations lead to a different result than a single one. Typically expressed as multiple of Float fmin in base 2, 2r1011*Float fmin shifted by -3 with round to nearest, tie to even mode: -> round(1.011) -> 1.0 = fmin But if first shifted by -2 then by -1: -> round(10.11) -> 11.0 = 3*fmin -> round(1.1) -> 10.0 = 2*fmin Or first shifted by -1 then by -2: -> round(101.1) -> 110.0 = 6*fmin -> round(1.1) -> 10.0 = 2*fmin A naive implementation that split the shift uncarefully might fail to handle such case correctly." | f | f := 2r1011 asFloat. "scan the whole range of possible exponents for this significand" Float fmin exponent + f exponent to: Float fmax exponent - f exponent do: [:exp | | g | g := f timesTwoPower: exp. + self assert: (g timesTwoPower: Float fmin exponent - g exponent) = Float fmin]. + + "Forces a failure for 5.2 release. The test result seems to depend on the word size of the VM --pre" + self assert: false. ! - self assert: (g timesTwoPower: Float fmin exponent - g exponent) = Float fmin]!
packages@lists.squeakfoundation.org