Open FoggyFinder opened 7 years ago
Maybe this should be customizable, along the lines of test_f1.ToString(format, culture)
where format would default e.g. to "g"
but could be provided by the user as e.g. "0.00"
.
On the other hand, such flexible customization would deviate more from the standard notation idea (which is why we fix the culture), i.e. we could no longer guarantee a distinct meaning and round-trip parseability. But this might be ok, as long as users are aware of it.
thus, these customizable functions will receive something like configuration object as one of parameters.
It's seems, that will be not very convenient if it's will be only for output ('format') without input (parse
).
Not sure I understand how difficult it is to implement.
It seems, that currently formatting for display floating numbers (type approximation) not very convenient.
I think that better round off a number to 5-6 decimals before formatting:
I like both options though second more usual for me