mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-26 06:48:04 +02:00
Ideen zu Aufgabe 2 hinzugefügt
This commit is contained in:
parent
6ca98b3389
commit
01697e000d
4 changed files with 61 additions and 0 deletions
11
documents/Numerik/Klausur6/aufgabe2.py
Normal file
11
documents/Numerik/Klausur6/aufgabe2.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
from math import exp, log
|
||||
|
||||
def iterate(x):
|
||||
#return x - (2.0*x - exp(-x))/(2.0+exp(-x)) #Newton
|
||||
#return 0.5*exp(-x) #F_1
|
||||
return (-1)*log(2.0*x) #F_2
|
||||
|
||||
x = 0.9
|
||||
for i in range(10):
|
||||
print (i, x)
|
||||
x = iterate(x)
|
Loading…
Add table
Add a link
Reference in a new issue