def cosox2(x): '''(1-cos(x))/(x*x)''' if (abs(x) > 1e-2): return (1. - math.cos(x)) / (x*x) else: return 0.5 - x*x / 24 + x*x*x*x / 720.