梯度下降法求平方根

class Solution:
    def mySqrt(self, x: int) -> int:
        lr = 0.001
        value = 1
        while(abs(value*value - x) > 0.001):
            value = value - 4*value*lr*(value*value - x)
        return round(value)

https://blog.csdn.net/weixin_39244297/article/details/108772358

https://blog.csdn.net/songyunli1111/article/details/90474836

http://www.sofasofa.io/forum_main_post.php?postid=1004185

http://wenda.chinahadoop.cn/question/5882

上一篇:语法分析


下一篇:时尚专业男模后期调色效果Lr预设