arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2108.04791cs.MScs.CRcs.PF
收藏

无需任意精度算术提高MATLAB的互素性能

Improving MATLAB's isprime performance without arbitrary-precision arithmetic

Travis Near

摘要:

MATLAB是科学家,工程师,数学家和学生使用的数值计算平台,包含许多数学函数,包括isprime。MATLAB的isprime函数确定输入数组的哪些元素是素数。这项研究详细介绍了模块化算术技术,米勒-拉宾素性测试,向量化操作和除法最小化策略,这些策略利用MATLAB的功能来提高isprime的性能。结果对于小整数通常快5到10倍,对于大整数和长数组快数百倍。

英文摘要:

MATLAB is a numerical computing platform used by scientists, engineers, mathematicians, and students which contains many mathematical functions, including isprime. MATLAB's isprime function determines which elements of an input array are prime. This research details modular arithmetic techniques, the Miller-Rabin primality test, vectorized operations, and division-minimizing strategies which harness the power of MATLAB's capabilities to improve isprime's performance. The results are typically 5 to 10 times faster for small integers and many hundreds of times faster for large integers and long arrays.

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

↑