]> Cypherpunks repositories - gostls13.git/commitdiff
spec: Use "non-negative" instead of "positive"
authorMatthew Dempsky <mdempsky@google.com>
Mon, 7 Jan 2013 00:56:06 +0000 (16:56 -0800)
committerRobert Griesemer <gri@golang.org>
Mon, 7 Jan 2013 00:56:06 +0000 (16:56 -0800)
Replacing division-by-power-of-2 with right-shift is valid for
zero too.

R=gri
CC=golang-dev
https://golang.org/cl/7027049

doc/go_spec.html

index ad3fa519b2ec24ae9b92bb3cf6465a8eb36f48f0..e54068a2d7b3abf089bc87a7ce60c8e652e2a123 100644 (file)
@@ -1,6 +1,6 @@
 <!--{
        "Title": "The Go Programming Language Specification",
-       "Subtitle": "Version of January 2, 2013",
+       "Subtitle": "Version of January 6, 2013",
        "Path": "/ref/spec"
 }-->
 
@@ -3027,7 +3027,7 @@ int64    -9223372036854775808
 <p>
 If the divisor is a <a href="#Constants">constant</a>, it must not be zero.
 If the divisor is zero at run time, a <a href="#Run_time_panics">run-time panic</a> occurs.
-If the dividend is positive and the divisor is a constant power of 2,
+If the dividend is non-negative and the divisor is a constant power of 2,
 the division may be replaced by a right shift, and computing the remainder may
 be replaced by a bitwise AND operation:
 </p>