Ok, I took a look at that book. Thanks for linking me a textbook for dummies instead of an “introduction to the fundamentals of xyz, vol. 1 / 4” monograph that would leave me hopelessly lost.
I grabbed the 2nd edition from scihub/libgen.
That being said, the book appears to be hopelessly confused? Or am I failing at reading comprehension?
It does suggest to use the inverse cdf method from uniform U(0,1) (i.e. rand()^-2) for Pareto (p 191f).
The book is aware of the “ideal” distribution on floating point numbers (p 6f, “An ideal uniform generator …”). More poignantly (p7),
In numerical analysis, although we may not be able to deal with the num-
bers in the interval (1 − b^−p , 1), we do expect to be able to deal with numbers
in the interval (0, b^−p ), which is of the same length. (This is because, usually,
relative differences are more important than absolute differences.) A random
variable such as X above, defined on the computer numbers with e = 0, is not
adequate for simulating a U(0, 1) random variable.
But then the book suggests algorithms that only work well with ideal U(0,1) variables, and at the same time the exercises suggest using non-ideal standard library generators for U(0,1) that generate a fixed-point approximation of U(0,1)?