src/randomized.cpp
/**
 * Flip a coin until a head is found, then return the number of tails
 */
Flip a coin until a head is found, then return the number of tails
Flip a coin until a head is found then return the number of tails
unsigned long int flipCoinsUntilHeads(trng::lcg64 &r) {
	trng::uniform01_dist<> u;    
	unsigned long int tails = 0;
	while (((unsigned int) (u(r) * 100)) % 2 == 0) {
		tails++;
	}
	return tails;
}
unsigned long int flipCoinsUntilHeads ( trng :: lcg64 & r ) { trng :: uniform01_dist < > u ; unsigned long int tails = 0 ; while ( ( ( unsigned int ) ( u ( r ) * 100 ) ) % 2 == 0 ) { tails ++ ; } return tails ; }
Flip a coin until a head is found, then return the number of tails
Flip a coin until a head is found then return the number of tails
// uniform distribution from 0 to 1