You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
316 B
13 lines
316 B
var $ = require('../internals/export');
|
|
var sign = require('../internals/math-sign');
|
|
|
|
var abs = Math.abs;
|
|
var pow = Math.pow;
|
|
|
|
// `Math.cbrt` method
|
|
// https://tc39.github.io/ecma262/#sec-math.cbrt
|
|
$({ target: 'Math', stat: true }, {
|
|
cbrt: function cbrt(x) {
|
|
return sign(x = +x) * pow(abs(x), 1 / 3);
|
|
}
|
|
});
|
|
|