已知函数f(x)=e的x次方/x 定义在[1,6]区间上,利用拉格朗日插值多项式求当x=1.8时f(x)的近似值,并估计误差。
def f(x): import math return math.e**x/x print(f(1.8))