Blog Archives

PHP prime number checker is_prime() — unary!

This one was fun- a one-liner that uses unary math (basically tally marks if you think about it) to check if a number is prime or not. Found it years ago on the net and kept it around because of

Tagged with: , , , , ,
Posted in Computers, Cool Code, Programming, Software, Tech, Web