Clean up radix conversion in Number toString method (#2002)
The radix conversion code path was very messy which made it hard to understand what was happening inside of it. The code got cleaned up, and a lot of comments were added that explain what is happening and why. JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
This commit is contained in:
@@ -90,7 +90,7 @@ assert ((-0x100000000000061).toString(16) === "-100000000000060");
|
||||
|
||||
assert((123400).toString(new Number(16)) === "1e208");
|
||||
|
||||
assert(65535.9.toString(3) === "10022220020.220022002200220022002210211012200000110221");
|
||||
assert(65535.9.toString(3) === "10022220020.2200220022002200220022102110122000001102212");
|
||||
|
||||
var digit_chars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
|
||||
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
|
||||
|
||||
Reference in New Issue
Block a user