Skip to content

Commit 7b5ab68

Browse files
committed
update histogram doc
1 parent 7f947c5 commit 7b5ab68

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

Histograms.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,20 @@ by using an IEEE Double with a mantissa truncated to n bits of precision. The d
1212
7 bits of precision. Additionally, the min, max and sum of the samples are stored as IEEE Double values
1313
alongside the histogram.
1414

15+
For a given value, the bucket is found by the following:
16+
bucket = (double)(val & 0xffffe00000000000L)
17+
18+
The result is a consistent set of buckets that scale with the value of the data. Larger values
19+
have a larger absolute error, but with a consistent error proportion.
20+
1521
Statistics
1622
----------
1723

18-
min - accurate (stored)
19-
max - accurate (stored)
20-
sum - accurate (stored)
24+
min - accurate (stored)
25+
max - accurate (stored)
26+
sum - accurate (stored)
27+
count - accurate (derived)
28+
mean - accurate (derived)
2129
quantiles - estimated. accuracy depends on precision of the histogram and value stored. n bits of
2230
precision provides accuracy to within (1 / (2^n)) * value. ex: 7 bits of precision provides accuracy
2331
to within 1% of the computed value.

0 commit comments

Comments
 (0)