Hi again,
(I'm sending this to golang-dev and not golang-nuts because I think a documentation improvement is probably needed.)
The documentation for strconv.ParseFloat mentions that it "accepts decimal and hexadecimal floating-point number syntax", but it doesn't specify what those formats entail. The doc for FormatFloat mentions that the 'x' format gives "-0xd.ddddp±ddd, a hexadecimal fraction and binary exponent", but that's a bit vague, and ParseFloat doesn't refer to that in its doc in any case.
So it's unclear exactly what syntax ParseFloat supports. I think it's important to specify a syntax, particularly for hexadecimal floating point, which isn't particularly common. For example, I was surprised to find "0x1.8" wasn't allowed (an exponent of "p0" is required, as in "0x1.8p0").
It wouldn't be hard to update the docs to have a simple representation of the grammar it supports, for example [±]ddd[.dddd][e[±]ddd] for decimal and [±]0xd.ddddp[±]ddd for hex (or whatever they are exactly). Or we could go full BNF-style notation, but that's probably too much for these docs. Or maybe it's as simple as saying "ParseFloat accepts decimal and hexadecimal floating-point numbers using the same syntax as floating-point literals in Go source code [link to spec section]" ... assuming that's correct.
-Ben