boostorg / boostorg/histogram

Fuzzy testing of index and value of regular axis

Open
#339 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
334
Forks
76
PR merge metrics
No merged PRs in 30d

Description

While we cannot avoid round-off error in the `index` and `value` methods of the `regular` axis, we want these two to be exact inverses of each other. In other words, this should succeed for all values of `nbin`, `start`, `stop`.

```cpp
auto a = regular(nbin, start, stop);
for (int i =0; i < nbin; ++i)
assert(a.index(a.value(i)) == i);
```

This needs to verified with fuzzy testing.

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.