Oliver Hunt (2013-07-12T17:16:14.000Z)
domenic at domenicdenicola.com (2013-07-15T22:43:55.501Z)
On Jul 12, 2013, at 8:58 AM, Luke Hoban <lukeh at microsoft.com> wrote: > Yeah, I think `Math` would have been less surprising. I don't feel strongly, but `Number.prototype` wasn't what I had expected. I agree with luke, `Math.clz` seems like a better place than the prototype, otoh there's a nice conciseness to `foo.clz()` … > Sorry, I meant `isInteger`. Per your quoted section, `toInteger(Infinity)` is `Infinity`, so `isInteger(Infinity)` is `true`. I agree with MarkM that it seems bizarre that non-finite numbers may return true, but i think this is rooted in `.isInteger()` sounding like it means a 32bit integer (such that bitops won't modify the value) when it is actually a "no fractional component" test.