You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
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!
The text was updated successfully, but these errors were encountered: