hex.add_mul (arity 4)¶
res[n] += a[n] * b[1]
Signature¶
def add_mul n, res, a, b < .mul.dst { ... }
Defined in hex/mul.fj — lines 23–29 (view on GitHub).
Complexity¶
Time:
n(5@+26)Space:
n(4@+52)
See the complexity glossary for what @, w, dw, dbit, n mean.
Requires init¶
The following must be initialised before this macro is invoked:
hex.add.init (or hex.init)
Source¶
Click to view the macro body
def add_mul n, res, a, b < .mul.dst {
.mul.clear_carry
.xor .mul.dst, b
rep(n, i) .add_mul res+i*dw, a+i*dw
.xor .mul.dst, b
.mul.clear_carry
}
Depends on¶
Used by¶
Example uses¶
← Previous: hex.add_mul/2
Next: hex.mul10 →