Categorygithub.com/AnuchitO/decimal-issue
modulepackage
0.0.0-20231022094519-f14b40c7ae43
Repository: https://github.com/anuchito/decimal-issue.git
Documentation: pkg.go.dev

# README

Demostration of decimal arithmetic in Go

Starting point

Normal Version (Using Floating-Point Arithmetic):

go test -v -run TestNormalFourDigitSum

Fixed Version (Using Decimal Arithmetic):

it fixed some precision issues due to the limitations of floating-point arithmetic
go test -v -run TestFixedFourDigitSum

Go rounding behavior

go test -v -run GoRoundingBehaviorFloat64

Currency exchange

go test -v -run TestNormalExchangeUSD2JPY
go test -v -run TestFixedExchangeUSD2JPY

Sales tax calculation

go test -v -run TestNormalWithholdingTax
go test -v -run TestFixedWithholdingTax

Pharmaceutical dosage calculation

go test -v -run TestNormalDosage
go test -v -run TestFixedDosage

Geographic distance calculation

go test -v -run TestNormalGeographicHaversine
go test -v -run TestFixedGeographicHaversine

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author