bit/math.fjΒΆ

β€”β€”β€”- Arithmetical Macros carry is both input and output

View source on GitHub

MacrosΒΆ

bitΒΆ

  • bit.inc1 β€” Unsafe for dst==carry (but there is no reason in calling it that way)

  • bit.inc β€” x[:n]++

  • bit.dec β€” x[:n]–

  • bit.neg β€” x[:n]–

  • bit.add1 β€” Unsafe for dst==carry (but there is no reason in calling it that way)

  • bit.add β€” dst[:n] += src[:n]

  • bit.sub β€” dst[:n] -= src[:n]

bit.incΒΆ