Bug 826439 - use floats instead of doubles for exponential histogram statistic calculations; r=vdjeric

This commit is contained in:
Nathan Froyd 2013-01-03 16:21:44 -05:00
parent dd3ba161c4
commit 87d872a38f

View File

@ -746,7 +746,7 @@ void Histogram::SampleSet::AccumulateWithExponentialStats(Sample value,
size_t index) {
Accumulate(value, count, index);
DCHECK_GE(value, 0);
double value_log = log(static_cast<double>(value) + 1);
float value_log = logf(static_cast<float>(value) + 1.0f);
log_sum_ += count * value_log;
log_sum_squares_ += count * value_log * value_log;
}