diff --git a/doc/go_spec.html b/doc/go_spec.html index 6c4eac152d..873c127bdd 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -558,7 +558,9 @@ and are discussed in that section.

-Numeric constants represent values of arbitrary precision and do not overflow. +Numeric constants represent exact values of arbitrary precision and do not overflow. +Consequently, there are no constants denoting the IEEE-754 negative zero, infinity, +and not-a-number values.

@@ -593,16 +595,6 @@ respectively, depending on whether it is a boolean, rune, integer, floating-poin complex, or string constant.

-

-There are no constants denoting the IEEE-754 infinity and not-a-number values, -but the math package's -Inf, -NaN, -IsInf, and -IsNaN -functions return and test for those values at run time. -

-

Implementation restriction: Although numeric constants have arbitrary precision in the language, a compiler may implement them using an @@ -3795,7 +3787,8 @@ type T in any of these cases: T is a floating-point type, and x is representable by a value of type T after rounding using - IEEE 754 round-to-even rules. + IEEE 754 round-to-even rules, but with an IEEE -0.0 + further rounded to an unsigned 0.0. The constant T(x) is the rounded value.

  • @@ -3815,6 +3808,7 @@ uint(iota) // iota value of type uint float32(2.718281828) // 2.718281828 of type float32 complex128(1) // 1.0 + 0.0i of type complex128 float32(0.49999999) // 0.5 of type float32 +float64(-1e-1000) // 0.0 of type float64 string('x') // "x" of type string string(0x266c) // "♬" of type string MyString("foo" + "bar") // "foobar" of type MyString