|Subject:||weird: say 1.0000000000000000000000000000001 prints trailing zeros|
|Date:||Wed, 16 Jan 2013 15:49:34 +0100|
|To:||"rakudobug [...] perl.org" <rakudobug [...] perl.org>|
|From:||Paweł Pabian <pawel.pabian [...] implix.com>|
bbkr_ r: say 1.0000000000000000000000000000001
p6eval rakudo efac0f: OUTPUT«1.000000000000000000000000000000100␤»
moritz bbkr_: if the spec says trailing zeros aren't allowed, then it's a bug
bbkr_ moritz: spec does not forbid trailing zeros. it's "common sense" type of issue
masak I don't really see what's wrong with trailing zeroes.
bbkr_ masak: IMO number should be printed in simplest form possible. and it works that way up to 1.0000000000000000001 (no trailing zeros).
masak I'll go so far as agree that it's a bit weird that those zeroes are there.
bbkr_ this may cause problems when using in some fixed-width environment (tables, protocols using stringified value, etc)
FROGGS well, might use sprintf for that
[Coke] if you're using a fixed width, i'd argue you shoudl be using sprintf.
So this is not something that should be put in spec tests (because it is not forbidden by spec) but just a inconsistent behavior to investigate.