Skip to content

Commit bf333e7

Browse files
committed
reword the end of the chapter on numbers
1 parent eba697d commit bf333e7

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

chapter04-numbers.jsh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ System.out.println(Double.isNaN(Double.NaN));
105105

106106

107107
// ### Record and NaN
108-
// To avoid the issue of _x not equals to x_ to propagate to a whole record,
109-
// the implementation of `equals()` for a record checks the raw bytes of the double after
110-
// all NaN (yes internally there are several possible representation of NaN) being
111-
// collapsed into one so testing if two records are equals works as expected !
108+
// To avoid the issue of a record r not equals to itself because it has a component
109+
// that contains NaN the implementation of `equals()` for a record checks
110+
// the raw bytes of the double after all NaN (yes internally there are several possible
111+
// representation of NaN) are collapsed into one so testing if two records are equals works as expected !
112112
record MagicBeer(double content) { }
113113
var beer1 = new MagicBeer(Double.NaN);
114114
var beer2 = new MagicBeer(Double.NaN);

guide/chapter04-numbers.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ System.out.println(Double.isNaN(Double.NaN));
135135

136136

137137
### Record and NaN
138-
To avoid the issue of _x not equals to x_ to propagate to a whole record,
139-
the implementation of `equals()` for a record checks the raw bytes of the double after
140-
all NaN (yes internally there are several possible representation of NaN) being
141-
collapsed into one so testing if two records are equals works as expected !
138+
To avoid the issue of a record r not equals to itself because it has a component
139+
that contains NaN the implementation of `equals()` for a record checks
140+
the raw bytes of the double after all NaN (yes internally there are several possible
141+
representation of NaN) are collapsed into one so testing if two records are equals works as expected !
142142
```java
143143
record MagicBeer(double content) { }
144144
var beer1 = new MagicBeer(Double.NaN);

jupyter/chapter04-numbers.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
{
271271
"cell_type": "markdown",
272272
"metadata": {},
273-
"source": ["### Record and NaN\n", "To avoid the issue of _x not equals to x_ to propagate to a whole record,\n", "the implementation of `equals()` for a record checks the raw bytes of the double after\n", "all NaN (yes internally there are several possible representation of NaN) being\n", "collapsed into one so testing if two records are equals works as expected !\n"]
273+
"source": ["### Record and NaN\n", "To avoid the issue of a record r not equals to itself because it has a component\n", "that contains NaN the implementation of `equals()` for a record checks\n", "the raw bytes of the double after all NaN (yes internally there are several possible\n", "representation of NaN) are collapsed into one so testing if two records are equals works as expected !\n"]
274274
}
275275
,
276276
{

0 commit comments

Comments
 (0)