This commit is contained in:
jverzani
2024-05-22 07:55:20 -04:00
parent f710cded15
commit 771bb06aa3
50 changed files with 120 additions and 426 deletions

View File

@@ -82,7 +82,7 @@ For typical cases like the three above, there isn't really much new to learn.
## Note
The equals sign in `Julia` always indicates either an assignment or a mutation of the object on the left side. The definition of a function above is an *assignment*, in that a function is added (or modified) in a table holding the methods associated with the function's name.
The equals sign restricts the expressions available on the *left*-hand side to a) a variable name, for assignment; b) mutating an object at an index, as in `xs[1]`; c) mutating a property of a stuct; or d) a function assignment following this form `function_name(args...)`.
The equals sign restricts the expressions available on the *left*-hand side to a) a variable name, for assignment; b) mutating an object at an index, as in `xs[1]`; c) mutating a property of a struct; or d) a function assignment following this form `function_name(args...)`.
Whereas function definitions and usage in `Julia` mirrors standard math notation; equations in math are not so mirrored in `Julia`. In mathematical equations, the left-hand of an equation is typically a complicated algebraic expression. Not so with `Julia`, where the left hand side of the equals sign is prescribed and quite limited.
@@ -276,7 +276,7 @@ The line `return x^2`, could have just been `x^2` as it is the last (and) only l
:::{.callout-note}
## Note
The `return` keyword is not a function, so is not called with parentheses. An emtpy `return` statement will return a value of `nothing`.
The `return` keyword is not a function, so is not called with parentheses. An empty `return` statement will return a value of `nothing`.
:::
@@ -1271,7 +1271,7 @@ A mathematical interval is a set of values of the form
* an open interval: $a < x < b$, or $(a,b)$;
* a closed interval: $a \leq x \leq b$, or $[a,b]$;
* or a half-open interval: $a < x \leq b$ or $a \leq x < b$, repectively $(a,b]$ or $[a,b)$.
* or a half-open interval: $a < x \leq b$ or $a \leq x < b$, respectively $(a,b]$ or $[a,b)$.
They all contain all real numbers between the endpoints, the distinction is whether the endpoints are included or not.
@@ -1332,7 +1332,7 @@ Guess why or why not?
#| hold: true
#| echo: false
choices = ["Well it does, because ``[0,1]`` is the range",
"""It does not. The bound found is a provably known bound. The small deviation is due to the possible errors in evalution of the `sin` function near the floating point approximation of `pi`,
"""It does not. The bound found is a provably known bound. The small deviation is due to the possible errors in evaluation of the `sin` function near the floating point approximation of `pi`,
"""]
radioq(choices, 2)
```