Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Floating-point arithmetic rounding error in balance #80

Closed
slaweet opened this issue Mar 29, 2017 · 2 comments · May be fixed by Matthelonianxl/lisk-nano#34
Closed

Floating-point arithmetic rounding error in balance #80

slaweet opened this issue Mar 29, 2017 · 2 comments · May be fixed by Matthelonianxl/lisk-nano#34
Assignees
Labels
Milestone

Comments

@slaweet
Copy link
Contributor

slaweet commented Mar 29, 2017

balance returned form the API is: "balance":"9999997590000000"
but the ui shows: 99999975.90000001 LSK
round_issue

@slaweet slaweet added the bug label Mar 29, 2017
@karmacoma karmacoma added this to the Version 0.2.0 milestone Mar 29, 2017
@karmacoma karmacoma added this to Backlog in Version 0.2.0 Mar 29, 2017
@slaweet
Copy link
Contributor Author

slaweet commented Apr 3, 2017

I think it happens only for an account with very high balance, thus it won't happen to any user on main net. I tried to reproduce it with lower balance, but it didn't happen.

@slaweet slaweet moved this from Backlog to In Progress in Version 0.2.0 Apr 4, 2017
slaweet added a commit that referenced this issue Apr 4, 2017
The error was:
balance returned form the API is: "balance":"9999997590000000"
but the ui shows: 99999975.90000001 LSK

Fixed by switching from numeral to BigNumber.js
karmacoma added a commit that referenced this issue Apr 5, 2017
Fix floating-point arithmetic rounding error in balance #80
@karmacoma
Copy link
Contributor

Closed by #90

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants