Implementation of AKS primality test in Scheme or C++

Carlochess picture Carlochess · Jun 27, 2011 · Viewed 7.6k times · Source

I was reading about the prime test algorithm and found the AKS primality test. Could this algorithm be implemented in Scheme or in C++?

Has anyone tried implementing the AKS test?

Answer

John Clements picture John Clements · Jun 27, 2011

Scheme and C++ (and Racket and Pascal and Logo and Modula-3 and Postscript) are all Turing equivalent, meaning that they can all be used to simulate each other, and hence that they can all compute the same things.

So: yes, you can implement this in Scheme. Or any other Turing-complete language.