[squeak-dev] The Trunk: KernelTests-pre.349.mcz

Levente Uzonyi leves at caesar.elte.hu
Sat Oct 13 14:47:36 UTC 2018


On Sat, 13 Oct 2018, commits at source.squeak.org wrote:

> 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.

This doesn't seem right. The issue is Win32 only, and the test passes on 
64-bit VMs even on windows. So that makes it a Win32-32bit-VM-only issue 
(I haven't checked if it passes there or not, but your comment suggests 
it does not).
I see no reason to bring that failure to all the other platforms.
Why not just mark it as expected failure on Win32 + 32bit VM instead?

Levente

>
> =============== 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]!


More information about the Squeak-dev mailing list