From: Robert Griesemer Date: Sat, 17 Nov 2012 19:16:07 +0000 (-0800) Subject: spec: fix constant expression example X-Git-Tag: go1.1rc2~1845 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2ae61d557aec846b9b7970022aaa0c28f17546de;p=gostls13.git spec: fix constant expression example Fixes #4400. R=r, mirtchovski CC=golang-dev https://golang.org/cl/6782084 --- diff --git a/doc/go_spec.html b/doc/go_spec.html index c14d662f8b..73b65f5311 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -3656,7 +3656,8 @@ complex, or string constant). const a = 2 + 3.0 // a == 5.0 (untyped floating-point constant) const b = 15 / 4 // b == 3 (untyped integer constant) const c = 15 / 4.0 // c == 3.75 (untyped floating-point constant) -const Θ float64 = 3/2 // Θ == 1.5 (type float64) +const Θ float64 = 3/2 // Θ == 1.0 (type float64, 3/2 is integer division) +const Π float64 = 3/2. // Π == 1.5 (type float64, 3/2. is float division) const d = 1 << 3.0 // d == 8 (untyped integer constant) const e = 1.0 << 3 // e == 8 (untyped integer constant) const f = int32(1) << 33 // f == 0 (type int32)