From 37c64d25f857923125a04ca6e7a7ec432eb78a87 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Mon, 8 Jun 2026 09:57:35 +0100 Subject: [PATCH] Re-coded the precision calculation in add_floating_point_scientific to match add_floating_point_non_scientific --- include/etl/private/to_string_helper.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/etl/private/to_string_helper.h b/include/etl/private/to_string_helper.h index e3e565a0..e8b05c36 100644 --- a/include/etl/private/to_string_helper.h +++ b/include/etl/private/to_string_helper.h @@ -306,8 +306,7 @@ namespace etl typedef typename TIString::value_type type; const uint32_t requested_precision = format.get_precision(); - const uint32_t precision = - (requested_precision == 0U) ? max_precision : (requested_precision > max_precision ? max_precision : requested_precision); + const uint32_t precision = (requested_precision > max_precision) ? max_precision : requested_precision; etl::basic_format_spec mantissa_integral_format = format; mantissa_integral_format.decimal().width(0U).precision(0U);