[squeak-dev] The Inbox: Kernel-nice.1295.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Feb 17 17:59:28 UTC 2020


Nicolas Cellier uploaded a new version of Kernel to project The Inbox:
http://source.squeak.org/inbox/Kernel-nice.1295.mcz

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

Name: Kernel-nice.1295
Author: nice
Time: 17 February 2020, 6:59:12.589583 pm
UUID: 7b8c61b2-fd1d-473e-9536-57f78a6ec152
Ancestors: Kernel-tonyg.1293

Fast-up isAnExactFloat.
Correct a typo in a comment.

=============== Diff against Kernel-tonyg.1293 ===============

Item was changed:
  ----- Method: Integer>>isAnExactFloat (in category 'testing') -----
  isAnExactFloat
  	"Answer true if this Integer can be converted exactly to a Float"
  	| h |
  	(h := self highBitOfMagnitude) <= Float precision
  		ifTrue: [^ true].
  	^ h - 1 <= Float emax
+ 		and: [(self anyBitOfMagnitudeFrom: 1 to: h - Float precision) not]!
- 		and: [h - self abs lowBit < Float precision]!

Item was changed:
  ----- Method: NumberParser>>makeFloatFromMantissa:exponent:base: (in category 'parsing-private') -----
  makeFloatFromMantissa: m exponent: k base: aRadix 
+ 	"Convert infinite precision arithmetic into limited precision Floating point.
+ 	This algorithm rely on correct IEEE rounding mode
- 	"Convert infinite precision arithmetic into Floating point.
- 	This alogrithm rely on correct IEEE rounding mode
  	being implemented in Integer>>asFloat and Fraction>>asFloat"
  
  	k = 0 ifTrue: [ ^m asFloat ].
  	k > 0 ifTrue: [ ^(m * (aRadix raisedToInteger: k)) asFloat ].
  	^(Fraction numerator: m denominator: (aRadix raisedToInteger: k negated)) asFloat!



More information about the Squeak-dev mailing list