arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.07751cs.MScs.DScs.NAmath.NA
收藏

一种使用浮点运算、在多精度数上快于 Newton 法的平方根算法

A square root algorithm faster than Newton's method for multiprecision numbers, using floating-point arithmetic

Fabio Romano

AI总结:

本文优化 Bombelli 整数平方根算法,用浮点运算生成逐位初始猜测,并通过 Java 实验证明其快于标准库中的 Newton 法。

摘要:

本文提出了经典 Bombelli 整数平方根计算算法的优化版本。具体而言,该算法采用浮点运算来计算根中每一位数字的初始猜测值,其思路类似于《计算机程序设计艺术》第2卷第4.3.1节中用于除法的思想。文中还给出了用 Java 实现该算法的程序,并将其运行时间与 Java 标准库所提供的、使用 Newton 法的算法进行比较。测试表明,本文提出的算法要快得多。

英文摘要:

In this paper, an optimized version of classical Bombelli's algorithm for computing integer square roots is presented. In particular, floating-point arithmetic is used to compute the initial guess of each digit of the root, following similar ideas to those used in "The Art of Computer Programming" Vol. 2, p. 4.3.1 for division. A program with an implementation of the algorithm in Java is also presented, and its running time is compared with that of the algorithm provided by the Java standard library, which uses the Newton's method. From tests, the algorithm presented here turns out to be much faster.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑