From 9ce63603a6f91877fac6258df0641b6d41311570 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 19 Feb 2026 16:48:55 -0600 Subject: [PATCH] Fix pow10_int comment accuracy Co-Authored-By: Claude Opus 4.6 --- esphome/core/helpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/core/helpers.h b/esphome/core/helpers.h index 0185437cc4..b606e68df3 100644 --- a/esphome/core/helpers.h +++ b/esphome/core/helpers.h @@ -441,7 +441,7 @@ template class SmallBufferWithHeapFallb /// Compute 10^exp using iterative multiplication/division. /// Avoids pulling in powf/__ieee754_powf (~2.3KB flash) for small integer exponents. -/// Exact for non-negative exponents up to 10 (powers of 10 up to 10^10 are exact in float). +/// Matches powf(10, exp) for the int8_t exponent range used by sensor accuracy_decimals. inline float pow10_int(int8_t exp) { float result = 1.0f; if (exp >= 0) {