Stream: beginners

Topic: float -> string conversion


view this post on Zulip Artur Swiderski (Oct 03 2023 at 10:45):

Is there a way to format floating number to string conversion, high precision is less important than size of a string sometimes

view this post on Zulip Anton (Oct 03 2023 at 11:49):

I don't think we have something for that yet, I wrote it up in #5881

view this post on Zulip Declan Joseph Maguire (Oct 11 2023 at 08:26):

I 100% agree that you need good syntax for float string representation. I know I've already talked a lot about scientific computing, but it sucks when you log a pile of numbers and none of the strings line up, or they just look totally different like when it jumps to exponential notation, or the negative numbers are shifted over by 1 due to the minus sign. It's worth looking at many other languages, because there's a lot of corner cases to consider.

view this post on Zulip Anton (Oct 11 2023 at 09:38):

Good advice! I've added it to the issue


Last updated: Jul 06 2025 at 12:14 UTC