Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def wlamb(x):
- from math import log
- e = (1+1/1E6)**1E6
- y = log(x)
- while True:
- yold = y
- print(y)
- term_top = y*(e**y) - x
- term_bottom = (y+1)*e**y
- y = y - term_top/term_bottom
- if abs(yold - y) < 1E-6:
- break
- return y
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement