feat: add Log function

This commit is contained in:
dudaodong committed 2023-06-06 14:34:40 +08:00
1 parent 2f6ee84443
commit a6a8fd88bc
3 files changed
+29

No files matched your search

+15
View File
@@ -362,3 +362,18 @@ func ExampleSin() {
// 0
// 1
}
func ExampleLog() {
result1 := Log(8, 2)
result2 := TruncRound(Log(5, 2), 2)
result3 := TruncRound(Log(27, 3), 0)
fmt.Println(result1)
fmt.Println(result2)
fmt.Println(result3)
// Output:
// 3
// 2.32
// 3
}