def specialFun2(x):
'''(2.*(1.-cos(x)) - x*sin(x))/(2.*x*x*(1.-cos(x)))'''
if (abs(x) > 1e-2):
return (2.*(1. - math.cos(x)) - x*math.sin(x)) / (2.*x*x*(1. - math.cos(x)))
else:
return 1./12. + x*x / 720. + x*x*x*x / 30240.
评论列表
文章目录