summaryrefslogtreecommitdiff
path: root/notes/numbers.md
diff options
context:
space:
mode:
authorTaylan Kammer <taylan.kammer@gmail.com>2025-03-29 23:56:22 +0100
committerTaylan Kammer <taylan.kammer@gmail.com>2025-03-29 23:56:22 +0100
commitd6e50e7a631d0dfe8d41438be89f8b00dfc9a4df (patch)
tree741717b08aafac370ce416f901c4698c62b39bfa /notes/numbers.md
parentfc23b42c6e2183c8ca8b6c42dc4e90d8061f835d (diff)
add some unfinished notes and docs
Diffstat (limited to 'notes/numbers.md')
-rw-r--r--notes/numbers.md45
1 files changed, 45 insertions, 0 deletions
diff --git a/notes/numbers.md b/notes/numbers.md
new file mode 100644
index 0000000..6507a67
--- /dev/null
+++ b/notes/numbers.md
@@ -0,0 +1,45 @@
+
+exacts:
+
+ uint : 0...n
+
+ sint : -n...-1 | uint
+
+ ratn : ( p: sint, q: sint )
+
+ comp : ( r: ratn, i: ratn )
+
+
+inexacts:
+
+ double : ieee754 double with +inf, -inf, +nan, -nan
+
+ cmp128 : ( r: double , i: double )
+
+
+exact operations:
+
+ uint + uint = uint
+
+ sint + uint = sint
+
+ ratn + uint = ratn [ ratn + ( p = uint , q = 0 ) ]
+
+ ratn + sint = ratn [ ratn + ( p = sint , q = 0 ) ]
+
+ ratn + ratn = ratn
+
+ comp + uint = comp [ comp + ( r = ( p = uint , q = 0 ) , i = 0 ) ]
+
+ comp + sint = comp [ comp + ( r = ( p = sint , q = 0 ) , i = 0 ) ]
+
+ comp + ratn = comp [ comp + ( r = ratn , i = 0 ) ]
+
+ comp + comp = comp
+
+
+inexact operations:
+
+ double + double = double
+
+ cmp128 + double = cmp128 [ cmp128 + ( r = double , i = 0 ) ]