HowFast / roadmap

Open roadmap for HowFast
https://www.howfast.tech/
4 stars 0 forks source link

APM : rounding number could be improved #14

Closed jpcaruana closed 4 years ago

jpcaruana commented 4 years ago

I think no decimals are needed (or only two) in the detailed view:

image image
MickaelBergem commented 4 years ago

So I had almost forgot the basics of float manipulation:

$ node
> 16.037 * 1000
16036.999999999998

This is because JS represents decimal numbers as floats - Python does the same. Values are returned by the API as seconds, and are then multiplied by 1000 to display them as milliseconds. This operation causes the imprecise floating point storage method to reveal its flaws on some very specific values (including 16.037).

This will be fixed next time you refresh the frontend application (for your curiosity, rounding the number after that * 1000 operation solves the issue).

MickaelBergem commented 4 years ago

Issue should now be solved. Please re-open if the issue still exists.

jpcaruana commented 4 years ago

Thanks ! Seems right now !