Improving MATLAB's isprime performance without arbitrary-precision arithmetic

08/08/2021
by   Travis Near, et al.
0

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.

READ FULL TEXT

Please sign up or login with your details

Forgot password? Click here to reset

Sign in with Google

×

Use your Google Account to sign in to DeepAI

×

Consider DeepAI Pro