Skip to content

Missing bin due to floating-point error #282

Open
@Fil

Description

@Fil
const values = [0.9299999999999999, 1.07];
d3.bin().thresholds(500)(values).filter((d) => d.length);

this returns: [[1.07, x0: 1.07, x1: 1.0702]]; the first value has disappeared.

Metadata

Metadata

Assignees

Labels

bugSomething isn’t working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions