c3js / c3js/c3

Handle floating point imprecision

Open
#797 8 comments 1 reaction 0 assignees View on GitHub
C-feature-request
Dominant language
JavaScript
Stars
9.3k
Forks
1.4k
Avg merge
6d 16h
Merged PRs (30d)
1

Description

C3 should take care of floating point rounding imprecision, i.e. values like "0.30000000000000004" (= 0.1 + 0.2), in X and Y axis ticks.

We could
- have a fixed number of decimal places by default
- try to recognize imprecision patterns, like 10 zeros in a row

Someone already reported this in #506, but no action was taken there to resolve the problem.

I think that this should be taken care of in c3, because it's a common problem (anyone dealing with floating point values is exposed to it).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.