# pi_rand Custom random number generator