From b668175c625cd7ffa361f2700406a911fca92885 Mon Sep 17 00:00:00 2001 From: xushiwei Date: Sat, 15 Jun 2024 15:58:22 +0800 Subject: [PATCH] go package demo: math --- README.md | 1 + _demo/math/math.go | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 _demo/math/math.go diff --git a/README.md b/README.md index 190fe3a4..06e8b0b7 100644 --- a/README.md +++ b/README.md @@ -207,6 +207,7 @@ Here are the Go packages that can be imported correctly: * [unicode/utf8](https://pkg.go.dev/unicode/utf8) * [unicode/utf16](https://pkg.go.dev/unicode/utf16) * [math/bits](https://pkg.go.dev/math/bits) +* [math](https://pkg.go.dev/math) ## How to install diff --git a/_demo/math/math.go b/_demo/math/math.go new file mode 100644 index 00000000..8794dcc8 --- /dev/null +++ b/_demo/math/math.go @@ -0,0 +1,11 @@ +package main + +import ( + "math" +) + +func main() { + println(math.Sqrt(2)) + println(math.Abs(-1.2)) + println(math.Ldexp(1.2, 3)) +}