Commit c840bcd6 by Zachary Snow

prefer larger base when concatenating numbers

parent 96a108de
...@@ -454,7 +454,7 @@ instance Semigroup Number where ...@@ -454,7 +454,7 @@ instance Semigroup Number where
where where
size = size1 + size2 size = size1 + size2
signed = False signed = False
base = selectBase (min base1 base2) values kinds base = selectBase (max base1 base2) values kinds
trim = flip mod . (2 ^) trim = flip mod . (2 ^)
values = trim size2 values2 + shiftL (trim size1 values1) size2 values = trim size2 values2 + shiftL (trim size1 values1) size2
kinds = trim size2 kinds2 + shiftL (trim size1 kinds1) size2 kinds = trim size2 kinds2 + shiftL (trim size1 kinds1) size2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment