Thank you, Levente! :-)<br>
<br>
<font color="#808080">---<br>
</font><i><font color="#808080">Sent from </font></i><i><u><a href="https://github.com/hpi-swa-lab/squeak-inbox-talk"><font color="#808080">Squeak Inbox Talk</font></a></u></i><br>
<br>
On 2021-09-10T03:24:13+02:00, leves@caesar.elte.hu wrote:<br>
<br>
> Hi Christoph,<br>
> <br>
> On Tue, 7 Sep 2021, commits at source.squeak.org wrote:<br>
> <br>
> > A new version of Kernel was added to project The Inbox:<br>
> > http://source.squeak.org/inbox/Kernel-ct.1412.mcz<br>
> ><br>
> > ==================== Summary ====================<br>
> ><br>
> > Name: Kernel-ct.1412<br>
> > Author: ct<br>
> > Time: 7 September 2021, 11:54:32.77151 pm<br>
> > UUID: ca064a0e-13a5-f64f-ac9e-91ae045569a7<br>
> > Ancestors: Kernel-eem.1408<br>
> ><br>
> > Adds non-performant but existing implementation of #isPowerOfTwo on Number. Now 16s isPowerOfTwo works as expected, too. Complements Kernel-nice.1377.<br>
> ><br>
> > =============== Diff against Kernel-eem.1408 ===============<br>
> ><br>
> > Item was added:<br>
> > + ----- Method: Number>>isPowerOfTwo (in category 'testing') -----<br>
> > + isPowerOfTwo<br>
> > + <br>
> > +     ^ self strictlyPositive and: [(self log2 \\ 1) isZero]!<br>
> <br>
> It's possible to create a Fraction for which that expression returns true. <br>
> For example (1 << 54 - 1) / (1 << 53).<br>
> However, the method should return false for all Fractions due to <br>
> normalization.<br>
> I pushed a simpler and probably faster solution based on inheritance to <br>
> the Inbox. See Kernel-ul.1410.<br>
> <br>
> <br>
> Levente<br>
> <br>