fmt
All checks were successful
CI / Typos (pull_request) Successful in 9s
CI / Typst formatting (pull_request) Successful in 4s
CI / Build (pull_request) Successful in 6m3s
CI / Typos (push) Successful in 10s
CI / Typst formatting (push) Successful in 4s
CI / Build (push) Successful in 7m25s
All checks were successful
CI / Typos (pull_request) Successful in 9s
CI / Typst formatting (pull_request) Successful in 4s
CI / Build (pull_request) Successful in 6m3s
CI / Typos (push) Successful in 10s
CI / Typst formatting (push) Successful in 4s
CI / Build (push) Successful in 7m25s
This commit is contained in:
@ -31,7 +31,9 @@ Rewrite the following binary decimals in base 10: \
|
|||||||
#definition(label: "floatbits")
|
#definition(label: "floatbits")
|
||||||
Another way we can interpret a bit string is as a _signed floating-point decimal_, or a `float` for short. \
|
Another way we can interpret a bit string is as a _signed floating-point decimal_, or a `float` for short. \
|
||||||
Floats represent a subset of the real numbers, and are interpreted as follows: \
|
Floats represent a subset of the real numbers, and are interpreted as follows: \
|
||||||
#note([The following only applies to floats that consist of 32 bits. We won't encounter any others today.])
|
#note(
|
||||||
|
[The following only applies to floats that consist of 32 bits. We won't encounter any others today.],
|
||||||
|
)
|
||||||
|
|
||||||
#align(center, box(inset: 2mm, cetz.canvas({
|
#align(center, box(inset: 2mm, cetz.canvas({
|
||||||
import cetz.draw: *
|
import cetz.draw: *
|
||||||
|
@ -156,9 +156,9 @@ float Q_rsqrt( float number ) {
|
|||||||
Using a calculator and some basic algebra, we can find the $epsilon$ this code uses: \
|
Using a calculator and some basic algebra, we can find the $epsilon$ this code uses: \
|
||||||
#note[Remember, #text[`0x5f3759df`] is $6240089$ in hexadecimal.]
|
#note[Remember, #text[`0x5f3759df`] is $6240089$ in hexadecimal.]
|
||||||
$
|
$
|
||||||
(3 times 2^22) (127 - epsilon) &= 6240089 \
|
(3 times 2^22) (127 - epsilon) & = 6240089 \
|
||||||
(127 - epsilon) &= 126.955 \
|
(127 - epsilon) & = 126.955 \
|
||||||
epsilon &= 0.0450466
|
epsilon & = 0.0450466
|
||||||
$
|
$
|
||||||
|
|
||||||
So, $0.045$ is the $epsilon$ used by Quake. \
|
So, $0.045$ is the $epsilon$ used by Quake. \
|
||||||
|
@ -26,9 +26,9 @@ $
|
|||||||
|
|
||||||
#solution([
|
#solution([
|
||||||
- Is tropical addition commutative?\
|
- Is tropical addition commutative?\
|
||||||
Yes, $min(min(x,y),z) = min(x,y,z) = min(x,min(y,z))$
|
Yes, $min(min(x, y), z) = min(x, y, z) = min(x, min(y, z))$
|
||||||
- Is tropical addition associative? \
|
- Is tropical addition associative? \
|
||||||
Yes, $min(x,y) = min(y,x)$
|
Yes, $min(x, y) = min(y, x)$
|
||||||
- Is there a tropical additive identity? \
|
- Is there a tropical additive identity? \
|
||||||
No. There is no $n$ where $x <= n$ for all real $x$
|
No. There is no $n$ where $x <= n$ for all real $x$
|
||||||
])
|
])
|
||||||
@ -117,7 +117,7 @@ Do tropical multiplicative inverses always exist? \
|
|||||||
Is tropical multiplication distributive over addition? \
|
Is tropical multiplication distributive over addition? \
|
||||||
#note([Does $x #tm (y #tp z) = x #tm y #tp x #tm z$?])
|
#note([Does $x #tm (y #tp z) = x #tm y #tp x #tm z$?])
|
||||||
|
|
||||||
#solution([Yes, $x + min(y,z) = min(x+y, x+z)$])
|
#solution([Yes, $x + min(y, z) = min(x+y, x+z)$])
|
||||||
|
|
||||||
#v(1fr)
|
#v(1fr)
|
||||||
|
|
||||||
@ -134,14 +134,7 @@ Fill the following tropical addition and multiplication tables
|
|||||||
table(
|
table(
|
||||||
columns: (col, col, col, col, col, col),
|
columns: (col, col, col, col, col, col),
|
||||||
align: center,
|
align: center,
|
||||||
table.header(
|
table.header([$#tp$], [$1$], [$2$], [$3$], [$4$], [$#sym.infinity$]),
|
||||||
[$#tp$],
|
|
||||||
[$1$],
|
|
||||||
[$2$],
|
|
||||||
[$3$],
|
|
||||||
[$4$],
|
|
||||||
[$#sym.infinity$],
|
|
||||||
),
|
|
||||||
|
|
||||||
box(inset: 3pt, $1$), [], [], [], [], [],
|
box(inset: 3pt, $1$), [], [], [], [], [],
|
||||||
box(inset: 3pt, $2$), [], [], [], [], [],
|
box(inset: 3pt, $2$), [], [], [], [], [],
|
||||||
@ -152,14 +145,7 @@ Fill the following tropical addition and multiplication tables
|
|||||||
table(
|
table(
|
||||||
columns: (col, col, col, col, col, col),
|
columns: (col, col, col, col, col, col),
|
||||||
align: center,
|
align: center,
|
||||||
table.header(
|
table.header([$#tm$], [$0$], [$1$], [$2$], [$3$], [$4$]),
|
||||||
[$#tm$],
|
|
||||||
[$0$],
|
|
||||||
[$1$],
|
|
||||||
[$2$],
|
|
||||||
[$3$],
|
|
||||||
[$4$],
|
|
||||||
),
|
|
||||||
|
|
||||||
box(inset: 3pt, $0$), [], [], [], [], [],
|
box(inset: 3pt, $0$), [], [], [], [], [],
|
||||||
box(inset: 3pt, $1$), [], [], [], [], [],
|
box(inset: 3pt, $1$), [], [], [], [], [],
|
||||||
@ -178,14 +164,7 @@ Fill the following tropical addition and multiplication tables
|
|||||||
table(
|
table(
|
||||||
columns: (col, col, col, col, col, col),
|
columns: (col, col, col, col, col, col),
|
||||||
align: center,
|
align: center,
|
||||||
table.header(
|
table.header([$#tp$], [$1$], [$2$], [$3$], [$4$], [$#sym.infinity$]),
|
||||||
[$#tp$],
|
|
||||||
[$1$],
|
|
||||||
[$2$],
|
|
||||||
[$3$],
|
|
||||||
[$4$],
|
|
||||||
[$#sym.infinity$],
|
|
||||||
),
|
|
||||||
|
|
||||||
box(inset: 3pt, $1$),
|
box(inset: 3pt, $1$),
|
||||||
box(inset: 3pt, $1$),
|
box(inset: 3pt, $1$),
|
||||||
@ -225,14 +204,7 @@ Fill the following tropical addition and multiplication tables
|
|||||||
table(
|
table(
|
||||||
columns: (col, col, col, col, col, col),
|
columns: (col, col, col, col, col, col),
|
||||||
align: center,
|
align: center,
|
||||||
table.header(
|
table.header([$#tm$], [$0$], [$1$], [$2$], [$3$], [$4$]),
|
||||||
[$#tm$],
|
|
||||||
[$0$],
|
|
||||||
[$1$],
|
|
||||||
[$2$],
|
|
||||||
[$3$],
|
|
||||||
[$4$],
|
|
||||||
),
|
|
||||||
|
|
||||||
box(inset: 3pt, $0$),
|
box(inset: 3pt, $0$),
|
||||||
box(inset: 3pt, $0$),
|
box(inset: 3pt, $0$),
|
||||||
@ -281,10 +253,9 @@ Adjacent parenthesis imply tropical multiplication
|
|||||||
|
|
||||||
#solution([
|
#solution([
|
||||||
$
|
$
|
||||||
(x #tp 2)(x #tp 3)
|
(x #tp 2)(x #tp 3) & = x^2 #tp 2x #tp 3x #tp (2 #tm 3) \
|
||||||
&= x^2 #tp 2x #tp 3x #tp (2 #tm 3) \
|
& = x^2 #tp (2 #tp 3)x #tp (2 #tm 3) \
|
||||||
&= x^2 #tp (2 #tp 3)x #tp (2 #tm 3) \
|
& = x^2 #tp 2x #tp 5
|
||||||
&= x^2 #tp 2x #tp 5
|
|
||||||
$
|
$
|
||||||
|
|
||||||
Also, $f(1) = 2$ and $f(4) = 5$.
|
Also, $f(1) = 2$ and $f(4) = 5$.
|
||||||
|
@ -12,7 +12,9 @@ There are four classes of Euclidean isometries:
|
|||||||
- reflections
|
- reflections
|
||||||
- rotations
|
- rotations
|
||||||
- glide reflections
|
- glide reflections
|
||||||
#note([We can prove there are no others, but this is beyond the scope of this handout.]) \
|
#note(
|
||||||
|
[We can prove there are no others, but this is beyond the scope of this handout.],
|
||||||
|
) \
|
||||||
A simple example of each isometry is shown below:
|
A simple example of each isometry is shown below:
|
||||||
|
|
||||||
#let demo(c) = {
|
#let demo(c) = {
|
||||||
|
@ -46,10 +46,10 @@ Use two half adders to construct a full adder.
|
|||||||
|
|
||||||
#solution([
|
#solution([
|
||||||
$
|
$
|
||||||
s_1, c_1 &= "HA"(a, b) \
|
s_1, c_1 & = "HA"(a, b) \
|
||||||
s_2, c_2 &= "HA"(s_1, c_"in") \
|
s_2, c_2 & = "HA"(s_1, c_"in") \
|
||||||
s_"out" &= s_2 \
|
s_"out" & = s_2 \
|
||||||
c_"out" &= "OR"(c_1, c_2)
|
c_"out" & = "OR"(c_1, c_2)
|
||||||
$
|
$
|
||||||
|
|
||||||
#v(2mm)
|
#v(2mm)
|
||||||
|
@ -17,7 +17,9 @@ Maximize the product $a_1 #sym.times a_2 #sym.times ... #sym.times a_k$
|
|||||||
Of course, all $a_i$ should be greater than $1$. \
|
Of course, all $a_i$ should be greater than $1$. \
|
||||||
Also, all $a_i$ should be smaller than four, since $x <= x(x-2)$ if $x >= 4$. \
|
Also, all $a_i$ should be smaller than four, since $x <= x(x-2)$ if $x >= 4$. \
|
||||||
Thus, we're left with sequences that only contain 2 and 3. \
|
Thus, we're left with sequences that only contain 2 and 3. \
|
||||||
#note([Note that two twos are the same as one four, but we exclude fours for simplicity.])
|
#note(
|
||||||
|
[Note that two twos are the same as one four, but we exclude fours for simplicity.],
|
||||||
|
)
|
||||||
|
|
||||||
#v(2mm)
|
#v(2mm)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user