Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6edb240

Browse files
committed
minor fixes
1 parent d07d5df commit 6edb240

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎1-js/05-data-types/02-number/article.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,21 +185,21 @@ There are two ways to do so:
185185
alert( num.toFixed(5) ); // "12.34000", added zeroes to make exactly 5 digits
186186
```
187187

188-
We can convert it to a number using the unary plus or a `Number()` call: `+num.toFixed(5)`.
188+
We can convert it to a number using the unary plus or a `Number()` call, e.g write `+num.toFixed(5)`.
189189

190190
## Imprecise calculations
191191

192192
Internally, a number is represented in 64-bit format [IEEE-754](https://en.wikipedia.org/wiki/IEEE_754-2008_revision), so there are exactly 64 bits to store a number: 52 of them are used to store the digits, 11 of them store the position of the decimal point (they are zero for integer numbers), and 1 bit is for the sign.
193193

194-
If a number is too big, it would overflow the 64-bit storage, potentially giving an infinity:
194+
If a number is really huge, it may overflow the 64-bit storage and become a special numeric value `Infinity`:
195195

196196
```js run
197197
alert( 1e500 ); // Infinity
198198
```
199199

200200
What may be a little less obvious, but happens quite often, is the loss of precision.
201201

202-
Consider this (falsy!) test:
202+
Consider this (falsy!) equality test:
203203

204204
```js run
205205
alert( 0.1 + 0.2 == 0.3 ); // *!*false*/!*

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /