bit.subΒΆ
dst[:n] -= src[:n]
dst,src are bit[:n]
SignatureΒΆ
def sub n, dst, src @ carry { ... }
Defined in bit/math.fj β lines 91β99 (view on GitHub).
ComplexityΒΆ
Time:
n(8@+16)Space:
n(8@+16)
See the complexity glossary for what @, w, dw, dbit, n mean.
SourceΒΆ
Click to view the macro body
def sub n, dst, src @ carry {
.not n, src
.one carry
rep(n, i) .add1 dst+i*dw, src+i*dw, carry
.not n, src
stl.skip
carry:
.bit
}
Depends onΒΆ
Used byΒΆ
Example usesΒΆ
bit.div.div_stepinbit/div.fjbit.div_loopinbit/div.fj
β Previous: bit.add