summaryrefslogtreecommitdiff
path: root/chapter13/README.md
diff options
context:
space:
mode:
authordibyendumajumdar <mobile@majumdar.org.uk>2024-08-06 00:38:18 +0100
committerDibyendu Majumdar <dibyendumajumdar@users.noreply.github.com>2024-08-06 00:50:58 +0100
commita35078a6d30c1eb5dabcf6d9c001cdd41e2b7c89 (patch)
tree2a5c2c45ab857ab8a715ea212466841461ea7eef /chapter13/README.md
parent49af186140611daa9c840189139b59c854f1889c (diff)
downloadSimple-a35078a6d30c1eb5dabcf6d9c001cdd41e2b7c89.tar.gz
Simple-a35078a6d30c1eb5dabcf6d9c001cdd41e2b7c89.zip
#92 Update readmes
Diffstat (limited to 'chapter13/README.md')
-rw-r--r--chapter13/README.md47
1 files changed, 1 insertions, 46 deletions
diff --git a/chapter13/README.md b/chapter13/README.md
index 892f7170..1fe2097a 100644
--- a/chapter13/README.md
+++ b/chapter13/README.md
@@ -1,49 +1,4 @@
-# Chapter 12: Floats, References and Arrays
-
-In this chapter we add a series of new types and some modest syntax.
-
-## Floats
-
-Floating point values start with the `flt` type and compute IEEE754 64-bit arithmetic.
-Integer expressions auto-widen to floats when involved in a float expression.
-
-```java
-flt f = 0.5;
-int x = 2;
-f = f+x; // Auto-widen x to 2.0, result is 2.5
-f = f+true; // Since bools are just synonyms for integers 0,1 they auto-widen also
-```
-
-
-Here is Newton's method to a square root:
-```java
-flt guess = arg; // Initial guess is just argument
-while( true ) {
- // Next guess from Newton's method
- flt next = (arg/guess + guess)/2;
- // Break if hit fixed point
- if( next == guess ) break;
- guess = next;
-}
-return guess;
-```
-When run with argument 2.0, produces 1.414213562373095.
-
-Floating point operations have their own Nodes:
-
-| Node | Op |
-|------------------------|----------------------|
-| AddF, SubF, MulF, DivF | Basic binary FP ops |
-| MinusF | Unary negate |
-| EQF, LTF, LEF | FP compare operators |
-
-And their own section in the Type lattice:
-
-Within the Type Lattice, we now add the following domain:
-
-* Float type - Float values. The same shape as the Integer values, but floats
- with a TOP, BOT and constants
-
+# Chapter 13: References
## References