From 1450dfe0283e4c5ed0ea28e8e813ea97457f1851 Mon Sep 17 00:00:00 2001 From: Ethan Kiang Date: Thu, 18 May 2023 12:56:01 -0500 Subject: [PATCH] Mention zero is neither postive nor negative in spec documentation --- spec/v0-1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/v0-1.md b/spec/v0-1.md index 22e679e..26438f8 100644 --- a/spec/v0-1.md +++ b/spec/v0-1.md @@ -30,7 +30,7 @@ The mod operator `%` is a special case: `` and `` must evaluate to U64s. Arithmetic operations on two Nums yield Nums and are treated as field operations done modulo `p`; division is field division. -Comparisons interpret Nums as signed. The first half ranging from `0` to `(p - 1)/2` is considered positive. The second half ranging from `(p - 1)/2 + 1` to `p - 1` is considered negative. For every positive `n`, there is a corresponding negative `m`, such that `n + m = 0`. The result is that the interpretation of signed Nums implied by the definition of < (etc.) is arithmetically consistent. +Comparisons interpret Nums as signed. The first half ranging from `0` exclusive to `(p - 1)/2` is considered positive. The second half ranging from `(p - 1)/2 + 1` to `p - 1` is considered negative. For every positive `n`, there is a corresponding negative `m`, such that `n + m = 0`. Furthermore, `0` is considered neither positive nor negative, and we have that `0 + 0 = 0`. The result is that the interpretation of signed Nums implied by the definition of < (etc.) is arithmetically consistent. Arithmetic operations on two U64s yield U64s and are done modulo `2^64`; divison is integer division.