Draw a uniform integer in the inclusive range [lo, hi].
The span is computed in unsigned 64-bit arithmetic, so the full range
of default_int works: next_range(gen, -huge(1)-1, huge(1)) spans
every int32 value and is still exactly uniform. Rejection sampling
gives every value in range exactly one preimage per draw, so there is
no modulo bias.
hi < lo is a usage error: it returns lo and, if err is present,
sets ERROR_VALIDATION. lo == hi returns lo without consuming a
draw.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.