---
updatedAt: 2026-04-16T21:23:00.000Z
agentTools:
  projectIndex: https://docs.observeinc.com/llms.txt
---

# uniform

```
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](function-zipf).

# Domain

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

# Categories

* [Numeric](function#numeric-functions)

# Examples

<OpalCodeBlock code={
`make_col jitter:uniform(0, 100)
`}/>

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

<OpalCodeBlock code={
`make_col fraction:uniform(0.0, 1.0)
`}/>

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