# 数学函数
> 使用这些函数执行数学运算。
- 本页规范地址：https://hugozh.cn/functions/math/
- 最近更新：2026-10-02
- 站点：Hugo 中文文档（https://hugozh.cn/）· 社区维护的非官方中文翻译

## 本章页面
- [math.Abs](https://hugozh.cn/functions/math/abs/)：返回给定数字的绝对值。（Markdown：https://hugozh.cn/functions/math/abs/index.md）
- [math.Acos](https://hugozh.cn/functions/math/acos/)：返回给定数字的反余弦值，以弧度为单位。（Markdown：https://hugozh.cn/functions/math/acos/index.md）
- [math.Add](https://hugozh.cn/functions/math/add/)：返回把第一个数字与一个或多个数字相加的结果。（Markdown：https://hugozh.cn/functions/math/add/index.md）
- [math.Asin](https://hugozh.cn/functions/math/asin/)：返回给定数字的反正弦值，以弧度为单位。（Markdown：https://hugozh.cn/functions/math/asin/index.md）
- [math.Atan](https://hugozh.cn/functions/math/atan/)：返回给定数字的反正切值，以弧度为单位。（Markdown：https://hugozh.cn/functions/math/atan/index.md）
- [math.Atan2](https://hugozh.cn/functions/math/atan2/)：返回给定数字对的反正切值，以弧度为单位，并依据两个数字的符号确定其所在象限。（Markdown：https://hugozh.cn/functions/math/atan2/index.md）
- [math.Ceil](https://hugozh.cn/functions/math/ceil/)：返回大于或等于给定数字的最小整数值。（Markdown：https://hugozh.cn/functions/math/ceil/index.md）
- [math.Cos](https://hugozh.cn/functions/math/cos/)：返回给定弧度值的余弦。（Markdown：https://hugozh.cn/functions/math/cos/index.md）
- [math.Counter](https://hugozh.cn/functions/math/counter/)：返回一个全局计数器值，函数每被调用一次就递增一次。（Markdown：https://hugozh.cn/functions/math/counter/index.md）
- [math.Div](https://hugozh.cn/functions/math/div/)：返回第一个数字除以一个或多个数字的结果。（Markdown：https://hugozh.cn/functions/math/div/index.md）
- [math.Floor](https://hugozh.cn/functions/math/floor/)：返回小于或等于给定数字的最大整数值。（Markdown：https://hugozh.cn/functions/math/floor/index.md）
- [math.Log](https://hugozh.cn/functions/math/log/)：返回给定数字的自然对数。（Markdown：https://hugozh.cn/functions/math/log/index.md）
- [math.Max](https://hugozh.cn/functions/math/max/)：返回所有数字中的最大值。接受标量、切片，或两者混用。（Markdown：https://hugozh.cn/functions/math/max/index.md）
- [math.MaxInt64](https://hugozh.cn/functions/math/maxint64/)：返回有符号 64 位整数的最大值。（Markdown：https://hugozh.cn/functions/math/maxint64/index.md）
- [math.Min](https://hugozh.cn/functions/math/min/)：返回所有数字中的最小值。接受标量、切片，或两者混用。（Markdown：https://hugozh.cn/functions/math/min/index.md）
- [math.Mod](https://hugozh.cn/functions/math/mod/)：返回两个整数的模。（Markdown：https://hugozh.cn/functions/math/mod/index.md）
- [math.ModBool](https://hugozh.cn/functions/math/modbool/)：报告两个整数的模是否等于 0。（Markdown：https://hugozh.cn/functions/math/modbool/index.md）
- [math.Mul](https://hugozh.cn/functions/math/mul/)：返回第一个数字与一个或多个数字相乘的结果。（Markdown：https://hugozh.cn/functions/math/mul/index.md）
- [math.Pi](https://hugozh.cn/functions/math/pi/)：返回数学常量 pi。（Markdown：https://hugozh.cn/functions/math/pi/index.md）
- [math.Pow](https://hugozh.cn/functions/math/pow/)：返回第一个数字的第二个数字次幂。（Markdown：https://hugozh.cn/functions/math/pow/index.md）
- [math.Product](https://hugozh.cn/functions/math/product/)：返回所有数字的乘积。接受标量、切片，或两者混用。（Markdown：https://hugozh.cn/functions/math/product/index.md）
- [math.Rand](https://hugozh.cn/functions/math/rand/)：返回半开区间 [0.0, 1.0) 内的伪随机数。（Markdown：https://hugozh.cn/functions/math/rand/index.md）
- [math.Round](https://hugozh.cn/functions/math/round/)：返回最接近的整数，恰好为半数时向远离零的方向舍入。（Markdown：https://hugozh.cn/functions/math/round/index.md）
- [math.Sin](https://hugozh.cn/functions/math/sin/)：返回给定弧度值的正弦。（Markdown：https://hugozh.cn/functions/math/sin/index.md）
- [math.Sqrt](https://hugozh.cn/functions/math/sqrt/)：返回给定数字的平方根。（Markdown：https://hugozh.cn/functions/math/sqrt/index.md）
- [math.Sub](https://hugozh.cn/functions/math/sub/)：返回第一个数字减去一个或多个数字的结果。（Markdown：https://hugozh.cn/functions/math/sub/index.md）
- [math.Sum](https://hugozh.cn/functions/math/sum/)：返回所有数字之和。接受标量、切片，或两者混用。（Markdown：https://hugozh.cn/functions/math/sum/index.md）
- [math.Tan](https://hugozh.cn/functions/math/tan/)：返回给定弧度值的正切。（Markdown：https://hugozh.cn/functions/math/tan/index.md）
- [math.ToDegrees](https://hugozh.cn/functions/math/todegrees/)：返回把给定弧度值换算成的角度值。（Markdown：https://hugozh.cn/functions/math/todegrees/index.md）
- [math.ToRadians](https://hugozh.cn/functions/math/toradians/)：返回把给定角度值换算成的弧度值。（Markdown：https://hugozh.cn/functions/math/toradians/index.md）

---
