From 5f13a8e82e0af8872e51997b1fbd70b763b97992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20Bystr=C3=B6m=20Ericsson?= Date: Thu, 24 Oct 2024 07:30:17 +0200 Subject: [PATCH] Reinstate binary integer quadrants (#114). --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 9d0a81a0..1354eb96 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,23 @@ The above setup enables optimizations and disables instrumentation that may limi ๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ› ๏ธ๐Ÿšง๐Ÿงฑ๐Ÿงฑ๐Ÿ—๏ธ๐Ÿงฑ๐Ÿงฑ๐Ÿšงโณ +``` + โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” + โ”‚ Systems โ”‚ Arbitrary โ”‚ +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”คโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค +โ”‚ Signed โ”‚ B,E,F,S,X โ”‚ A,B,F,X โ”‚ +โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”คโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค +โ”‚ Unsigned โ”‚ B,E,F,S,Y โ”‚ A,B,E,Y โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ + A) ArbitraryInteger: B + B) BinaryInteger: - + E) EdgyInteger: B + F) FiniteInteger: B + S) SystemsInteger: E, F + X) SignedInteger: F + Y) UnsignedInteger: E +``` + #### The lossy invariant Lossy operations are remarkably well-behaved. In the case of binary integers, we use this term specifically to denote truncation. In other words, a lossy binary integer result omits bits beyond its in-memory representation, which means all existing bits are still valid. In practice, types of different sizes agree on the bits that fit in the smaller type. The following example demonstrates this invariant.