The Trunk: CollectionsTests-nice.217.mcz

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

The Trunk: CollectionsTests-nice.217.mcz

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

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

Name: CollectionsTests-nice.217
Author: nice
Time: 3 May 2014, 10:50:53.513 pm
UUID: 9841df48-0242-4d53-8a66-cc3bec9c24c9
Ancestors: CollectionsTests-eem.216

Now that there is a direct access to Float negativeInfinity, use it.

=============== Diff against CollectionsTests-eem.216 ===============

Item was changed:
  ----- Method: FloatArrayTest>>testFloatArrayPluginPrimitiveAt (in category 'testing') -----
  testFloatArrayPluginPrimitiveAt
  "if FloatArrayPlugin primitive are not here, this test is dumb.
  Otherwise, it will compare primitive and #fromIEEE32Bit:"
 
  #(
  "regular numbers no truncation or rounding"
  2r0.0 2r1.0 2r1.1 2r1.00000000000000000000001
  2r1.0e-10 2r1.1e-10 2r1.00000000000000000000001e-10
  2r1.0e10 2r1.1e10 2r1.00000000000000000000001e10
 
  "smallest float32 before gradual underflow"
  2r1.0e-126
 
  "biggest float32"
  2r1.11111111111111111111111e127
 
  "overflow"
  2r1.11111111111111111111111e128
 
  "gradual underflow"
  2r0.11111111111111111111111e-126
  2r0.00000000000000000000001e-126
 
  "with rounding mode : tests on 25 bits"
 
  2r1.0000000000000000000000001
  2r1.0000000000000000000000010
  2r1.0000000000000000000000011
  2r1.0000000000000000000000100
  2r1.0000000000000000000000101
  2r1.0000000000000000000000110
  2r1.0000000000000000000000111
  2r1.1111111111111111111111001
  2r1.1111111111111111111111010
  2r1.1111111111111111111111011
  2r1.1111111111111111111111101
  2r1.1111111111111111111111110
  2r1.1111111111111111111111111
 
  "overflow"
  2r1.1111111111111111111111110e127
 
  "gradual underflow"
  2r0.1111111111111111111111111e-126
  2r0.1111111111111111111111110e-126
  2r0.1111111111111111111111101e-126
  2r0.1111111111111111111111011e-126
  2r0.1111111111111111111111010e-126
  2r0.1111111111111111111111001e-126
  2r0.0000000000000000000000111e-126
  2r0.0000000000000000000000110e-126
  2r0.0000000000000000000000101e-126
  2r0.0000000000000000000000011e-126
  2r0.0000000000000000000000010e-126
  2r0.0000000000000000000000001e-126
  2r0.0000000000000000000000010000000000000000000000000001e-126
  ) do: [:e |
  self assert: ((FloatArray with: e) at: 1) = (Float fromIEEE32Bit: ((FloatArray with: e) basicAt: 1)).
  self assert: ((FloatArray with: e negated) at: 1) = (Float fromIEEE32Bit: ((FloatArray with: e negated) basicAt: 1))].
 
  "special cases"
+ (Array with: Float infinity with: Float negativeInfinity with: Float negativeZero)
- (Array with: Float infinity with: Float infinity negated with: Float negativeZero)
  do: [:e | self assert: ((FloatArray with: e) at: 1) = (Float fromIEEE32Bit: ((FloatArray with: e) basicAt: 1))].
 
  "Cannot compare NaN"
  (Array with: Float nan)
  do: [:e | self assert: (Float fromIEEE32Bit: ((FloatArray with: e) basicAt: 1)) isNaN].!

Item was changed:
  ----- Method: FloatArrayTest>>testFloatArrayPluginPrimitiveAtPut (in category 'testing') -----
  testFloatArrayPluginPrimitiveAtPut
  "if FloatArrayPlugin primitive are not here, this test is dumb.
  Otherwise, it will compare primitive and #asIEEE32BitWord"
 
  #(
  "regular numbers no truncation or rounding"
  2r0.0 2r1.0 2r1.1 2r1.00000000000000000000001
  2r1.0e-10 2r1.1e-10 2r1.00000000000000000000001e-10
  2r1.0e10 2r1.1e10 2r1.00000000000000000000001e10
 
  "smallest float32 before gradual underflow"
  2r1.0e-126
 
  "biggest float32"
  2r1.11111111111111111111111e127
 
  "overflow"
  2r1.11111111111111111111111e128
 
  "gradual underflow"
  2r0.11111111111111111111111e-126
  2r0.00000000000000000000001e-126
 
  "with rounding mode : tests on 25 bits"
 
  2r1.0000000000000000000000001
  2r1.0000000000000000000000010
  2r1.0000000000000000000000011
  2r1.0000000000000000000000100
  2r1.0000000000000000000000101
  2r1.0000000000000000000000110
  2r1.0000000000000000000000111
  2r1.1111111111111111111111001
  2r1.1111111111111111111111010
  2r1.1111111111111111111111011
  2r1.1111111111111111111111101
  2r1.1111111111111111111111110
  2r1.1111111111111111111111111
 
  "overflow"
  2r1.1111111111111111111111110e127
 
  "gradual underflow"
  2r0.1111111111111111111111111e-126
  2r0.1111111111111111111111110e-126
  2r0.1111111111111111111111101e-126
  2r0.1111111111111111111111011e-126
  2r0.1111111111111111111111010e-126
  2r0.1111111111111111111111001e-126
  2r0.0000000000000000000000111e-126
  2r0.0000000000000000000000110e-126
  2r0.0000000000000000000000101e-126
  2r0.0000000000000000000000011e-126
  2r0.0000000000000000000000010e-126
  2r0.0000000000000000000000001e-126
  2r0.0000000000000000000000010000000000000000000000000001e-126
  ) do: [:e |
  self assert: ((FloatArray with: e) basicAt: 1) = e asIEEE32BitWord.
  self assert: ((FloatArray with: e negated) basicAt: 1) = e negated asIEEE32BitWord].
 
  "special cases"
+ (Array with: Float infinity with: Float negativeInfinity with: Float negativeZero with: Float nan)
- (Array with: Float infinity with: Float infinity negated with: Float negativeZero with: Float nan)
  do: [:e | self assert: ((FloatArray with: e) basicAt: 1) = e asIEEE32BitWord].
  !