Skip to content

Commit

Permalink
doc/go1.17: document new math constants
Browse files Browse the repository at this point in the history
Documents the newly introduced:
* MaxInt
* MinInt
* MaxUint

Updates #28538.
For #44513.
Fixes #46012.

Change-Id: Iab6bbcf8f76ebe105b973d5fd39b86b8cd078348
Reviewed-on: https://go-review.googlesource.com/c/go/+/317911
Trust: Heschi Kreinick <heschi@google.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
  • Loading branch information
VishalDalwadi authored and dmitshur committed May 20, 2021
1 parent f07e4da commit bb7495a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doc/go1.17.html
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,9 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
<dl id="math"><dt><a href="/pkg/math/">math</a></dt>
<dd>
<p><!-- CL 247058 -->
TODO: <a href="https://golang.org/cl/247058">https://golang.org/cl/247058</a>: add MaxUint, MinInt, MaxInt
The math package now defines three more constants: <code>MaxUint</code>, <code>MaxInt</code> and <code>MinInt</code>.
For 32-bit systems their values are <code>2^32 - 1</code>, <code>2^31 - 1</code> and <code>-2^31</code>, respectively.
For 64-bit systems their values are <code>2^64 - 1</code>, <code>2^63 - 1</code> and <code>-2^63</code>, respectively.
</p>
</dd>
</dl><!-- math -->
Expand Down

0 comments on commit bb7495a

Please sign in to comment.