]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.17: document new math constants
authorVishal Dalwadi <dalwadivishal26@gmail.com>
Fri, 7 May 2021 04:55:27 +0000 (10:25 +0530)
committerDmitri Shuralyov <dmitshur@golang.org>
Thu, 20 May 2021 16:08:35 +0000 (16:08 +0000)
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>
doc/go1.17.html

index 4b2f4bce7964dc7de4aa69184ca64086e7825c68..4c7348a36d5a7fe20909e765e3e145b589941be8 100644 (file)
@@ -334,7 +334,9 @@ Do not send CLs removing the interior tags from such phrases.
 <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 -->