Update logical_expressions.qmd
some typos.
This commit is contained in:
@@ -245,7 +245,7 @@ and could write $\lvert x-5\rvert > 7$ as
|
|||||||
(x - 5 < -7) || (x - 5 > 7)
|
(x - 5 < -7) || (x - 5 > 7)
|
||||||
```
|
```
|
||||||
|
|
||||||
(The first expression is false for $x=18$ and the second expression true, so the "or"ed result is `true` and the "and" result if `false`.)
|
(The first expression is false for $x=18$ and the second expression true, so the "or"ed result is `true` and the "and" result is `false`.)
|
||||||
|
|
||||||
|
|
||||||
##### Example
|
##### Example
|
||||||
@@ -286,7 +286,7 @@ The table in the manual on [operator precedence and associativity](https://docs.
|
|||||||
|
|
||||||
|
|
||||||
```{julia}
|
```{julia}
|
||||||
((x-5) < -7) && ((x-5) > 7)
|
((x-5) < -7) || ((x-5) > 7)
|
||||||
```
|
```
|
||||||
|
|
||||||
(This is different than the precedence of the bitwise boolean operators, which have `&` with "Multiplication" and `|` with "Addition", so `x-5 < 7 | x - 5 > 7` would need parentheses.)
|
(This is different than the precedence of the bitwise boolean operators, which have `&` with "Multiplication" and `|` with "Addition", so `x-5 < 7 | x - 5 > 7` would need parentheses.)
|
||||||
|
|||||||
Reference in New Issue
Block a user