Engineering numerical format PEP discussion
contact at xavierho.com
Mon Apr 26 07:25:18 CEST 2010
On Mon, Apr 26, 2010 at 3:19 PM, Chris Rebert <clp2 at rebertia.com> wrote:
> Apparently either you and the General Decimal Arithmetic spec differ
> on what constitutes engineering notation, there's a bug in the Python
> decimal library, or you're hitting some obscure part of the spec's
> definition. I don't have the expertise to know which is the case.
> The spec: http://speleotrove.com/decimal/decarith.pdf
> (to-engineering-string is on page 20 if you're interested)
> I just gave Page 20 a quick read, and it says:
if the number is non-zero, the converted exponent is adjusted to be a
> multiple of three (engineering notation) by positioning the decimal point
> with one, two, or three characters preceding it (that is, the part before
> the decimal point will range from 1 through 999);
Obviously that would make '1234567' not an Engineering notation?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list