I am trying to understand LCG and although the equation looks really straightforward I don't know how to calculate the module of the expression.(adsbygoogle = window.adsbygoogle || []).push({});

Xn+1= a*Xn+c (mod m)

As stated before, my problem is understanding the concept of mod m and how to calculate it.

Any help and example would be appreciated.

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Linear Congruential Generator

**Physics Forums | Science Articles, Homework Help, Discussion**