mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-26 06:48:04 +02:00
misc
This commit is contained in:
parent
5141c6c087
commit
14b3575baf
14 changed files with 41 additions and 25 deletions
|
@ -1,4 +1,4 @@
|
|||
from math import exp, log
|
||||
"""from math import exp, log
|
||||
|
||||
def iterate(x):
|
||||
#return x - (2.0*x - exp(-x))/(2.0+exp(-x)) #Newton
|
||||
|
@ -9,3 +9,14 @@ x = 0.9
|
|||
for i in range(10):
|
||||
print (i, x)
|
||||
x = iterate(x)
|
||||
"""
|
||||
from math import log
|
||||
f = lambda x: -log(2*x)
|
||||
|
||||
x = 0.35173371124919582602
|
||||
#x = 0.3517337112491958260249093009299510651715
|
||||
for i in range(200):
|
||||
print("x 0.35173371124919582602")
|
||||
print("x 0.3517337112491958260249093009299510651715")
|
||||
print("%i %.30f" % (i, x))
|
||||
x = f(x)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue