diff options
| author | Mattias Andrée <maandree@kth.se> | 2016-03-03 12:47:39 +0100 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2016-03-03 12:47:39 +0100 |
| commit | 3728c12ecbe308092b213f1b664303a48858a2b8 (patch) | |
| tree | b4a42c978eb513605ef58092c84ecbecbff795dd /zahl.h | |
| parent | Add zdivmod (diff) | |
| download | libzahl-3728c12ecbe308092b213f1b664303a48858a2b8.tar.gz libzahl-3728c12ecbe308092b213f1b664303a48858a2b8.tar.bz2 libzahl-3728c12ecbe308092b213f1b664303a48858a2b8.tar.xz | |
Add zbset
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
| -rw-r--r-- | zahl.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -100,6 +100,9 @@ void zsplit(z_t, z_t, z_t, size_t); /* a := c >> d, b := c - (a << d) */ size_t zbits(z_t); /* ⌊log₂ |a|⌋ + 1, 1 if a = 0 */ size_t zlsb(z_t); /* Index of first set bit, SIZE_MAX if none are set. */ +/* If d > 0: a := b | (1 << c), f d = 0: a := b & ~(1 << c), if d < 0: a := b ^ (1 << c) */ +void zbset(z_t, z_t, size_t, int); + /* Number theory. */ |
