Commit 80a87a99 authored by Matthew Dempsky's avatar Matthew Dempsky Committed by Robert Griesemer

spec: Use "non-negative" instead of "positive"

Replacing division-by-power-of-2 with right-shift is valid for
zero too.

R=gri
CC=golang-dev
https://golang.org/cl/7027049
parent 47e5266a
<!--{
"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>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment