From ce43eadabde9570afb7da2f6ffb18279b8e6d6b8 Mon Sep 17 00:00:00 2001 From: d6 Date: Fri, 4 Feb 2022 00:43:32 -0500 Subject: [PATCH] more comments on fixed point --- fixed.tal | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fixed.tal b/fixed.tal index 136e677..21eb1ec 100644 --- a/fixed.tal +++ b/fixed.tal @@ -5,6 +5,13 @@ ( ) ( x = x0 + x1/256 ) ( y = y0 + y1/256 ) +( ) +( many 8.8 operations are equivalent to u16: ) +( * comparisons/equality ) +( * addition/subtraction ) +( ) +( but due to 16-bit truncation multiplication is different. ) +( ) ( x*y = x0*y0 + x0*y1/256 + x1*y0/256 + x1*y1/65536 ) ( ) ( since we only have 16-bits: )