mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
226 lines
2.8 KiB
226 lines
2.8 KiB
summary: rounding issues for parsing integers larger than 2^53
|
|
---
|
|
basic tests
|
|
NaN
|
|
123
|
|
51966
|
|
65
|
|
58798832
|
|
coercion
|
|
toString()
|
|
123
|
|
whitespace strip test
|
|
321
|
|
123
|
|
123
|
|
trailing garbage
|
|
123
|
|
123
|
|
123
|
|
123
|
|
123
|
|
123
|
|
-123
|
|
-123
|
|
-123
|
|
-128
|
|
128
|
|
-57005
|
|
4660
|
|
fractions
|
|
12345678
|
|
12345678
|
|
12345678
|
|
-12345678
|
|
-12345678
|
|
-12345678
|
|
-128
|
|
128
|
|
radix tests
|
|
NaN
|
|
8
|
|
1000
|
|
46656
|
|
NaN
|
|
1000
|
|
1000
|
|
1000
|
|
1000
|
|
1000
|
|
1000
|
|
46656
|
|
46656
|
|
NaN
|
|
8
|
|
1000
|
|
46656
|
|
NaN
|
|
NaN
|
|
8
|
|
1000
|
|
46656
|
|
NaN
|
|
42875
|
|
42875
|
|
46656
|
|
radix 16
|
|
51966
|
|
-51966
|
|
51966
|
|
-51966
|
|
-51966
|
|
51966
|
|
-51966
|
|
51966
|
|
0
|
|
0
|
|
0
|
|
0
|
|
signed values
|
|
123
|
|
-123
|
|
291
|
|
-291
|
|
66
|
|
-66
|
|
leading zeroes
|
|
123
|
|
123
|
|
-123
|
|
129
|
|
129
|
|
-129
|
|
57005
|
|
57005
|
|
-57005
|
|
668
|
|
668
|
|
-668
|
|
numbers below/above 2**53
|
|
(testdump)
|
|
9007199254740984
|
|
9007199254740985
|
|
9007199254740986
|
|
9007199254740987
|
|
9007199254740988
|
|
9007199254740989
|
|
9007199254740990
|
|
9007199254740991
|
|
9007199254740992
|
|
9007199254740992
|
|
9007199254740994
|
|
9007199254740996
|
|
9007199254740996
|
|
9007199254740996
|
|
9007199254740998
|
|
9007199254741000
|
|
9007199254741000
|
|
(parse decimals)
|
|
9007199254740992
|
|
9007199254740994
|
|
9007199254740994
|
|
9007199254740996
|
|
9007199254740996
|
|
9007199254740998
|
|
9007199254740998
|
|
9007199254741000
|
|
9007199254741000
|
|
(parse hex)
|
|
9007199254740992
|
|
9007199254740994
|
|
9007199254740994
|
|
9007199254740996
|
|
9007199254740996
|
|
9007199254740998
|
|
9007199254740998
|
|
9007199254741000
|
|
9007199254741000
|
|
(parse radix 2)
|
|
9007199254740992
|
|
9007199254740994
|
|
9007199254740994
|
|
9007199254740996
|
|
9007199254740996
|
|
9007199254740998
|
|
9007199254740998
|
|
9007199254741000
|
|
9007199254741000
|
|
(parse radix 4)
|
|
9007199254740992
|
|
9007199254740994
|
|
9007199254740994
|
|
9007199254740996
|
|
9007199254740996
|
|
9007199254740998
|
|
9007199254740998
|
|
9007199254741000
|
|
9007199254741000
|
|
(parse radix 8)
|
|
9007199254740992
|
|
9007199254740994
|
|
9007199254740994
|
|
9007199254740996
|
|
9007199254740996
|
|
9007199254740998
|
|
9007199254740998
|
|
9007199254741000
|
|
9007199254741000
|
|
(parse radix 32)
|
|
9007199254740992
|
|
9007199254740994
|
|
9007199254740994
|
|
9007199254740996
|
|
9007199254740996
|
|
9007199254740998
|
|
9007199254740998
|
|
9007199254741000
|
|
9007199254741000
|
|
(parse radix 36)
|
|
9007199254740992
|
|
9007199254740994
|
|
9007199254740994
|
|
9007199254740996
|
|
9007199254740996
|
|
9007199254740998
|
|
9007199254740998
|
|
9007199254741000
|
|
9007199254741000
|
|
large number test
|
|
2 3.402823669209385e+38 true
|
|
3 diff ok true
|
|
4 3.402823669209385e+38 true
|
|
5 diff ok true
|
|
6 diff ok true
|
|
7 diff ok true
|
|
8 3.402823669209385e+38 true
|
|
9 diff ok true
|
|
10 3.402823669209385e+38 true
|
|
11 diff ok true
|
|
12 diff ok true
|
|
13 diff ok true
|
|
14 diff ok true
|
|
15 diff ok true
|
|
16 3.402823669209385e+38 true
|
|
17 diff ok true
|
|
18 diff ok true
|
|
19 diff ok true
|
|
20 diff ok true
|
|
21 diff ok true
|
|
22 diff ok true
|
|
23 diff ok true
|
|
24 diff ok true
|
|
25 diff ok true
|
|
26 diff ok true
|
|
27 diff ok true
|
|
28 diff ok true
|
|
29 diff ok true
|
|
30 diff ok true
|
|
31 diff ok true
|
|
32 3.402823669209385e+38 true
|
|
33 diff ok true
|
|
34 diff ok true
|
|
35 diff ok true
|
|
36 diff ok true
|
|
digit cases
|
|
3735928559
|
|
1047601316294262
|
|
|