go-money
go-money copied to clipboard
fixed NewFromFloat to calculate accurate values
Multiplying floats by primitive types is not precise enough, and there is a serious bug that the amount generated by NewFromFloat is different from the original value. issue : https://github.com/Rhymond/go-money/issues/121, #124
Fixed to use "github.com/shopspring/decimal" for float multiplication.
This fix requires a dependency on an external module,, but I could find no other idea.
Hello there! There is an approximate date when this change would be integrated into master? Or some other approach where this bug would be fixed?
Hello @kotaroyamazaki, is there any update on this PR? Thank you