From: Dr J R Stockton on

ECMA 262 5 sections "15.7.4.2 Number.prototype.toString ( [ radix ] )"
and "9.8.1 ToString Applied to the Number Type" are rather weakly
definitive for radix != 10.

No pair of my browsers generally give the same results. One often
rounds up by taking the ASCII or UniCode number for the character at the
last position to be retained and _incrementing_ it, which can result in
':' '{' or 'radix'. Two commonly give strings in excess of 1000
characters. One gives trailing zeroes rather than shortening.

See
<URL:http://www.merlyn.demon.co.uk/js-randm.htm#TWRN>
<URL:http://www.merlyn.demon.co.uk/js-maths.htm#pF>.

Does anyone have, or know of, a provably-correct algorithm, written
using reliable parts of ECMAScript, to obtain from any finite Number a
fixed-point base-radix string?

--
(c) John Stockton, nr London UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (RFCs 5536/7)
Do not Mail News to me. Before a reply, quote with ">" or "> " (RFCs 5536/7)