SHARE
TWEET

Untitled

a guest Apr 18th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from math import *
  2.  
  3. def false_position(f, a, b, tol):
  4.   ##
  5.   return iterations, root
  6.  
  7.  
  8. a, b, tol = input().split(' ')
  9. a = float(a)
  10. b = float(b)
  11. tol = float(tol)
  12.  
  13. f = lambda x: sin(x)
  14.  
  15. itr, root = false_position(f, a, b, tol)
  16. print(round(root, 8))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top