bit.inc¶
x[:n]++
x is a bit[:n]
Signature¶
def inc n, x @ carry, end { ... }
Defined in bit/math.fj — lines 34–41 (view on GitHub).
Complexity¶
Time:
5@+12 in averageSpace:
n(2@+6)
See the complexity glossary for what @, w, dw, dbit, n mean.
Source¶
Click to view the macro body
def inc n, x @ carry, end {
.one carry
rep(n, i) .inc.inc1_with_carry0_jump x+i*dw, carry, end
;end
carry:
.bit
end:
}
Depends on¶
Used by¶
Example uses¶
bit.decinbit/math.fjbit.neginbit/math.fjbit.ascii2hexinbit/casting.fj
← Previous: bit.inc.inc1_with_carry0_jump
Next: bit.dec →