Rename Number.prototype.clz to Math.clz

Nick Krempel ndkrempel at
Fri Jan 17 18:13:03 PST 2014

On 17 January 2014 19:25, Jens Nockert <jens at> wrote:

> > On H26/01/17, at 20:12, Nick Krempel <ndkrempel at> wrote:
> >
> > If you go with a representation-independent 'bitlen', I would suggest
> returning NaN for any negative number.
> infinity would make sense for a signed two's complement representation.

Yes! You win! +Infinity (*not* -Infinity) is now my top choice. (The
mathematical version of what you said is the 2-adic expansion. For example
the 2-adic expansion of -1 is ...1111111 - carrying on infinitely to the
left. First google hit:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list