Repository navigation
Commit 8ee560d
[JSC] Fix
https://bugs.webkit.org/show_bug.cgi?id=315450
Reviewed by Yusuke Suzuki.
Discovered a bug in `Math.sumPrecise`.
For exmaple,, `Math.sumPrecise([-Number.MAX_VALUE])` returns `-infinity`.
`Math.sumPrecise([-1])` returns `-1.0000000000000002`.
This patch fixes the bug.
Test: Tools/TestWebKitAPI/Tests/WTF/PreciseSum.cpp
* JSTests/stress/math-sum-precise.js:
* Source/WTF/wtf/PreciseSum.cpp:
(WTF::Xsum::XsumSmall::compute):
* Tools/TestWebKitAPI/Tests/WTF/PreciseSum.cpp:
Canonical link: https://commits.webkit.org/324530@mainMath.sumPrecise for -Number.MAX_VALUE
1 parent db8364a commit 8ee560d
3 files changed
Lines changed: 25 additions & 9 deletions
File tree
- JSTests/stress
- Source/WTF/wtf
- Tools/TestWebKitAPI/Tests/WTF
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
| |||
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
558 | 560 | | |
559 | 561 | | |
| 562 | + | |
| 563 | + | |
560 | 564 | | |
561 | | - | |
562 | | - | |
563 | 565 | | |
564 | 566 | | |
565 | 567 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | | - | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| |||
69 | 74 | | |
70 | 75 | | |
71 | 76 | | |
| 77 | + | |
| 78 | + | |
72 | 79 | | |
73 | 80 | | |
74 | 81 | | |
| |||
0 commit comments