| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5c60087 commit 3f86dc1
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,30 +6,10 @@ require('../common'); | |||
| 6 | 6 | // See https://github.com/nodejs/node/issues/1376 | |
| 7 | 7 | // and https://code.google.com/p/v8/issues/detail?id=4019 | |
| 8 | 8 | ||
| 9 | - Math.abs(-0.5); | ||
| 10 | - Math.acos(-0.5); | ||
| 11 | - Math.acosh(-0.5); | ||
| 12 | - Math.asin(-0.5); | ||
| 13 | - Math.asinh(-0.5); | ||
| 14 | - Math.atan(-0.5); | ||
| 15 | - Math.atanh(-0.5); | ||
| 16 | - Math.cbrt(-0.5); | ||
| 17 | - Math.ceil(-0.5); | ||
| 18 | - Math.cos(-0.5); | ||
| 19 | - Math.cosh(-0.5); | ||
| 20 | - Math.exp(-0.5); | ||
| 21 | - Math.expm1(-0.5); | ||
| 22 | - Math.floor(-0.5); | ||
| 23 | - Math.fround(-0.5); | ||
| 24 | - Math.log(-0.5); | ||
| 25 | - Math.log10(-0.5); | ||
| 26 | - Math.log1p(-0.5); | ||
| 27 | - Math.log2(-0.5); | ||
| 28 | - Math.round(-0.5); | ||
| 29 | - Math.sign(-0.5); | ||
| 30 | - Math.sin(-0.5); | ||
| 31 | - Math.sinh(-0.5); | ||
| 32 | - Math.sqrt(-0.5); | ||
| 33 | - Math.tan(-0.5); | ||
| 34 | - Math.tanh(-0.5); | ||
| 35 | - Math.trunc(-0.5); | ||
| 9 | + // Iterate over all Math functions | ||
| 10 | + Object.getOwnPropertyNames(Math).forEach((functionName) => { | ||
| 11 | + if (!/[A-Z]/.test(functionName)) { | ||
| 12 | + // The function names don't have capital letters. | ||
| 13 | + Math[functionName](-0.5); | ||
| 14 | + } | ||
| 15 | + }); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments