Skip to content

Commit 1e56536

Browse files
authored
Editorial: Replace prose with use of mathematical functions (#1041)
1 parent 33710e2 commit 1e56536

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

package-lock.json

Lines changed: 4 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
"homepage": "https://tc39.es/ecma402/",
2020
"dependencies": {
2121
"ecmarkup": "^22.0.0",
22-
"@tc39/ecma262-biblio": "=2.1.3014"
22+
"@tc39/ecma262-biblio": "=2.1.3018"
2323
}
2424
}

spec/numberformat.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,13 +1533,13 @@ <h1>
15331533
1. Return 0.
15341534
1. If _x_ &lt; 0, then
15351535
1. Let _x_ = -_x_.
1536-
1. Let _magnitude_ be the base 10 logarithm of _x_ rounded down to the nearest integer.
1536+
1. Let _magnitude_ be floor(log10(_x_)).
15371537
1. Let _exponent_ be ComputeExponentForMagnitude(_numberFormat_, _magnitude_).
15381538
1. Let _x_ be _x_ × 10<sup>-_exponent_</sup>.
15391539
1. Let _formatNumberResult_ be FormatNumericToString(_numberFormat_, _x_).
15401540
1. If _formatNumberResult_.[[RoundedNumber]] = 0, then
15411541
1. Return _exponent_.
1542-
1. Let _newMagnitude_ be the base 10 logarithm of _formatNumberResult_.[[RoundedNumber]] rounded down to the nearest integer.
1542+
1. Let _newMagnitude_ be floor(log10(_formatNumberResult_.[[RoundedNumber]])).
15431543
1. If _newMagnitude_ is _magnitude_ - _exponent_, then
15441544
1. Return _exponent_.
15451545
1. Return ComputeExponentForMagnitude(_numberFormat_, _magnitude_ + 1).

0 commit comments

Comments
 (0)