From 65454d77eba95d7f814336377f78d9f42c7455f9 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Wed, 27 Nov 2024 11:29:33 -0800 Subject: More lattice docs reworks --- chapter14/README.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'chapter14/README.md') 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 TypeInteger type 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 TypeFloat class is also reworked to support 32-bit and 64-bit sizes. + +![Graph1](./docs/lattice.svg) + + ## Nodes -- cgit v1.2.3