Skip to content

Commit bb7495a

Browse files
VishalDalwadidmitshur
authored andcommitted
doc/go1.17: document new math constants
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 <[email protected]> Reviewed-by: Emmanuel Odeke <[email protected]>
1 parent f07e4da commit bb7495a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

doc/go1.17.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,9 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
334334
<dl id="math"><dt><a href="/pkg/math/">math</a></dt>
335335
<dd>
336336
<p><!-- CL 247058 -->
337-
TODO: <a href="https://golang.org/cl/247058">https://golang.org/cl/247058</a>: add MaxUint, MinInt, MaxInt
337+
The math package now defines three more constants: <code>MaxUint</code>, <code>MaxInt</code> and <code>MinInt</code>.
338+
For 32-bit systems their values are <code>2^32 - 1</code>, <code>2^31 - 1</code> and <code>-2^31</code>, respectively.
339+
For 64-bit systems their values are <code>2^64 - 1</code>, <code>2^63 - 1</code> and <code>-2^63</code>, respectively.
338340
</p>
339341
</dd>
340342
</dl><!-- math -->

0 commit comments

Comments
 (0)