mirror of
https://github.com/google/benchmark.git
synced 2024-12-29 14:00:16 +08:00
Fixed bug in "ToExponentAndMantissa" when negative exponents where created.
Unary minus where applied to an unsigned type.
This commit is contained in:
parent
a822c71655
commit
e7f6c42a79
@ -66,7 +66,7 @@ void ToExponentAndMantissa(double val, double thresh, int precision,
|
||||
scaled *= one_k;
|
||||
if (scaled >= small_threshold) {
|
||||
mantissa_stream << scaled;
|
||||
*exponent = -i - 1;
|
||||
*exponent = -static_cast<int64_t>(i + 1);
|
||||
*mantissa = mantissa_stream.str();
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user