uniform(min: const numeric, max: const numeric) -> numeric

Samples a pseudo-random value uniformly from the inclusive range between compile-time constant bounds min and max. When both bounds are int64 constants the result type is int64; otherwise the bounds are evaluated as floating-point and the result is float64. The compiler requires max not to be less than min. This distribution is related to other synthetic random values such as zipf.

Domain

This is a scalar function (calculates a single output value for a single input row).

Categories

Examples

make_col jitter:uniform(0, 100)

Draws an integer pseudo-random value between zero and one hundred inclusive because both bounds are integer constants.

make_col fraction:uniform(0.0, 1.0)

Samples a float64 in the closed unit interval using floating literal bounds for probabilistic dithering.