Safari / Mac:
navigator.userAgent
--> "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us)
AppleWebKit/534.1+ (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7"
Thanks, I am seeing this in Google Chrome 5.0.375.55 beta for Linux (V8
2.1), too.
The reason of this is apparently that the fractional part of
"3.4m6dn4ow9qwe210nr3u0cdqkcnrbmwlh7kmfeapn9fijt38kie44jvdqh2vfrd6ogbvu
rnjq2bqkbr01f97av5k7uaffclrl3hmt2glugpaqe422qgfn81ca8pa73pmt51ewqo9234c
km2twg1qgwmahsv1pdti9bug3bjc9w0sn9ul421p5aanjnfuab9rq3bm5lchsu5aq6000no
i5wcf9c5p5idkgclha9j05bcupqqcb9h08dc3i2v2qcqjks96pgpkmangnavpt7tk6kvrfo
s0qq63iqrgv5nu2i8goh8tjmifwbwf9t3bvcd4r61tbqa05ca16ql0icacmucfcl1h3ceb1
hrdmhhmsp8ri842wn3nj97v7r5i9mdv135qo5jd9bn9chun8n1h11qlgt35mqksnn8ef4p6
kdade1d2t1bfigevwtjnjufm5sc9vhgq7qusio03g1ctrgmukjj5frghkmw1f1dhl4hvr7c
8slmplk66fb34twd9dwkvb16dfi8lbq8nvftmvwo2o4aukf0d252v3go1gtbgfbj8qoqtsf
8hpkkdfw9w686je30nmk6ojecalbc9ifs533e4gucpivw3327b1rc8a7qvqplce4o5agc9s
9h64lia1bker9hhbj7tq6saw68e7c6nqo37v97nbgl8bcgniv3g7ebvrwufnuqsqhlk6fee
7nsj348jwe0nstlnrjcet17sdksk7fo81rwtn6tknpo7lmcmskd4t5lebji6h6riabtauul
s2d49kgak0cu02fbwfklvn6jdlchkn7uwfa7qvncrfrw2umrhpja4hkwgrm261o8cf67c0a
lckiq428lpcvnjub55qkp15l90pbd47w9tupnf87iwjt8stpccka0scrqi7o6v8vmn1b73c
9f4r4g3m11ofcdw5rq7rv89s69mnoumfpark413hsogn5lb4qawo789t7oet5kfolb9ltn9
wm4iqlhi1glc5e2nd9q6jc6dghqcr5epkf2fde1rpd3ii2ouj7bq0pn16n4l28b85thc8ob
3bi7debdwogfnhfaif0v6h4k2i9k39fkrvmlc", which is the 33-ary representation
of Math.PI there, is parsed (because of its length) into `Infinity', while
in JavaScript 1.8.2 the representation is rounded to "3.4m6dn4ow9r" and
therefore the fractional part is not parsed into `Infinity'.
Therefore, it appears to be prudent to truncate the fractional part so that
it is not parsed into `Infinity'. A simple solution is to restrict the
number of characters matched by the regular expression, like:
... new RegExp("\\.([" + chars + "]{1,10})", "i") ...
A more sophisticated solution would be an adaptive algorithm that uses only
as many characters as possible so that the result would not be `Infinity'
given the numeric base. An implementation of that might be available
through the Mozilla sources.