[erlang-questions] pre-EEP: accurate float printing (replacement for io_lib_format:fwrite_g/1)
Tue Dec 11 23:40:54 CET 2007
On 11 Dec 2007 10:10:48 +0100, Bjorn Gustavsson <>
> "Bob Ippolito" <> writes:
> > ~g with no precision specification (io_lib_format:fwrite_g/1) is a
> > perfect target and it hits every use the shell has, ~f and ~e I don't
> > care about. Having yet another float format would be completely stupid
> > and confusing to anyone that doesn't know the back story for why
> > supposed backward compatibility required the need for another format.
> > Other languages have undergone this type of change with no ill effects
> > that I've heard of (e.g. TCL did this in 2003 ).
> I agree. If there are no compatibility problems *in practice*, we
> should simply make the change.
I agree, we should change if no real problems are found. What I don't
understand is why just have it for ~g with no precision and not for all
cases of ~g, ~f and ~e? They are really just shifting the decimal dot and
fixing the exponent.
(being the one who wrote the original code in all its glory)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions