To find the square root of a number we use Math.sqrt(x)

but what if I want the nth root of a number? how do I find it?

thx

Printable View

- 03-01-2008, 02:46 PMperitoFind nth root of a number
To find the square root of a number we use Math.sqrt(x)

but what if I want the nth root of a number? how do I find it?

thx - 03-03-2008, 07:51 AMEranga
Try to figure out the mathematical logic that how the n

^{th}root deal in mathematics. Then write your own code. Because I've not remember there is a direct way to find the any root of a number. Just go through the documnet.