SHARE
TWEET

Untitled

a guest Nov 20th, 2019 102 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. import math as m
  3.  
  4. def polyval(p):
  5.     erg = 0.0
  6.     for i in range(len(p) - 1):
  7.         erg += p[i] * m.pow(p[-1], i)
  8.        
  9.     return erg
  10. print("%1.1f" % polyval([1, 0, -0.4, 2]))
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