Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Lambert W function solution in Clear category for Super Root by suic
import math
def super_root(number):
if number == 1: return 1
l = math.log(number)
return round(l / W(l), 20)
def W(x): # Lambert W function using Newton's method
eps = 0.000000000001 # max error allowed
w = x
while True:
ew = math.exp(w)
wNew = w - (w * ew - x) / (w * ew + ew)
if abs(w - wNew) <= eps: break
w = wNew
return w
Dec. 1, 2014
Comments: