]> Cypherpunks.ru repositories - gostls13.git/commit
fmt: format hex floats and complexes
authorRuss Cox <rsc@golang.org>
Wed, 30 Jan 2019 03:13:54 +0000 (22:13 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 26 Feb 2019 05:16:49 +0000 (05:16 +0000)
commite1a6d1fc08b2701ac9f67353cb52c51d52877669
tree58cd10365ac53e6c5fd06f7ddc49c8e47878e46a
parent50bb2b6b0f11e4e3ef73aee55946cd4da546f6b1
fmt: format hex floats and complexes

This CL modifies fmt's printer to implement %x and %X
for formatting floating-point data (floats and complexes)
in standard hexadecimal notation.

See golang.org/design/19308-number-literals for background.

For #29008.
Vet update is #29986.

Change-Id: If2842a11631bc393a1ebcf6914ed07658652af5a
Reviewed-on: https://go-review.googlesource.com/c/160245
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/fmt/doc.go
src/fmt/fmt_test.go
src/fmt/format.go
src/fmt/print.go