Plato on Github
Report Home
node_modules/es5-ext/math/cbrt/shim.js
Maintainability
62.62
Lines of code
12
Difficulty
12.86
Estimated Errors
0.09
Function weight
By Complexity
By SLOC
'use strict'; var pow = Math.pow; module.exports = function (x) { if (isNaN(x)) return NaN; x = Number(x); if (x === 0) return x; if (!isFinite(x)) return x; if (x < 0) return -pow(-x, 1 / 3); return pow(x, 1 / 3); };