From 9665b86f9da95ae56f399f8c18496c76ed329640 Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Wed, 11 Sep 2024 05:55:24 -0400 Subject: [PATCH] Ensure that "true" and "false" won't go in same bucket in hash table Previously, "hash true" and "hash false" were both congruent to 1 (mod 4). --- M2/Macaulay2/d/basic.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/M2/Macaulay2/d/basic.d b/M2/Macaulay2/d/basic.d index 21b6ad1ca2..292a0e30af 100644 --- a/M2/Macaulay2/d/basic.d +++ b/M2/Macaulay2/d/basic.d @@ -11,7 +11,7 @@ export hash(e:Expr):hash_t := ( is s:SymbolBody do s.symbol.hash is x:Database do x.hash is x:ZZcell do hash(x.v) - is b:Boolean do if b.v then hash_t(444777) else hash_t(777333) + is b:Boolean do if b.v then hash_t(444777) else hash_t(777334) is Nothing do hash_t(333889) is x:List do x.hash is f:functionCode do f.hash