This is a rip-off of an old package called finance by Confunctionist
on github. Credit is given in the external
directory along with a copy of the original license.
Uses as its common value type int64
but supports various operations for float64
.
Check overflow for multiplication and division.
Trying to get thoroughly tested. Also, I always forget some of the test commands:
go test -ovf=0 ## custom test flag to run overflow test
go test
go test -v
go test -v -run Mul
go test -cover
go tool cover -func=coverage.out
go test -covermode=count -coverprofile=count.out fmt
go tool cover -func=count.out
go tool cover -html=coverage.out
I alwasy forget how to run bemchmarks!
go test -bench=.
go test -bench Format #or some regular expression