minor fixes
This commit is contained in:
parent
5fc0a635e3
commit
51c74744f3
1 changed files with 4 additions and 1 deletions
|
@ -50,7 +50,7 @@ let mсs = 0.000001;
|
||||||
Just like before, using `"e"` can help. If we'd like to avoid writing the zeroes explicitly, we could write the same as:
|
Just like before, using `"e"` can help. If we'd like to avoid writing the zeroes explicitly, we could write the same as:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
let mcs = 1e-6; // six zeroes to the left from 1
|
let mcs = 1e-6; // five zeroes to the left from 1
|
||||||
```
|
```
|
||||||
|
|
||||||
If we count the zeroes in `0.000001`, there are 6 of them. So naturally it's `1e-6`.
|
If we count the zeroes in `0.000001`, there are 6 of them. So naturally it's `1e-6`.
|
||||||
|
@ -63,6 +63,9 @@ In other words, a negative number after `"e"` means a division by 1 with the giv
|
||||||
|
|
||||||
// -6 divides by 1 with 6 zeroes
|
// -6 divides by 1 with 6 zeroes
|
||||||
1.23e-6 === 1.23 / 1000000; // 0.00000123
|
1.23e-6 === 1.23 / 1000000; // 0.00000123
|
||||||
|
|
||||||
|
// an example with a bigger number
|
||||||
|
1234e-2 === 1234 / 100; // 12.34, decimal point moves 2 times
|
||||||
```
|
```
|
||||||
|
|
||||||
### Hex, binary and octal numbers
|
### Hex, binary and octal numbers
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue