The Trunk: Kernel-nice.839.mcz

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

The Trunk: Kernel-nice.839.mcz

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

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

Name: Kernel-nice.839
Author: nice
Time: 1 March 2014, 12:36:12.266 am
UUID: 070493d0-68d5-4385-b3a6-4ddf4c64497f
Ancestors: Kernel-nice.838

For conformance to IEEE 754-2008 (IEC 60559-2011), the sucessor of Float fmin negated is now a negativeZero.

=============== Diff against Kernel-nice.838 ===============

Item was changed:
  ----- Method: Float>>predecessor (in category 'truncation and round off') -----
  predecessor
  | ulp |
  self isFinite ifFalse: [
  (self isNaN or: [self negative]) ifTrue: [^self].
  ^Float fmax].
- self = 0.0 ifTrue: [^Float fmin negated].
  ulp := self ulp.
  ^self - (0.5 * ulp) = self
  ifTrue: [self - ulp]
  ifFalse: [self - (0.5 * ulp)]!

Item was changed:
  ----- Method: Float>>successor (in category 'truncation and round off') -----
  successor
  | ulp |
  self isFinite ifFalse: [
  (self isNaN or: [self positive]) ifTrue: [^self].
  ^Float fmax negated].
- self = 0.0 ifTrue: [^Float fmin].
  ulp := self ulp.
  ^self + (0.5 * ulp) = self
+ ifTrue: [self * -1.0 - ulp * -1.0 "This trick is for obtaining a negativeZero"]
- ifTrue: [self + ulp]
  ifFalse: [self + (0.5 * ulp)]!