定时器
第六章 文件系统
Go语言标准库 (The Golang Standard Library by Example)
Gaminik
一个神奇的APP, “双击”即可实时翻译手机屏幕上的文字。玩日语游戏、学习外语、跟外国人聊天必备。支持翻译105种语言。
5.1 math — 基本数学函数
math包实现的就是数学函数计算。
5.1.1 三角函数
正弦函数,反正弦函数,双曲正弦,反双曲正弦
func Sin(x float64) float64
func Asin(x float64) float64
func Sinh(x float64) float64
func Asinh(x float64) float64
一次性返回sin,cos
func Sincos(x float64) (sin, cos float64)
余弦函数,反余弦函数,双曲余弦,反双曲余弦
func Cos(x float64) float64
func Acos(x float64) float64
func Cosh(x float64) float64
func Acosh(x float64) float64
正切函数,反正切函数,双曲正切,反双曲正切
func Tan(x float64) float64
func Atan(x float64) float64 和 func Atan2(y, x float64) float64
func Tanh(x float64) float64
func Atanh(x float64) float64
5.1.2 幂次函数
func Cbrt(x float64) float64 //立方根函数
func Pow(x, y float64) float64 // x的幂函数
func Pow10(e int) float64 // 10根的幂函数
func Sqrt(x float64) float64 // 平方根
func Log(x float64) float64 // 对数函数
func Log10(x float64) float64 // 10为底的对数函数
func Log2(x float64) float64 // 2为底的对数函数
func Log1p(x float64) float64 // log(1 + x)
func Logb(x float64) float64 // 相当于log2(x)的绝对值
func Ilogb(x float64) int // 相当于log2(x)的绝对值的整数部分
func Exp(x float64) float64 // 指数函数
func Exp2(x float64) float64 // 2为底的指数函数
func Expm1(x float64) float64 // Exp(x) - 1
5.1.3 特殊函数
func Inf(sign int) float64 // 正无穷
func IsInf(f float64, sign int) bool // 是否正无穷
func NaN() float64 // 无穷值
func IsNaN(f float64) (is bool) // 是否是无穷值
func Hypot(p, q float64) float64 // 计算直角三角形的斜边长
5.1.4 类型转化函数
func Float32bits(f float32) uint32 // float32和unit32的转换
func Float32frombits(b uint32) float32 // uint32和float32的转换
func Float64bits(f float64) uint64 // float64和uint64的转换
func Float64frombits(b uint64) float64 // uint64和float64的转换
5.1.5 其他函数
func Abs(x float64) float64 // 绝对值函数
func Ceil(x float64) float64 // 向上取整
func Floor(x float64) float64 // 向下取整
func Mod(x, y float64) float64 // 取模
func Modf(f float64) (int float64, frac float64) // 分解f,以得到f的整数和小数部分
func Frexp(f float64) (frac float64, exp int) // 分解f,得到f的位数和指数
func Max(x, y float64) float64 // 取大值
func Min(x, y float64) float64 // 取小值
func Dim(x, y float64) float64 // 复数的维数
func J0(x float64) float64 // 0阶贝塞尔函数
func J1(x float64) float64 // 1阶贝塞尔函数
func Jn(n int, x float64) float64 // n阶贝塞尔函数
func Y0(x float64) float64 // 第二类贝塞尔函数0阶
func Y1(x float64) float64 // 第二类贝塞尔函数1阶
func Yn(n int, x float64) float64 // 第二类贝塞尔函数n阶
func Erf(x float64) float64 // 误差函数
func Erfc(x float64) float64 // 余补误差函数
func Copysign(x, y float64) float64 // 以y的符号返回x值
func Signbit(x float64) bool // 获取x的符号
func Gamma(x float64) float64 // 伽玛函数
func Lgamma(x float64) (lgamma float64, sign int) // 伽玛函数的自然对数
func Ldexp(frac float64, exp int) float64 // value乘以2的exp次幂
func Nextafter(x, y float64) (r float64) //返回参数x在参数y方向上可以表示的最接近的数值,若x等于y,则返回x
func Nextafter32(x, y float32) (r float32) //返回参数x在参数y方向上可以表示的最接近的数值,若x等于y,则返回x
func Remainder(x, y float64) float64 // 取余运算
func Trunc(x float64) float64 // 截取函数
导航
书籍推荐
Go入门指南
Unknwon
•
go
•
165页
•
2018年5月3日
8842
Go语言web编程
astaxie
•
go
•
97页
•
2018年5月3日
23774
Go社区的知识图谱
golang foundation
•
go
•
1页
•
2018年5月3日
1356
Rust 程序设计语言(第二版 & 2018 edition)
KaiserY
•
rust
•
105页
•
2020年3月6日
Laravel 源码详解
tzivanmoe
•
laravel
•
42页
•
2018年7月1日
4
Office 365 开发入门指南
chenxizhang
•
visualstudio
•
51页
•
2018年8月3日
98
小字
大字
宋体
黑体
白天
护眼
夜晚
封面
简介
简介
第一章 输入输出 (Input/Output)
1.1
io — 基本的 IO 接口
1.2
ioutil — 方便的 IO 操作函数集
1.3
fmt — 格式化 IO
1.4
bufio — 缓存 IO
第二章 文本
2.1
strings — 字符串操作
2.2
bytes — byte slice 便利操作
2.3
strconv — 字符串和基本数据类型之间转换
2.4
regexp — 正则表达式
2.5
unicode — Unicode 码点、UTF-8/16 编码
第三章 数据结构与算法
3.1
sort — 排序算法
3.3
container — 容器数据类型:heap、list 和 ring
第四章 日期与时间
4.1
主要类型概述
4.2
时区
4.3
Time类型详解
4.4
定时器
5.1
math — 基本数学函数
第六章 文件系统
6.1
os — 平台无关的操作系统功能实现
6.2
path/filepath — 操作路径
第七章 数据持久存储与交换
7.1
database/sql — SQL/SQL-Like 数据库操作接口
第八章 数据压缩与归档
8.1
flate - DEFLATE 压缩算法
第九章 测试
9.1
testing - 单元测试
9.2
testing - 基准测试
9.3
testing - 子测试
9.4
testing - 运行并验证示例
9.5
testing - 其他功能
9.6
httptest - HTTP 测试辅助工具
9.7
总结
第十章 进程、线程与 goroutine
10.1
创建进程
10.2
进程属性和控制
10.3
线程
10.4
进程间通信
第十三章 应用构建 与 debug
13.1
flag - 命令行参数解析
13.2
log - 日志记录
13.3
expvar - 公共变量的标准化接口
13.4
runtime/debug - 运行时的调试工具
15.2
unsafe — 非类型安全操作
16.1
sync - 处理同步需求
16.2
sync/atomic - 原子操作
16.3
os/signal - 信号