-
-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaces `Math.sqrt(a)` and `Math.cbrt(a)` when a is a constant and the result is an integer. The motivation of this PR is to add a comment that `Math.sqrt` / `Math.cbrt` cannot be replaced to `**`, rather than the actual minification improvement. **Reference** - [Spec of `Math.sqrt`](https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-math.sqrt) - [Spec of `Math.cbrt`](https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-math.cbrt) - [Spec of `Number::exponentiate`](https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-numeric-types-number-exponentiate)
- Loading branch information
1 parent
360d49e
commit 9e32f55
Showing
1 changed file
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters