With ETL 20.48.1 and GCC 15.2 / ESP-IDF 6.1, etl::to_string<float>(3.14f, output) fails with:
conversion from 'double' to 'float' may change value [-Werror=float-conversion]
In private/to_string_helper.h (lines 350 and 407), ::floor(...) returns double, which is assigned back to float.
Minimal reproducer and run instructions: https://github.com/puzrin/etl-float-repro
Similar float-formatting improvements appear to have been made in #1379 for format.h, but this path in to_string still uses double math.
With ETL 20.48.1 and GCC 15.2 / ESP-IDF 6.1,
etl::to_string<float>(3.14f, output)fails with:In
private/to_string_helper.h(lines 350 and 407),::floor(...)returnsdouble, which is assigned back tofloat.Minimal reproducer and run instructions: https://github.com/puzrin/etl-float-repro
Similar float-formatting improvements appear to have been made in #1379 for
format.h, but this path into_stringstill uses double math.