Skip to content
Subhajit Sahu edited this page Aug 8, 2022 · 2 revisions

Find the nth root of a number (ⁿ√).


function root(x, n)
// x: a number
// n: root

const xmath = require('extra-math');


xmath.root(25, 2);
// → 5

xmath.root(-8, 3);
// → -2


References

Clone this wiki locally