Hello,
I am using fmt::format to print numbers in several formats. One of them is floating point in shortest representation, but when numbers come out in scientific notation I sometimes have trailing 0's.
Original call
snprintf(buffer, buf_len, "%g", value)
New call
fmt::format("{:g}", value)
Up to now, writing many floating point numbers, all the mismatches I have are with the scientific notation and trailing zeros. This are some kinds of mismatches I'm having (red = original code output, green = new code output):


I know this seems "irrelevant" but it's enough to disturb LightGBM as is currently implemented.
Any suggestions? Am I calling something wrong? Is it supposed to happen?
(I really need this working this week, so I can for the time being do a pass over the output buffer and trim trailing 0's but let's say that's neither "fast" nor "the correct way").
Thank you!