From 8a43fdb6a18e525286e37fac45950f3fb338f5c2 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Mon, 19 Oct 2020 15:11:44 -0400 Subject: [PATCH] Minor fix (credit: @pitrou) --- include/fast_float/float_common.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/fast_float/float_common.h b/include/fast_float/float_common.h index 4b22a9b..bc8a4f1 100644 --- a/include/fast_float/float_common.h +++ b/include/fast_float/float_common.h @@ -133,6 +133,12 @@ struct decimal { uint8_t digits[max_digits]; }; +constexpr static double powers_of_ten_double[] = { + 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, + 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22}; +constexpr static float powers_of_ten_float[] = { + 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10}; + template struct binary_format { static constexpr int mantissa_explicit_bits(); @@ -145,11 +151,6 @@ struct binary_format { static constexpr int min_exponent_round_to_even(); static constexpr uint64_t max_mantissa_fast_path(); static constexpr T exact_power_of_ten(int64_t power); - constexpr static double powers_of_ten_double[] = { - 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, - 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22}; - constexpr static float powers_of_ten_float[] = { - 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10}; }; template <>