diff --git a/CHANGELOG.md b/CHANGELOG.md index d2e9f6e2..a44b879b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Add block scoping to switch statement cases to prevent variable declaration issues - Enforce const usage for variables that are never reassigned - Add node: protocol prefix to Node.js builtin module imports for clarity +- Use modern exponentiation operator (**) instead of Math.pow() ## v0.10.9 - Add support for IPv6 urls diff --git a/biome.json b/biome.json index 09c1cce2..940dd3e7 100644 --- a/biome.json +++ b/biome.json @@ -20,8 +20,7 @@ "useLiteralKeys": "off" }, "style": { - "useTemplate": "off", - "useExponentiationOperator": "off" + "useTemplate": "off" }, "suspicious": { "noRedundantUseStrict": "off", diff --git a/test/data.js b/test/data.js index 2eab14bc..bcd76153 100644 --- a/test/data.js +++ b/test/data.js @@ -50,7 +50,7 @@ function floatChooser(maxExp) { while (isNaN(n)) { const mantissa = Math.random() * 2 - 1; const exponent = chooseInt(0, maxExp); - n = Math.pow(mantissa, exponent); + n = mantissa ** exponent; } return n; };