> ## Documentation Index
> Fetch the complete documentation index at: https://errand.nuvrel.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# min

> Return the smallest of a set of numbers.

`min(numbers...)` returns the lowest value from the given numbers.

## Signature

```
min(numbers... number) number
```

At least one argument is required.

## Example

Limit the number of parallel integration test runners to avoid overwhelming the test database, while still using all available workers when the suite is small:

```hcl theme={null}
variable "suite_size" {
  description = "Number of integration test packages"
  type        = number
}

variable "db_connections" {
  description = "Maximum database connections available to tests"
  type        = number
  default     = 10
}

computed "parallel" {
  description = "Safe parallel test count"
  expression  = min(var.suite_size, var.db_connections)
}

task "integration-test" {
  description = "Run integration tests with bounded parallelism"
  commands    = ["go test -parallel ${computed.parallel} ./test/integration/..."]
}
```

## Notes

* All arguments must be numbers.
* To find the largest value, use [`max`](/functions/number/max).
