1
0
mirror of https://github.com/golang/go synced 2024-11-22 14:44:50 -07:00

spec: clarify min/max rules for numeric arguments (exclude NaNs)

Fixes #60570.

Change-Id: I7ef834731ea26ceee5ec9b7438fdd8323aaf828e
Reviewed-on: https://go-review.googlesource.com/c/go/+/500416
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
This commit is contained in:
Robert Griesemer 2023-06-02 09:29:07 -07:00 committed by Gopher Robot
parent 4dae3bbe0e
commit 1aaf1b219a

View File

@ -1,6 +1,6 @@
<!--{
"Title": "The Go Programming Language Specification",
"Subtitle": "Version of May 25, 2023",
"Subtitle": "Version of June 6, 2023",
"Path": "/ref/spec"
}-->
@ -7563,7 +7563,7 @@ t := max("", "foo", "bar") // t == "foo" (string kind)
</pre>
<p>
For numeric arguments, <code>min</code> and <code>max</code> are
For numeric arguments, assuming all NaNs are equal, <code>min</code> and <code>max</code> are
commutative and associative:
</p>