aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoe Tsai <joetsai@digital-static.net>2024-04-01 13:13:50 -0700
committerGopher Robot <gobot@golang.org>2024-04-11 20:22:45 +0000
commit1843464f014c946c1663de76249267486887626f (patch)
treee17af621011573c6cb9c9ed51ddd5ad5a0135117 /src
parent890179d949da55aaa09d60c4fe2c25397d2ce906 (diff)
downloadgo-1843464f014c946c1663de76249267486887626f.tar.xz
all: consistently use "IEEE 754" over "IEEE-754"
There is no hyphen between the organization and the number. For example, https://standards.ieee.org/ieee/754/6210/ shows the string "IEEE 754-2019" and not "IEEE-754-2019". This assists in searching for "IEEE 754" in documentation and not missing those using "IEEE-754". Change-Id: I9a50ede807984ff1e2f17390bc1039f6a5d162e5 Reviewed-on: https://go-review.googlesource.com/c/go/+/575438 Run-TryBot: Joseph Tsai <joetsai@digital-static.net> Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Joseph Tsai <joetsai@digital-static.net> TryBot-Result: Gopher Robot <gobot@golang.org> TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/builtin/builtin.go4
-rw-r--r--src/encoding/gob/doc.go2
-rw-r--r--src/math/big/float.go6
-rw-r--r--src/math/big/float_test.go2
4 files changed, 7 insertions, 7 deletions
diff --git a/src/builtin/builtin.go b/src/builtin/builtin.go
index 668c799ca7..215c59c4ae 100644
--- a/src/builtin/builtin.go
+++ b/src/builtin/builtin.go
@@ -53,10 +53,10 @@ type int32 int32
// Range: -9223372036854775808 through 9223372036854775807.
type int64 int64
-// float32 is the set of all IEEE-754 32-bit floating-point numbers.
+// float32 is the set of all IEEE 754 32-bit floating-point numbers.
type float32 float32
-// float64 is the set of all IEEE-754 64-bit floating-point numbers.
+// float64 is the set of all IEEE 754 64-bit floating-point numbers.
type float64 float64
// complex64 is the set of all complex numbers with float32 real and
diff --git a/src/encoding/gob/doc.go b/src/encoding/gob/doc.go
index 3f26ed8591..30e7978b7c 100644
--- a/src/encoding/gob/doc.go
+++ b/src/encoding/gob/doc.go
@@ -67,7 +67,7 @@ arbitrary precision unsigned integers. There is no int8, int16 etc.
discrimination in the gob format; there are only signed and unsigned integers. As
described below, the transmitter sends the value in a variable-length encoding;
the receiver accepts the value and stores it in the destination variable.
-Floating-point numbers are always sent using IEEE-754 64-bit precision (see
+Floating-point numbers are always sent using IEEE 754 64-bit precision (see
below).
Signed integers may be received into any signed integer variable: int, int16, etc.;
diff --git a/src/math/big/float.go b/src/math/big/float.go
index 1c97ec98c0..0a2887cb5f 100644
--- a/src/math/big/float.go
+++ b/src/math/big/float.go
@@ -48,10 +48,10 @@ const debugFloat = false // enable for debugging
//
// By setting the desired precision to 24 or 53 and using matching rounding
// mode (typically [ToNearestEven]), Float operations produce the same results
-// as the corresponding float32 or float64 IEEE-754 arithmetic for operands
+// as the corresponding float32 or float64 IEEE 754 arithmetic for operands
// that correspond to normal (i.e., not denormal) float32 or float64 numbers.
// Exponent underflow and overflow lead to a 0 or an Infinity for different
-// values than IEEE-754 because Float exponents have a much larger range.
+// values than IEEE 754 because Float exponents have a much larger range.
//
// The zero (uninitialized) value for a Float is ready to use and represents
// the number +0.0 exactly, with precision 0 and rounding mode [ToNearestEven].
@@ -73,7 +73,7 @@ type Float struct {
}
// An ErrNaN panic is raised by a [Float] operation that would lead to
-// a NaN under IEEE-754 rules. An ErrNaN implements the error interface.
+// a NaN under IEEE 754 rules. An ErrNaN implements the error interface.
type ErrNaN struct {
msg string
}
diff --git a/src/math/big/float_test.go b/src/math/big/float_test.go
index bb045a0b48..cc842754b5 100644
--- a/src/math/big/float_test.go
+++ b/src/math/big/float_test.go
@@ -519,7 +519,7 @@ func TestFloatRound(t *testing.T) {
}
// TestFloatRound24 tests that rounding a float64 to 24 bits
-// matches IEEE-754 rounding to nearest when converting a
+// matches IEEE 754 rounding to nearest when converting a
// float64 to a float32 (excluding denormal numbers).
func TestFloatRound24(t *testing.T) {
const x0 = 1<<26 - 0x10 // 11...110000 (26 bits)