Merge pull request #21 from AndrewWasHere/AndrewWasHere-number_types

Typos and constant corrected.
This commit is contained in:
john verzani 2022-08-20 15:37:46 -04:00 committed by GitHub
commit 3a4ae24971
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,8 +58,8 @@ Though there are explicit constructors for these types, these notes avoid them u
:::{.callout-note}
## Warngin
Heads up, the difference between `1` and `1.0` is subtle. Even more so, as `1.` will parse as `1.0`. This means some expressions, such as `2.*3`, are ambigous, as the `.` might be part of the `2` (as in `2. * 3`) or the operation `*` (as in `2 .* 3`).
## Warning
Heads up, the difference between `1` and `1.0` is subtle. Even more so, as `1.` will parse as `1.0`. This means some expressions, such as `2.*3`, are ambiguous, as the `.` might be part of the `2` (as in `2. * 3`) or the operation `*` (as in `2 .* 3`).
:::
@ -69,7 +69,7 @@ Similarly, each type is printed slightly differently.
The key distinction is between integers and floating points. While floating point values include integers, and so can be used exclusively on the calculator, the difference is that an integer is guaranteed to be an exact value, whereas a floating point value, while often an exact representation of a number is also often just an *approximate* value. This can be an advantage floating point values can model a much wider range of numbers.
Now in nearly all cases the differences are not noticable. Take for instance this simple calculation involving mixed types.
Now in nearly all cases the differences are not noticeable. Take for instance this simple calculation involving mixed types.
```{julia}
@ -200,14 +200,14 @@ or may be represented in scientific notation:
```{julia}
6.23 * 10.0^23
6.022 * 10.0^23
```
The special coding `aeb` (or if the exponent is negative `ae-b`) is used to represent the number $a \cdot 10^b$ ($1 \leq a < 10$). This notation can be used directly to specify a floating point value:
```{julia}
avagadro = 6.23e23
avogadro = 6.022e23
```
Here `e` is decidedly *not* the Euler number, rather syntax to separate the exponent from the mantissa.