aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/content/en/functions/math/Sub.md
blob: 2865ac191a7fef02f20fee49cb0d9164d4058a04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
title: math.Sub
description: Subtracts one or more numbers from the first number. 
categories: []
action:
  aliases: [sub]
  related:
    - functions/math/Add
    - functions/math/Div
    - functions/math/Mul
    - functions/math/Product
    - functions/math/Sum
  returnType: any
  signatures: [math.Sub VALUE VALUE...]
---

If one of the numbers is a [`float`], the result is a `float`.

```go-html-template
{{ sub 12 3 2 }} → 7
```

[`float`]: /getting-started/glossary/#float