Improving MATLAB's isprime performance without arbitrary-precision arithmetic

Travis Near
DOI: https://doi.org/10.48550/arXiv.2108.04791
2021-08-09
Abstract: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.
Mathematical Software,Cryptography and Security,Performance
What problem does this paper attempt to address?