Golden ratio approximation function with a number bound between successor and predecessor to break

前端 未结 0 1461
北荒
北荒 2020-11-22 00:48
def approximation_of_golden_ratio(eps):
    first_k = 1
    while True:
        next_k = 1 + 1/first_k
        if eps > (next_k - first_k):
            break
             


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题