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

# Rounding and numeric

> Rounding, truncation, absolute value, sign, and integer/fractional-part functions.

These functions adjust or inspect a number's value. Each accepts a number or a [table](/math/types/tables), returning the same shape.

<Warning>
  **Round only when you mean to change the value.** TrueMath carries values at [full precision](/concepts/units-and-precision) through every step. `round`, `floor`, and `ceil` permanently discard that precision, and a rounded value used in a later calculation introduces error that compounds across steps. They also change the value an [activity](/concepts/activities) returns, which can make it impossible to solve in reverse.

  To show fewer decimals without losing precision, set the [variable's](/concepts/variables) display format instead of rounding.
</Warning>

## Round \[round]

```
round(value)
round(value; places)
```

Rounds to `places` following standard rounding (digits 0–4 round down, 5–9 round up). Set `places` to `1`–`10` to round to that decimal place, or `0` to `-10` to round to a whole-number place; it defaults to `0`. `places` must be a whole number in the range -10 to 10 (real numbers are truncated); outside that range returns a `Parameter out of range` error.

```
round(1234.56)       => 1235
round(1234.56; 1)    => 1234.6
round(1234.56; -2)   => 1200
```

## Floor \[floor]

```
floor(value)
floor(value; places)
```

The largest value less than or equal to `value` at the given `places`. `places` follows the same rules as [`round`](#round-round).

```
floor(23.456)        => 23
floor(23.567)        => 23
floor(-23.456)       => -24
floor(-23.567)       => -24
floor(1234.56; 1)    => 1234.5
floor(1234.56; -2)   => 1200
```

## Ceiling \[ceil]

```
ceil(value)
ceil(value; places)
```

The smallest value greater than or equal to `value` at the given `places`. `places` follows the same rules as [`round`](#round-round).

```
ceil(23.456)         => 24
ceil(23.567)         => 24
ceil(-23.456)        => -23
ceil(-23.567)        => -23
ceil(1234.56; 1)     => 1234.6
ceil(1234.56; -2)    => 1300
```

## Absolute value \[abs]

```
abs(value)
```

The absolute (non-negative) value.

```
abs(34)          => 34
abs(-34)         => 34
abs([25; -34])   => [25; 34]
```

## Sign \[sign]

```
sign(value)
```

`-1` if `value` is negative, `0` if zero, `1` if positive.

```
sign(34.567)             => 1
sign(-34.567)            => -1
sign(0)                  => 0
sign([25; -34; 0; 15])   => [1; -1; 0; 1]
```

## Integer part \[ipart]

```
ipart(value)
```

The integer (whole-number) portion of `value`.

```
ipart(34.567)                     => 34
ipart([10.55; 8.7; -4.1; 3.25])   => [10; 8; -4; 3]
```

## Fractional part \[fpart]

```
fpart(value)
```

The fractional (decimal) portion of `value`.

```
fpart(34.567)                     => 0.567
fpart([10.55; 8.7; -4.1; 3.25])   => [0.55; 0.7; -0.1; 0.25]
```
