summaryrefslogtreecommitdiff
path: root/chapter14/README.md
diff options
context:
space:
mode:
authorCliff Click <cliffc@acm.org>2024-11-27 11:29:33 -0800
committerCliff Click <cliffc@acm.org>2025-01-15 15:07:30 -0800
commit65454d77eba95d7f814336377f78d9f42c7455f9 (patch)
tree976efed369498c7e976fe5098f6a406fed81cb53 /chapter14/README.md
parent34766f1a2e9e60626eb1bd5a08140fc41a3770c8 (diff)
downloadSimple-65454d77eba95d7f814336377f78d9f42c7455f9.tar.gz
Simple-65454d77eba95d7f814336377f78d9f42c7455f9.zip
More lattice docs reworks
Diffstat (limited to 'chapter14/README.md')
-rw-r--r--chapter14/README.md21
1 files changed, 18 insertions, 3 deletions
diff --git a/chapter14/README.md b/chapter14/README.md
index 8451c4f5..fccb2aa5 100644
--- a/chapter14/README.md
+++ b/chapter14/README.md
@@ -65,12 +65,27 @@ f32 // IEEE 754 32-bit float
## Type Implementation
-The TypeInteger class is reworked to support a full range of min/max values.
-At this time, only some power-of-2 sized ranges are exposed but the optimizer
+The <font style="background-color:lightblue">TypeInteger type</font> class is
+reworked to support a full range of min/max values. At this time, only some
+power-of-2 sized ranges are exposed to the programmer but the optimizer
internally supports all ranges. The MEET operation takes the min-of-mins and
max-of-maxes. The DUAL operation inverts the min and max.
-The TypeFloat class is also reworked to support 32-bit and 64-bit sizes.
+Example: the constant `0` has `[0...0]`.
+
+Example: the `bool` the range `[0...1]`.
+
+Example: the `u8` the range `[0...255]`.
+
+Example: the `i8` the range `[-128...127]`.
+
+Example: the `dual` of `bool` is `[1...0]` (just swap min and max).
+
+The <font style="background-color:aqua">TypeFloat</font> class is also reworked to support 32-bit and 64-bit sizes.
+
+![Graph1](./docs/lattice.svg)
+
+
## Nodes