# subtract function

A difference: the function form of -.

## How to write it

### subtract(a, b)

**a**

The number to subtract from. Takes an expression.

**b**

The number to subtract. Takes an expression.

## Examples

- $\displaystyle \operatorname{subtract}(7, 3) = 4$

  `subtract(7, 3)`

  In the solver, `subtract(7, 3)` gives `4`.

  [Open in the solver](https://hilberon.com/?q=subtract%287%2C%203%29)

## Related functions

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

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

  Square root; sqrt(x) is the power x^(1/2).
- [trunc](https://hilberon.com/library/trunc)

  A number with its fractional part cut off.
- [sign](https://hilberon.com/library/sign)

  Sign of a number: -1, 0 or 1.
- [abs](https://hilberon.com/library/abs)

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

  Nearest whole number, with halves rounded away from zero.

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