Implement linear congretual pseudo number generator.