Golang 小数点处理
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
李光春 537950e68f - update 1 month ago
.drone.yml - init 6 months ago
.gitignore - 增加输出float64带小数点(自适应) 4 months ago
LICENSE - update 4 months ago
README.md - update 4 months ago
big.go - update 5 months ago
big_new.go - update 5 months ago
big_operation.go - update operation 4 months ago
big_output.go - update 1 month ago
calculate.go - update 4 months ago
const.go - update 1 month ago
go.mod - add IsInteger 2 months ago
go.sum - add IsInteger 2 months ago
math.go - update 5 months ago

README.md

Golang Decimal

📦 Golang 小数点处理

godoc goproxy.cn goreportcard.com deps.dev

安装

go get -v -u go.dtapp.net/godecimal

使用

package main

import (
	"go.dtapp.net/godecimal"
	"log"
	"reflect"
)

func main() {
	log.Println("加:", godecimal.Float64Add(10, 3), reflect.TypeOf(godecimal.Float64Add(10, 3)))
	log.Println("减", godecimal.Float64Sub(10, 3), reflect.TypeOf(godecimal.Float64Sub(10, 3)))
	log.Println("乘:", godecimal.Float64Mul(10, 3), reflect.TypeOf(godecimal.Float64Mul(10, 3)))
	log.Println("除:", godecimal.Float64Quo(10, 3), reflect.TypeOf(godecimal.Float64Quo(10, 3)))
}