Acosh, Asinh, Atanh, Ceil, Floor, Trunc, Mod and Remainder affected. These changes add some non-finite arguments and results (and -0.0 results).
R=rsc, golang-dev
CC=golang-dev
https://golang.org/cl/
5469046
// Acosh(x) calculates the inverse hyperbolic cosine of x.
//
// Special cases are:
+// Acosh(+Inf) = +Inf
// Acosh(x) = NaN if x < 1
// Acosh(NaN) = NaN
func Acosh(x float64) float64 {
// Asinh(x) calculates the inverse hyperbolic sine of x.
//
// Special cases are:
+// Asinh(±0) = ±0
// Asinh(±Inf) = ±Inf
// Asinh(NaN) = NaN
func Asinh(x float64) float64 {
// Atanh(x) calculates the inverse hyperbolic tangent of x.
//
// Special cases are:
-// Atanh(x) = NaN if x < -1 or x > 1
// Atanh(1) = +Inf
+// Atanh(±0) = ±0
// Atanh(-1) = -Inf
+// Atanh(x) = NaN if x < -1 or x > 1
// Atanh(NaN) = NaN
func Atanh(x float64) float64 {
const NearZero = 1.0 / (1 << 28) // 2**-28
// Floor returns the greatest integer value less than or equal to x.
//
// Special cases are:
+// Floor(±0) = ±0
// Floor(±Inf) = ±Inf
// Floor(NaN) = NaN
func Floor(x float64) float64 {
// Ceil returns the least integer value greater than or equal to x.
//
// Special cases are:
+// Ceil(±0) = ±0
// Ceil(±Inf) = ±Inf
// Ceil(NaN) = NaN
func Ceil(x float64) float64 { return -Floor(-x) }
// Trunc returns the integer value of x.
//
// Special cases are:
+// Trunc(±0) = ±0
// Trunc(±Inf) = ±Inf
// Trunc(NaN) = NaN
func Trunc(x float64) float64 {
// sign agrees with that of x.
//
// Special cases are:
-// if x is not finite, Mod returns NaN
-// if y is 0 or NaN, Mod returns NaN
+// Mod(±Inf, y) = NaN
+// Mod(NaN, y) = NaN
+// Mod(x, 0) = NaN
+// Mod(x, ±Inf) = x
+// Mod(x, NaN) = NaN
func Mod(x, y float64) float64 {
// TODO(rsc): Remove manual inlining of IsNaN, IsInf
// when compiler does it for us.
// Special cases are:
// Nextafter(NaN, y) = NaN
// Nextafter(x, NaN) = NaN
+// Nextafter(0, y) = -0, if y < 0
func Nextafter(x, y float64) (r float64) {
// TODO(rsc): Remove manual inlining of IsNaN
// when compiler does it for us
// Remainder returns the IEEE 754 floating-point remainder of x/y.
//
// Special cases are:
-// Remainder(x, NaN) = NaN
+// Remainder(±Inf, y) = NaN
// Remainder(NaN, y) = NaN
-// Remainder(Inf, y) = NaN
// Remainder(x, 0) = NaN
-// Remainder(x, Inf) = x
+// Remainder(x, ±Inf) = x
+// Remainder(x, NaN) = NaN
func Remainder(x, y float64) float64 {
const (
Tiny = 4.45014771701440276618e-308 // 0x0020000000000000