Thanks, issue filed.
https://github.com/golang/go/issues/18772

On Tuesday, January 24, 2017 at 2:13:15 PM UTC+1, Axel Wagner wrote:
>
> FWIW, this is the code used for formatting:
> https://golang.org/src/strconv/ftoa.go#L54
> I would claim, this difference (and/or its conflict with the 
> documentation) is a bug.
>
> On Tue, Jan 24, 2017 at 2:10 PM, Axel Wagner <axel.wa...@googlemail.com 
> <javascript:>> wrote:
>
>> Hm, after some more consideration, this isn't really a good explanation; 
>> %g, in conflict with the documentation, behaves differently then *both* %e 
>> and %f in this case: https://play.golang.org/p/LEVTU7r4wX
>>
>> On Tue, Jan 24, 2017 at 2:03 PM, Axel Wagner <axel.wa...@googlemail.com 
>> <javascript:>> wrote:
>>
>>> Because the default-format for floats is %g, not %f: 
>>> https://play.golang.org/p/KZBtA3ZVN3
>>> (documented in the fmt-godoc: https://godoc.org/fmt -- search for 
>>> "default format")
>>>
>>> On Tue, Jan 24, 2017 at 2:00 PM, Vedran Vekic <vedran...@gmail.com 
>>> <javascript:>> wrote:
>>>
>>>> https://play.golang.org/p/-gSNqKZlst
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "golang-nuts" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to golang-nuts...@googlegroups.com <javascript:>.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to