文件名称:63
-
所属分类:
- 标签属性:
- 上传时间:2013-05-19
-
文件大小:646byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
用减奇数次数的方法,求一个数的近似平方根,这个平方根是一个整数。如求17的平方根,可以用17相继减去奇数1、3、5、7、…,当结果为 负数时停止,即:
17-1-3-5-7-9<0
可以看出,17在减去5次奇数后结果变为负数,可以近似认为17的平方根在4与5之间,计算NUM的平方根,如果NUM=17,则ANS中保存结果4。
-Save odd-frequency method, find a number of approximate square root of the square root is an integer. Such as for the square root of 17, 17 can be used successively subtracting the odd-numbered 1,3,5,7, ..., and stopped when the result is negative, i.e.: 17-1-3-5-7-9 < 0 As can be seen, 17 minus 5 odd result becomes negative, can be approximated by the square root of 17 is between 4 and 5 to calculate the square root of the NUM, if num = 17, then save the results of the ANS.
17-1-3-5-7-9<0
可以看出,17在减去5次奇数后结果变为负数,可以近似认为17的平方根在4与5之间,计算NUM的平方根,如果NUM=17,则ANS中保存结果4。
-Save odd-frequency method, find a number of approximate square root of the square root is an integer. Such as for the square root of 17, 17 can be used successively subtracting the odd-numbered 1,3,5,7, ..., and stopped when the result is negative, i.e.: 17-1-3-5-7-9 < 0 As can be seen, 17 minus 5 odd result becomes negative, can be approximated by the square root of 17 is between 4 and 5 to calculate the square root of the NUM, if num = 17, then save the results of the ANS.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
63.asm
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.