算法找到的一个数的平方根? [英] Algorithm to find a square root of a number?

查看:216
本文介绍了算法找到的一个数的平方根?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我知道这个问题的唯一算法是牛顿法(做一个猜想,然后改进它,直到它的不够好)。

The only algorithm that I know for this problem is the Newton's method (make a guess, then improve it until it's good enough).

任何其他的想法(您使用任何语言preFER)?

Any other ideas (use any language you prefer)?

PS:当然我没有任何使用情况下,对于这一点,我只是研究它的学术原因。

PS: Of course I don't have any use case for this, I'm just researching it for academic reasons.

推荐答案

总是有约翰·卡马克方法,它是经牛顿方法的高效变异

There is always the John Carmack method, which is a highly efficient variation upon the Newton method.

这篇关于算法找到的一个数的平方根?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆