diff --git a/reference/random/functions/lcg-value.xml b/reference/random/functions/lcg-value.xml index 44e2d991fd2f..317235bab81c 100644 --- a/reference/random/functions/lcg-value.xml +++ b/reference/random/functions/lcg-value.xml @@ -18,6 +18,21 @@ to the product of both primes. &caution.cryptographically-insecure; + + + Scaling the return value to a different interval using multiplication + or addition (a so-called affine transformation) might result in a bias + in the resulting value as floats are not equally dense across the number + line. As not all values can be exactly represented by a float, the + result of the affine transformation might also result in values outside + of the requested interval. + + + Use Random\Randomizer::getFloat to generate a + random float within an arbitrary interval. Use Random\Randomizer::getInt + to generate a random integer within an arbitrary interval. + +