39 result = mu - b * (p > 0.5 ? 1.0 : -1.0)
67 if (noise > 0 && INT64_MAX - noise < signal_)
69 else if (noise < 0 && INT64_MIN - noise > signal_)
72 return signal_ + noise;
double tor_mathlog(double d)
int64_t clamp_double_to_int64(double number)
int64_t add_laplace_noise(int64_t signal_, double random_, double delta_f, double epsilon)
int64_t sample_laplace_distribution(double mu, double b, double p)
Macros to manage assertions, fatal and non-fatal.