[squeak-dev] The Inbox: Kernel-ul.1410.mcz

Levente Uzonyi leves at caesar.elte.hu
Fri Sep 10 12:27:05 UTC 2021


On Fri, 10 Sep 2021, Nicolas Cellier wrote:

> Ah, but I now see that you excluded negative powers...
> 
>     (2 raisedTo: -3) isPowerOfTwo.
> 
> That's a choice...

That's what I did but it doesn't seem to match the previous 
implementation.
Perhaps a better way to do it is to leave Float's implementation as-is 
and use numerator = 1 and: [ denominator isPowerOfTwo ] for Fractions.


Levente


More information about the Squeak-dev mailing list