举例
sqrt(39) =>
39 mod (6 * 6) = 3
6 + (3 / (2 * 6)) = 6 + 0.25 = 6.25 ≈ sqrt(39) = 6.244997998398398
sqrt(75) =>
75 mod (8 * 8) = 11
8 + (11 / (2 * 8)) = 6 + 0.6875 = 6.6875 ≈ sqrt(75) = 8.660254037844386
sqrt(39) =>
39 mod (6 * 6) = 3
6 + (3 / (2 * 6)) = 6 + 0.25 = 6.25 ≈ sqrt(39) = 6.244997998398398
sqrt(75) =>
75 mod (8 * 8) = 11
8 + (11 / (2 * 8)) = 6 + 0.6875 = 6.6875 ≈ sqrt(75) = 8.660254037844386
本文标题:[Math] 快速估算一个整数的平方根*
本文链接:https://www.haomeiwen.com/subject/qhxiqltx.html
网友评论