Rename Number.prototype.clz to Math.clz

Adam Ahmed aahmed at atlassian.com
Fri Jan 17 12:16:43 PST 2014


On 18 January 2014 06:25, Jason Orendorff <jason.orendorff at gmail.com> wrote:

>
> Except I think we want bitlen(0) === 0 for consistency with clz.
>
>
Just noting that this actually works:
 Math.ceil(Math.log(0 + 1) / Math.LN2) === 0

However:
 Math.ceil(Math.log(-1 + 1) / Math.LN2) === -Infinity

Not sure how that affects a Negative NaN-cy option :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140118/939c569d/attachment.html>


More information about the es-discuss mailing list