X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/c973f431a370a3adbcb3c94f76dc6896a7279235..423acb9483f672df5cf220e386b7d85e35b95fb8:/math/mprand.h diff --git a/math/mprand.h b/math/mprand.h index 0c193c03..a088df8a 100644 --- a/math/mprand.h +++ b/math/mprand.h @@ -58,6 +58,9 @@ * uniformly distributed in the interval %$[2^{b - 1}, 2^b)$%. * The result is then ORred with the given @or@ value. This * will often be 1, to make the result odd. + * + * The length @b@ may be zero; but %$\texttt{or} \ge 2^b$% is + * not permitted. */ extern mp *mprand(mp */*d*/, unsigned /*b*/, grand */*r*/, mpw /*or*/); @@ -73,7 +76,7 @@ extern mp *mprand(mp */*d*/, unsigned /*b*/, grand */*r*/, mpw /*or*/); * interval %$[0, l)$%. * * Use: Generates a uniformly-distributed pseudorandom number in the - * appropriate range. + * appropriate range. We must have %$l > 0$%. */ extern mp *mprand_range(mp */*d*/, mp */*l*/, grand */*r*/, mpw /*or*/);