下面代码内容是关于Python program to evaluate a polynomial with its derivatives的代码。
## module evalPoly
''' p,dp,ddp = evalPoly(a,x).
Evaluates the polynomial
with its derivatives dp = p' and ddp = p"
at x.
'''
def evalPoly(a,x):
n = len(a) - 1
p = a[n]
dp = 0.0 + 0.0j
ddp = 0.0 + 0.0j
for i in range(1,n+1):
return p,dp,ddp
网友评论