GSoC/GCI Archive
Google Code-in 2011 Parrot Foundation

Port _is_small_prime from Perl 5 to Winxed

completed by: Nagato Yuki

mentors: Duke Leto, Tadeusz SoĊ›nierz, Andrew Whitworth

Task Description

Port _is_small_prime from the Perl 5 CPAN module Math::Primality to Winxed

Steps To Complete This Task

  1. Create a fork of parrot-math-primality.git on
  2. This project will build on the parrot-gmp project
  3. Convert the function _is_small_prime from Perl 5 to Winxed. The function name should be is_small_prime in Winxed. It should expect that it will be passed a parrot-gmp object. It is basically just a lookup table optimization used to make other algorithms faster.
  4. Port the tests from Math::Primality to Winxed as well
  5. Create a Github pull request (button on the upper right of your fork) to have your changes incorporated into the master repository


  1. All HLLs on Parrot will be able to use these primality functions, which provide the basic primitives needed to implement various cryptography libraries.


  1. Knowledge of prime numbers, Winxed, Perl 5

Additional Links