Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #85670
| From | Gregory Ewing <greg.ewing@canterbury.ac.nz> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Floating point "g" format not stripping trailing zeros |
| Date | 2015-02-14 16:22 +1300 |
| Message-ID | <ck7tckFhnocU1@mid.individual.net> (permalink) |
| References | <CAK291fpAycSecNuV6hDnVXK+rhB0CWJTAuC3BKNUz8B4aDg2kQ@mail.gmail.com> <CAK291fpKxW_V=yCvNHj9RRoEhC=i_DYJCa9-cbjxDwRwH4-KfQ@mail.gmail.com> <CALwzidk_bPYHGAYxL-yCwZ8xz3_qfjK_0RjhSeHtL7eukQjjbw@mail.gmail.com> <mailman.18739.1423868773.18130.python-list@python.org> |
Mark Lawrence wrote: > I still think it's a bug as the 'p' being referred to in the OP's > original message is "The precision is a decimal number indicating how > many digits should be displayed after the decimal point for a floating > point value formatted with 'f' and 'F', or before and after the decimal > point for a floating point value formatted with 'g' or 'G'". In other > words is has nothing to do with the precision of the underlying number. But it does say that "insignificant trailing zeros are removed", not just "trailing zeros are removed". However, it's possible that "insignificant" was just intended to mean "after the decimal point". The specification is a bit vague. -- Greg
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: Floating point "g" format not stripping trailing zeros Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-02-13 23:05 +0000 Re: Floating point "g" format not stripping trailing zeros Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-02-14 16:22 +1300
csiph-web