标签:factor mat format http actor down for inf .com
dayfactor=0.01
dayup=pow(1+dayfactor,365)
daydown=pow(1-dayfactor,365)
print("向上:{:.2f},向下:{:.2f}".format(dayup,daydown))
>>>向上:37.78,向下:0.03
dayup=pow(1.001,365)
daydown=pow(0.999,365)
print("向上:{:.2f},向下:{:.2f}".format(dayup,daydown))
>>>向上:1.44,向下:0.69
dayfactor=0.005
dayup=pow(1+dayfactor,365)
daydown=pow(1-dayfactor,365)
print("向上:{:.2f},向下:{:.2f}".format(dayup,daydown))
>>>向上:6.17,向下:0.16
标签:factor mat format http actor down for inf .com
原文地址:https://www.cnblogs.com/pengwa1226/p/10425317.html