[squeak-dev] The Trunk: Kernel-nice.689.mcz

commits at source.squeak.org commits at source.squeak.org
Wed May 16 19:34:34 UTC 2012


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

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

Name: Kernel-nice.689
Author: nice
Time: 16 May 2012, 9:32:53.987 pm
UUID: 06728744-bdfb-4e41-aa4c-39da40f860a4
Ancestors: Kernel-nice.688

Let #floorLog: be exact in the base used by underlying Float implementation (currently 2 is hardcoded because Float class>>base was not implemented).
In other cases, warn about possible rounding errors.

=============== Diff against Kernel-nice.688 ===============

Item was changed:
  ----- Method: Float>>floorLog: (in category 'mathematical functions') -----
  floorLog: radix
+ 	"Answer the floor of the log base radix of the receiver.
+ 	The result may be off by one due to rounding errors, except in base 2."
- 	"Answer the floor of the log base radix of the receiver."
  
+ 	(radix = 2 and: [self > 0.0]) ifTrue: [^self exponent].
  	^ (self log: radix) floor
  !



More information about the Squeak-dev mailing list