0 Replies - 299 Views - Last Post: 14 April 2010 - 03:43 PM

#1 macosxnerd101   User is online

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12648
  • View blog
  • Posts: 45,822
  • Joined: 27-December 08

Nth-Root Finder

Posted 14 April 2010 - 03:43 PM

Description: This snippet finds the Nth root of a number using the definition e^(ln(x)/root)
public double root(double num, int rt){
    return Math.pow(Math.E, Math.log(num)/rt);
}

Is This A Good Question/Topic? 0
  • +

Page 1 of 1