Nth root of a number using log | Function to find the Kth root of the number using log function ; Driver Code
function kthRoot ( n , k ) { return Math . pow ( k , ( ( 1.0 / k ) * ( Math . log ( n ) / Math . log ( k ) ) ) ) ; } var n = 81 ; var k = 4 ; var x = kthRoot ( n , k ) document . write ( x . toFixed ( 6 ) ) ;