(x)
| 9480 | } |
| 9481 | |
| 9482 | function formatDecimal(x) { |
| 9483 | return Math.abs(x = Math.round(x)) >= 1e21 |
| 9484 | ? x.toLocaleString("en").replace(/,/g, "") |
| 9485 | : x.toString(10); |
| 9486 | } |
| 9487 | |
| 9488 | // Computes the decimal coefficient and exponent of the specified number x with |
| 9489 | // significant digits p, where x is positive and p is in [1, 21] or undefined. |