我如何计算一个数字的平方根,而无需使用内建? [英] How do I compute the square root of a number without using builtins?

查看:142
本文介绍了我如何计算一个数字的平方根,而无需使用内建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何建立方法,该方法返回给定nunber的开方?例如开方(16)返回4 随后再将sqrt(5)返回2.3 ......请帮助我使用Java和知道的Math.sqrt()API函数,但我需要方法本身

how can i create method which return sqrt of given nunber? for example sqrt(16) returns 4 and sqrt(5) returns 2.3... please help i am using java and know Math.sqrt() API function but i need method itself

推荐答案

有许多方法来计算平方根。试试这个<一href="http://en.wikipedia.org/wiki/Methods_of_computing_square_roots">http://en.wikipedia.org/wiki/Methods_of_computing_square_roots

There are numerous methods to compute Square root. Try this http://en.wikipedia.org/wiki/Methods_of_computing_square_roots

这篇关于我如何计算一个数字的平方根,而无需使用内建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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