Skip to content

Commit 1843464

Browse files
dsnetgopherbot
authored andcommitted
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>
1 parent 890179d commit 1843464

6 files changed

Lines changed: 19 additions & 19 deletions

File tree

doc/go1.17_spec.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ <h2 id="Constants">Constants</h2>
656656

657657
<p>
658658
Numeric constants represent exact values of arbitrary precision and do not overflow.
659-
Consequently, there are no constants denoting the IEEE-754 negative zero, infinity,
659+
Consequently, there are no constants denoting the IEEE 754 negative zero, infinity,
660660
and not-a-number values.
661661
</p>
662662

@@ -882,8 +882,8 @@ <h3 id="Numeric_types">Numeric types</h3>
882882
int32 the set of all signed 32-bit integers (-2147483648 to 2147483647)
883883
int64 the set of all signed 64-bit integers (-9223372036854775808 to 9223372036854775807)
884884

885-
float32 the set of all IEEE-754 32-bit floating-point numbers
886-
float64 the set of all IEEE-754 64-bit floating-point numbers
885+
float32 the set of all IEEE 754 32-bit floating-point numbers
886+
float64 the set of all IEEE 754 64-bit floating-point numbers
887887

888888
complex64 the set of all complex numbers with float32 real and imaginary parts
889889
complex128 the set of all complex numbers with float64 real and imaginary parts
@@ -3814,7 +3814,7 @@ <h4 id="Floating_point_operators">Floating-point operators</h4>
38143814
<code>+x</code> is the same as <code>x</code>,
38153815
while <code>-x</code> is the negation of <code>x</code>.
38163816
The result of a floating-point or complex division by zero is not specified beyond the
3817-
IEEE-754 standard; whether a <a href="#Run_time_panics">run-time panic</a>
3817+
IEEE 754 standard; whether a <a href="#Run_time_panics">run-time panic</a>
38183818
occurs is implementation-specific.
38193819
</p>
38203820

@@ -3904,7 +3904,7 @@ <h3 id="Comparison_operators">Comparison operators</h3>
39043904

39053905
<li>
39063906
Floating-point values are comparable and ordered,
3907-
as defined by the IEEE-754 standard.
3907+
as defined by the IEEE 754 standard.
39083908
</li>
39093909

39103910
<li>
@@ -4252,7 +4252,7 @@ <h4>Conversions between numeric types</h4>
42524252
or a complex number to another complex type, the result value is rounded
42534253
to the precision specified by the destination type.
42544254
For instance, the value of a variable <code>x</code> of type <code>float32</code>
4255-
may be stored using additional precision beyond that of an IEEE-754 32-bit number,
4255+
may be stored using additional precision beyond that of an IEEE 754 32-bit number,
42564256
but float32(x) represents the result of rounding <code>x</code>'s value to
42574257
32-bit precision. Similarly, <code>x + 0.1</code> may use more than 32 bits
42584258
of precision, but <code>float32(x + 0.1)</code> does not.

doc/go_spec.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ <h2 id="Constants">Constants</h2>
674674

675675
<p>
676676
Numeric constants represent exact values of arbitrary precision and do not overflow.
677-
Consequently, there are no constants denoting the IEEE-754 negative zero, infinity,
677+
Consequently, there are no constants denoting the IEEE 754 negative zero, infinity,
678678
and not-a-number values.
679679
</p>
680680

@@ -861,8 +861,8 @@ <h3 id="Numeric_types">Numeric types</h3>
861861
int32 the set of all signed 32-bit integers (-2147483648 to 2147483647)
862862
int64 the set of all signed 64-bit integers (-9223372036854775808 to 9223372036854775807)
863863

864-
float32 the set of all IEEE-754 32-bit floating-point numbers
865-
float64 the set of all IEEE-754 64-bit floating-point numbers
864+
float32 the set of all IEEE 754 32-bit floating-point numbers
865+
float64 the set of all IEEE 754 64-bit floating-point numbers
866866

867867
complex64 the set of all complex numbers with float32 real and imaginary parts
868868
complex128 the set of all complex numbers with float64 real and imaginary parts
@@ -5022,7 +5022,7 @@ <h4 id="Floating_point_operators">Floating-point operators</h4>
50225022
<code>+x</code> is the same as <code>x</code>,
50235023
while <code>-x</code> is the negation of <code>x</code>.
50245024
The result of a floating-point or complex division by zero is not specified beyond the
5025-
IEEE-754 standard; whether a <a href="#Run_time_panics">run-time panic</a>
5025+
IEEE 754 standard; whether a <a href="#Run_time_panics">run-time panic</a>
50265026
occurs is implementation-specific.
50275027
</p>
50285028

@@ -5112,7 +5112,7 @@ <h3 id="Comparison_operators">Comparison operators</h3>
51125112

51135113
<li>
51145114
Floating-point types are comparable and ordered.
5115-
Two floating-point values are compared as defined by the IEEE-754 standard.
5115+
Two floating-point values are compared as defined by the IEEE 754 standard.
51165116
</li>
51175117

51185118
<li>
@@ -5542,7 +5542,7 @@ <h4>Conversions between numeric types</h4>
55425542
or a <a href="#Numeric_types">complex number</a> to another complex type, the result value is rounded
55435543
to the precision specified by the destination type.
55445544
For instance, the value of a variable <code>x</code> of type <code>float32</code>
5545-
may be stored using additional precision beyond that of an IEEE-754 32-bit number,
5545+
may be stored using additional precision beyond that of an IEEE 754 32-bit number,
55465546
but float32(x) represents the result of rounding <code>x</code>'s value to
55475547
32-bit precision. Similarly, <code>x + 0.1</code> may use more than 32 bits
55485548
of precision, but <code>float32(x + 0.1)</code> does not.

src/builtin/builtin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ type int32 int32
5353
// Range: -9223372036854775808 through 9223372036854775807.
5454
type int64 int64
5555

56-
// float32 is the set of all IEEE-754 32-bit floating-point numbers.
56+
// float32 is the set of all IEEE 754 32-bit floating-point numbers.
5757
type float32 float32
5858

59-
// float64 is the set of all IEEE-754 64-bit floating-point numbers.
59+
// float64 is the set of all IEEE 754 64-bit floating-point numbers.
6060
type float64 float64
6161

6262
// complex64 is the set of all complex numbers with float32 real and

src/encoding/gob/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ arbitrary precision unsigned integers. There is no int8, int16 etc.
6767
discrimination in the gob format; there are only signed and unsigned integers. As
6868
described below, the transmitter sends the value in a variable-length encoding;
6969
the receiver accepts the value and stores it in the destination variable.
70-
Floating-point numbers are always sent using IEEE-754 64-bit precision (see
70+
Floating-point numbers are always sent using IEEE 754 64-bit precision (see
7171
below).
7272
7373
Signed integers may be received into any signed integer variable: int, int16, etc.;

src/math/big/float.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ const debugFloat = false // enable for debugging
4848
//
4949
// By setting the desired precision to 24 or 53 and using matching rounding
5050
// mode (typically [ToNearestEven]), Float operations produce the same results
51-
// as the corresponding float32 or float64 IEEE-754 arithmetic for operands
51+
// as the corresponding float32 or float64 IEEE 754 arithmetic for operands
5252
// that correspond to normal (i.e., not denormal) float32 or float64 numbers.
5353
// Exponent underflow and overflow lead to a 0 or an Infinity for different
54-
// values than IEEE-754 because Float exponents have a much larger range.
54+
// values than IEEE 754 because Float exponents have a much larger range.
5555
//
5656
// The zero (uninitialized) value for a Float is ready to use and represents
5757
// the number +0.0 exactly, with precision 0 and rounding mode [ToNearestEven].
@@ -73,7 +73,7 @@ type Float struct {
7373
}
7474

7575
// An ErrNaN panic is raised by a [Float] operation that would lead to
76-
// a NaN under IEEE-754 rules. An ErrNaN implements the error interface.
76+
// a NaN under IEEE 754 rules. An ErrNaN implements the error interface.
7777
type ErrNaN struct {
7878
msg string
7979
}

src/math/big/float_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ func TestFloatRound(t *testing.T) {
519519
}
520520

521521
// TestFloatRound24 tests that rounding a float64 to 24 bits
522-
// matches IEEE-754 rounding to nearest when converting a
522+
// matches IEEE 754 rounding to nearest when converting a
523523
// float64 to a float32 (excluding denormal numbers).
524524
func TestFloatRound24(t *testing.T) {
525525
const x0 = 1<<26 - 0x10 // 11...110000 (26 bits)

0 commit comments

Comments
 (0)