[squeak-dev] The Trunk: Kernel-nice.636.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Oct 14 20:06:28 UTC 2011
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.636.mcz
==================== Summary ====================
Name: Kernel-nice.636
Author: nice
Time: 14 October 2011, 10:05:36.672 pm
UUID: 87b3aaea-65b6-4ebf-8855-ef8f27bcb0c3
Ancestors: Kernel-nice.635
Fix ScaledDecimal which didn't work anymore, and let it be exact when possible.
=============== Diff against Kernel-nice.635 ===============
Item was added:
+ ----- Method: ScaledDecimal>>sqrt (in category 'mathematical functions') -----
+ sqrt
+ "Answer the square root of the receiver.
+ Preserve receiver class and scale if answer is exact.
+ Otherwise, answer a Float to denote inexactness."
+ | squareRoot |
+ squareRoot := self asFraction sqrt.
+ ^squareRoot isFloat
+ ifTrue: [squareRoot]
+ ifFalse: [squareRoot asScaledDecimal: scale]!
More information about the Squeak-dev
mailing list
|