Skip to content

Commit

Permalink
Ensure that "true" and "false" won't go in same bucket in hash table
Browse files Browse the repository at this point in the history
Previously, "hash true" and "hash false" were both congruent to 1 (mod 4).
  • Loading branch information
d-torrance committed Sep 11, 2024
1 parent 954e44c commit a061261
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion M2/Macaulay2/d/basic.d
Original file line number Diff line number Diff line change
Expand Up @@ -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(777332)
is Nothing do hash_t(333889)
is x:List do x.hash
is f:functionCode do f.hash
Expand Down

0 comments on commit a061261

Please sign in to comment.