64bit arithmetic op codes
This BIP describes a soft fork to add 64-bit arithmetic op codes to bitcoin
Implementation: https://github.com/bitcoin/bitcoin/pull/29221
Why not push the overflow amount and the result back on the stack?
Rather than $2^{64}-1 + 3 = \mbox{FALSE}$, do $2^{64}-1 + 3 = 2, 1$. Where $2 = 2^{64}-1 + 3 \mod 2^{64}$ is the result and 1 is the overflow.
This would simply doing 256-bit math from 64-bit stack elements and I don't see any downsides for 64-bit operations.
Why not push the overflow amount and the result back on the stack?
Rather than 264−1+3=FALSE, do 264−1+3=2,1. Where 2=264−1+3mod264 is the result and 1 is the overflow.
This would simply doing 256-bit math from 64-bit stack elements and I don't see any downsides for 64-bit operations.
Sorry I don't understand this. Could you maybe give a more concrete example, perhaps on delvingbitcoin? We have a thread going here: https://delvingbitcoin.org/t/64-bit-arithmetic-soft-fork/397/25