use pseudo random number function from glibc
the LCG function is ported by me