| 2492 | // Numbers with exponents greater or equal to the returned value will use |
| 2493 | // the exponential notation. |
| 2494 | template <typename T> FMT_CONSTEVAL auto exp_upper() -> int { |
| 2495 | return std::numeric_limits<T>::digits10 != 0 |
| 2496 | ? min_of(16, std::numeric_limits<T>::digits10 + 1) |
| 2497 | : 16; |
| 2498 | } |
| 2499 | |
| 2500 | // Use the fixed notation if the exponent is in [-4, exp_upper), |
| 2501 | // e.g. 0.0001 instead of 1e-04. Otherwise use the exponent notation. |