tn47 / goledger

Ledger implementation in golang
http://ledger-cli.org
MIT License
35 stars 13 forks source link

Fix approximation errors in floating point. #38

Open prataprc opened 7 years ago

prataprc commented 7 years ago

Floating point computations lead to approximations, leading to round off errors and even functional errors. Example in dblentry/transactions.go:340

if unbc.amount != 0.0 {
    unbcs = append(unbcs, unbc)
}