Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Too many significant digits being reported #259

Open
BurtHarris opened this issue Dec 1, 2022 · 0 comments
Open

Too many significant digits being reported #259

BurtHarris opened this issue Dec 1, 2022 · 0 comments

Comments

@BurtHarris
Copy link

The Benchmark results typically reported by these runs report a mean number of ops/sec with too many significant digits. Reporting the confidence interval is great, but all the digits reported make it hard to compare results.

I'm trying to remember the math behind this, but if the confidence interval is +/- 1%, it seems there should be no more than 3 significant digits reported, isn't that right?

This can be done fairly easily using the number's toPrecision( digits ) method. The returned value is a string and can be in scientific notation. Under normal circumstances, it shouldn't need commas.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant