[squeak-dev] The Trunk: KernelTests-nice.197.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Jul 15 20:20:41 UTC 2011
Nicolas Cellier uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-nice.197.mcz
==================== Summary ====================
Name: KernelTests-nice.197
Author: nice
Time: 15 July 2011, 10:20:20.448 pm
UUID: 23536209-6991-45d4-b8c3-364a33507f52
Ancestors: KernelTests-cmm.196
Test: a negative fraction asFloat should answer negativeZero when it underflows
=============== Diff against KernelTests-cmm.196 ===============
Item was added:
+ ----- Method: FloatTest>>testFractionAsFloatWithUnderflow (in category 'testing - conversion') -----
+ testFractionAsFloatWithUnderflow
+ "test rounding to nearest even"
+
+ | underflowPower |
+ underflowPower := Float emin - Float precision.
+ self assert: (2 raisedTo: underflowPower) asFloat = 0.0.
+ self assert: (2 raisedTo: underflowPower) negated asFloat = 0.0.
+ self assert: (2 raisedTo: underflowPower) negated asFloat sign = -1 description: 'a negative underflow should return a negative zero'.!
More information about the Squeak-dev
mailing list
|