[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › Number

Number arithmetic, comparison, and branded numeric types.

## Functions

| Function                                                                                         | Description                                                                                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [clamp](https://evolu.dev/docs/api-reference/common/Number/functions/clamp)                                   | Clamps a number within a given range.                                                                                                                                                                                         |
| [computeBalancedBuckets](https://evolu.dev/docs/api-reference/common/Number/functions/computeBalancedBuckets) | Divides items into buckets as evenly as possible, ensuring each bucket has at least the minimum number of items. Returns a success result if the minimum is met, or an error result with the required number of items if not. |
| [decrement](https://evolu.dev/docs/api-reference/common/Number/functions/decrement)                           | -                                                                                                                                                                                                                             |
| [fibonacciAt](https://evolu.dev/docs/api-reference/common/Number/functions/fibonacciAt)                       | Returns the Fibonacci number at the given index (1-indexed: 1,1,2,3,5,8,...).                                                                                                                                                 |
| [increment](https://evolu.dev/docs/api-reference/common/Number/functions/increment)                           | -                                                                                                                                                                                                                             |
| [isBetween](https://evolu.dev/docs/api-reference/common/Number/functions/isBetween)                           | Creates a predicate that checks if a number is within a range, inclusive.                                                                                                                                                     |
| [max](https://evolu.dev/docs/api-reference/common/Number/functions/max)                                       | Returns the maximum value, preserving branded type if applicable.                                                                                                                                                             |
| [min](https://evolu.dev/docs/api-reference/common/Number/functions/min)                                       | Returns the minimum value, preserving branded type if applicable.                                                                                                                                                             |

## Type Aliases

| Type Alias                                                                          | Description                                                                                                      |
| ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| [FibonacciIndex](https://evolu.dev/docs/api-reference/common/Number/type-aliases/FibonacciIndex) | Valid index for [fibonacciAt](https://evolu.dev/docs/api-reference/common/Number/functions/fibonacciAt), constrained to 1-78. |

## Variables

| Variable                                                                         | Description                                                                                                      |
| -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| [FibonacciIndex](https://evolu.dev/docs/api-reference/common/Number/variables/FibonacciIndex) | Valid index for [fibonacciAt](https://evolu.dev/docs/api-reference/common/Number/functions/fibonacciAt), constrained to 1-78. |