Navigation
Synopsis Calculate the nth root of a numeric value.
Function real nroot(num x, int n)
Usage import util::Math;
Description Calculate nx where n can only be a integer.
Examples
rascal>import util::Math;
ok
rascal>nroot(42 * 42, 2);
real: 42.00000000000
rascal>nroot(42 * 42 * 42, 3);
real: 42.00000000000
rascal>nroot(123456789012345678901234567890123456789.0, 100)
real: 2.40389309382
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.