# Truncation (trunc)

A number with its fractional part cut off.

## How to write it

### trunc(x)

**x**

A number. Takes a number.

## Examples

- $\displaystyle \operatorname{trunc}(-2.7) = -2$

  `trunc(-2.7)`

  In the solver, `trunc(-2.7)` gives `-2`.

  [Open in the solver](https://hilberon.com/?q=trunc%28-2.7%29)

## Related functions

- [abs](https://hilberon.com/library/abs)

  Absolute value of a number, or modulus of a complex one.
- [times](https://hilberon.com/library/times)

  Product of numbers: the function form of \*.
- [arg](https://hilberon.com/library/arg)

  Argument of a complex number: its angle in radians.
- [subtract](https://hilberon.com/library/subtract)

  A difference: the function form of -.
- [binomial](https://hilberon.com/library/binomial)

  Binomial coefficient: the ways to choose k items out of n.
- [sqrt](https://hilberon.com/library/sqrt)

  Square root; sqrt(x) is the power x^(1/2).

---
Source: https://hilberon.com/library/trunc
