You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since #9631 was accepted, we are expecting a @mulCarryless builtin to be added to the language to support carryless multiplication. However, after further consideration and thought, I think this is something that can be well-expressed with a new operator instead. I think *^ is a good candidate, because another name for carryless multiplication is XOR multiplication. So this proposal is to add an operator instead.
By introducing a specific operator for carryless multiplication, Zig can provide a clear and concise syntax for expressing this operation. I think this operation deserves a seat at the table with the other arithmetic and bitwise operators, and I would like to see more people come up with new use-cases for it (recently I wrote an article on how you can use the prefixXOR operation to isolate every other bit in a bitmask). I am excited to hear the verdict on this proposal.
The text was updated successfully, but these errors were encountered:
andrewrk
added
the
proposal
This issue suggests modifications. If it also has the "accepted" label then it is planned.
label
Jul 22, 2023
Uh oh!
There was an error while loading. Please reload this page.
Since #9631 was accepted, we are expecting a
@mulCarryless
builtin to be added to the language to support carryless multiplication. However, after further consideration and thought, I think this is something that can be well-expressed with a new operator instead. I think*^
is a good candidate, because another name for carryless multiplication is XOR multiplication. So this proposal is to add an operator instead.By introducing a specific operator for carryless multiplication, Zig can provide a clear and concise syntax for expressing this operation. I think this operation deserves a seat at the table with the other arithmetic and bitwise operators, and I would like to see more people come up with new use-cases for it (recently I wrote an article on how you can use the
prefixXOR
operation to isolate every other bit in a bitmask). I am excited to hear the verdict on this proposal.The text was updated successfully, but these errors were encountered: