Search This Blog

2021/01/17

牛顿迭代法求根号的值

例:求根号2等于多少。随意猜测为4,用牛顿迭代法

(4+2/4)/2=2.25

(2.25+2/2.25)/2=1.56944...

(1.56944...+2/1.56944...)/2=1.42189...

(1.42189...+2/1.42189...)/2=1.41423...

......