]> Cypherpunks repositories - gostls13.git/commitdiff
fmt: document %b for floating point
authorRob Pike <r@golang.org>
Wed, 2 Feb 2011 05:10:16 +0000 (21:10 -0800)
committerRob Pike <r@golang.org>
Wed, 2 Feb 2011 05:10:16 +0000 (21:10 -0800)
R=rsc
CC=golang-dev
https://golang.org/cl/4073051

src/pkg/fmt/doc.go

index 02c29389d0d0555d24af86abcc3acc38d35d6b96..03800aa47a8a20d7bd1807eea38c9bf9a6ebc520 100644 (file)
@@ -28,6 +28,8 @@
                %X      base 16, with upper-case letters for A-F
                %U      Unicode format: U+1234; same as "U+%x" with 4 digits default
        Floating-point and complex constituents:
+               %b      decimalless scientific notation with exponent a power
+                       of two, in the manner of strconv.Ftoa32, e.g. -123456p-78
                %e      scientific notation, e.g. -1234.456e+78
                %E      scientific notation, e.g. -1234.456E+78
                %f      decimal point but no exponent, e.g. 123.456