is?
1.00 and 3.24000 should be converted to "1.00" and "3.24000" without any precision loss or gain
Floats don't store precision, so how would you know what is 1.00 vs 1.00000?
I mean, 1.00 == 1, isn't it?
https://go.dev/play/p/HgXROMCs_rf
you can only do that if you also store the precision identifier as say uint8 alongside the float64, otherwise you'll have to print up to a static precision
Обсуждают сегодня