Skip to content

bitwiseMapping

bitwiseMapping(relativeAccuracy): IndexMapping

Defined in: packages/distillate/src/ddsketch/mapping.ts:443

The fastest mapping: a value’s bin is its float’s exponent and top significand bits read as one integer, with no logarithm or other floating point arithmetic, as in sketches-java’s DDSketch.fast(). It spends about 1.85 times the bins of logMapping at 1%, and is at least as accurate as asked: its bins come in powers of two, so it takes the finest that meets relativeAccuracy. Datadog’s protobuf carries it as a linear mapping.

number

Relative error bound, in (0, 1).

IndexMapping

ParamError when relativeAccuracy is outside (0, 1), or so small that no value is indexable.