Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- #function_x = lambda y: -math.cos(y - 2)
- #function_y = lambda x: math.sin(x + 0.5) - 1
- function_x = lambda x, y: math.sqrt(math.tan(x * y + 0.3))
- function_y = lambda x: math.sqrt(abs(1.0 - 0.90 * x**2) / 2.0)
- previous_x = 0
- previous_y = 0
- eps = 0.001
- current_x = 1
- current_y = 1
- while (abs(previous_x - current_x) > eps and abs(previous_y - current_y) > eps):
- previous_y = current_y
- previous_x = current_x
- current_x = function_x (previous_x, previous_y)
- #current_x = function_x (previous_y)
- current_y = function_y (previous_x)
- print ("X =", current_x, "Y =", current_y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement