The Trunk: KernelTests-nice.287.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: KernelTests-nice.287.mcz

commits-2
Nicolas Cellier uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-nice.287.mcz

==================== Summary ====================

Name: KernelTests-nice.287
Author: nice
Time: 12 February 2015, 2:54:16.228 am
UUID: 1840fdc4-1888-4577-8c05-804aee4bdd99
Ancestors: KernelTests-mt.286

Put some higher expectations from #timesTwoPower: fallback code than it can currently handle.

Some of these test will start failing when the primitive is disabled.
Some will fail immediately.

=============== Diff against KernelTests-mt.286 ===============

Item was added:
+ ----- 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.
+ A naive implementation might fail to handle such case correctly."
+ | f |
+ f := 3.0 reciprocal predecessor predecessor predecessor.
+ self deny: ((f timesTwoPower: Float emin) timesTwoPower: -3) = (f timesTwoPower: Float emin - 3)!

Item was added:
+ ----- Method: FloatTest>>testTimesTwoPowerOverflow (in category 'testing - arithmetic') -----
+ testTimesTwoPowerOverflow
+ self assert: (Float fminNormalized timesTwoPower: Float emax - Float emin) equals: (2.0 raisedTo: Float emax).
+ self assert: (Float zero timesTwoPower: SmallInteger maxVal squared) equals: Float zero.
+ !

Item was added:
+ ----- Method: FloatTest>>testTimesTwoPowerUnderflow (in category 'testing - arithmetic') -----
+ testTimesTwoPowerUnderflow
+ self assert: ((2.0 raisedTo: Float emax) timesTwoPower: Float emin - Float emax) equals: Float fminNormalized.
+ self assert: (Float infinity timesTwoPower: SmallInteger minVal * SmallInteger maxVal) equals: Float infinity.
+ !