================
== RhubarbDev ==
================
Programming & Procrastination

Sieve of Eratosthenes

default
Another short post while I finish a project I’m working on. I thought I’d continue on from the last post by discussing another algorithm to find prime numbers. The sieve of Eratosthenes is an algorithm attributed to the Greek polymath Eratosthenes, it iterates through a list upto n and marks multiples of each prime as composite. To implement this I’ve created an object to represent each number and store whether it’s prime. Read more...

Prime Detection

default
Short Post - Intresting stuff coming soon (tm) also the first post on the new site One way to determine if something is prime is by using the Miller-Rabin primality test. While you cannot be 100% certain if the value is prime, it’s very unlikely to be wrong. The algorithm is quite simple, it picks m random numbers within the range 2 and n-1 inclusive - where n is the number being tested Read more...
1 of 1