Fix cppcheck warning
The serialization of floating-point numbers is handled in two code paths. If number_float_t is an IEEE-754 single or double precision number, the Grisu2 algorithm is used. Otherwise, the serialization is done via std::snprintf. By updating cppcheck to 1.5.1, it warns that the used specifier "%.*g" only works with double.
This PR adds a conversion to double in the std::snprintf call to silence this warning.
Closes #4755
coverage: 99.188%. remained the same when pulling dfb9eb6eec67ca8b05d9d1419cb4d805cffd03c0 on issue4755-cppcheck-warning into 51a77f1dcac97f917db2621a5945f4305ff1bf9f on develop.
This pull request has been marked as stale because it has had no activity for 30 days. While we won’t close it automatically, we encourage you to update or comment if it is still relevant. Keeping pull requests active and up-to-date helps us review and merge changes more efficiently. Thank you for your contributions!