diff options
| author | Cliff Click <cliffc@acm.org> | 2026-10-02 13:04:34 -0700 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2026-10-02 13:04:34 -0700 |
| commit | e4dc3273f201ae741637b626998637cce973546b (patch) | |
| tree | 7607c1da4378da42549e8142371d95bdca4e06e0 /chapter12/README.md | |
| parent | 6cd01a8d646750748a0af221073de8a7787472ad (diff) | |
| download | Simple-e4dc3273f201ae741637b626998637cce973546b.tar.gz Simple-e4dc3273f201ae741637b626998637cce973546b.zip | |
First pass README updates
Diffstat (limited to 'chapter12/README.md')
| -rw-r--r-- | chapter12/README.md | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/chapter12/README.md b/chapter12/README.md index 28fbb6dc..49cc5e02 100644 --- a/chapter12/README.md +++ b/chapter12/README.md @@ -1,5 +1,8 @@ # Chapter 12: Floats +[Previous: Chapter 11](../chapter11/README.md) | +[Next: Chapter 13](../chapter13/README.md) + Memory keeps Chapter 11's single `$mem` binding and lazy `MemMerge`, `MemPhi`, and `BulkMemPhi` partitions. Start produces `{ctrl, $mem, arg}` and Return consumes `{ctrl, $mem, result}`; floating-point arithmetic needs no new memory @@ -30,7 +33,7 @@ There is no corresponding way right now to round a `flt` back to an `int`: int x = 3.14; // error ``` -Here is Newton's method to a square root: +Here is Newton's method for computing a square root: ```java flt guess = arg; // Initial guess is just argument while( true ) { @@ -52,11 +55,12 @@ Floating point operations have their own Nodes: | MinusF | Unary negate | | EQF, LTF, LEF | FP compare operators | -And their own section in the Type lattice: +Within the Type lattice, we add the following domain: -Within the Type Lattice, we now add the following domain: +*  - Float values. The same shape as the Integer values, but floats + with a top (`TOP`, ⊤), bottom (`BOT`, ⊥), and constants. -* <font style="background-color:aqua">Float type</font> - Float values. The same shape as the Integer values, but floats - with a TOP, BOT and constants +The other domains retain Chapter 10b's named structs, nullable pointers, and +precise memory aliases.  |
