]> Cypherpunks repositories - gostls13.git/commit
math: document special-cases behavior for Dim, Max and Min
authorCharles L. Dorian <cldorian@gmail.com>
Wed, 7 Dec 2011 19:52:17 +0000 (14:52 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 7 Dec 2011 19:52:17 +0000 (14:52 -0500)
commite4de2e7fd04c92d4035cd268d5043f2380aef437
tree6864810ddcdaf0a8816191f320aad510edc1e358
parent69191553e7a67f63c21d79caf1881ee7487cb6bc
math: document special-cases behavior for Dim, Max and Min

Max returns +Inf if x or y is +Inf; else it returns NaN if either x or y is NaN. Max(-0, -0) returns -0.
Min returns -Inf if x or y is -Inf; else it returns NaN if either x or y is NaN. Min(+0, -0) returns -0.
Dim(+Inf, +Inf) = NaN, Dim(-Inf, -Inf) = NaN and Dim(NaN, anything) = NaN.
Also, change "conditions" to "cases" for Sin (missed it in previous CL).

R=rsc, dave
CC=golang-dev
https://golang.org/cl/5437137
src/pkg/math/all_test.go
src/pkg/math/dim.go
src/pkg/math/dim_amd64.s
src/pkg/math/sin.go