📜  developmentpement limité sinus python 代码示例

📅  最后修改于: 2022-03-11 14:45:21.226000             🧑  作者: Mango

代码示例1
import math
def sin(x,n):
    z = 0
    for i in range(n+1):
        z = z + ( (-1)**i / math.factorial(2*i+1) ) * x**(2*i+1)
    return float("{:.4f}".format(z))