In comp.lang.javascript message <
[email protected]>
Randy Webb wrote on 07 mrt 2007 in comp.lang.javascript:
There is no such limitation.
;-)
But to be useful:
Anything? Also any fraction or any negative integer?
Yes, yes.
ISTM that, unless the code is an obfuscation of false, the right hand
side must be, or have a chance of being, smaller in absolute value than
the divisor is or may be. And, generally, all three values need to be
such as can be represented exactly by an IEEE Double, including NaN, if
the statement is to be reliably usable.
The OP could easily have answered his question by searching the PDF of
the Standards (FAQ cites one of them, IIRC) for "%".
The sections of the standards dealing with the % operator need
rewriting; at present, they use "floating-point" to mean "non-integer".
All Numbers are floating point currently.
It's a good idea to read the newsgroup and its FAQ. See below.