opendp / smartnoise-core

Differential privacy validator and runtime
MIT License
290 stars 33 forks source link

Bit Sampling Bug #278

Closed ctcovington closed 4 years ago

ctcovington commented 4 years ago

The sample_bit_prob function (which is used to sample from a Bernoulli(p) with p \neq 0.5 was indexing into the mantissa incorrectly. The function still gave roughly acceptable answers much of the time, but was wildly incorrect for some values of p. I think this is the cause of some of our utility issues with the Geometric mechanism.

I have a proposed fix in PR #279

ctcovington commented 4 years ago

Closing because PR #279 was just merged.