hackerspace-bootstrap / strichliste-web

DEPRECATED - frontend for the strichliste api
http://demo.strichliste.org/
MIT License
11 stars 10 forks source link

0.00-EUR-account sometimes shown in red #66

Closed breti closed 6 years ago

breti commented 9 years ago

Sometimes 0.00-EUR-accounts are shown in red, not black. Seems to be a rounding issue.

Please see this example. Database dump available upon request.

strichliste_-_2015-08-08_08 07 49_hidden

breti commented 9 years ago

We should move this issue to the API, because the API returns -8.881784197001252e-16 instead of 0 as "balance" value.

I think you should store INTEGER cent values instead of REAL euro values to work around floating point issues?

seriousManual commented 9 years ago

would prefer this solution as well though it would oppose implementing other currencies like bitcoin where more precise floating point numbers are crucial.

it also recognized it as a common practice to treat every floating point number < 0.00001 as 0 due to floating point inaccuracy

schinken commented 6 years ago

Fixed in strichliste 2. Will be ready soon :)