diff options
| author | Mattias Andrée <maandree@kth.se> | 2016-03-01 10:55:20 +0100 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2016-03-01 10:55:20 +0100 |
| commit | 32b87c5979a0e70994e4db65415ec0a2349c5618 (patch) | |
| tree | a366f6c46762f349ce8b96439a35ac944021055b /man/zbits.3 | |
| parent | Add a number of man pages (diff) | |
| download | libzahl-32b87c5979a0e70994e4db65415ec0a2349c5618.tar.gz libzahl-32b87c5979a0e70994e4db65415ec0a2349c5618.tar.bz2 libzahl-32b87c5979a0e70994e4db65415ec0a2349c5618.tar.xz | |
Add more man pages
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'man/zbits.3')
| -rw-r--r-- | man/zbits.3 | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/man/zbits.3 b/man/zbits.3 new file mode 100644 index 0000000..3dea6d9 --- /dev/null +++ b/man/zbits.3 @@ -0,0 +1,30 @@ +.TH ZBITS 3 libzahl +.SH NAME +zbits - Count used bits in a big integer +.SH SYNOPSIS +.nf +#include <zahl.h> + +size_t zbits(z_t \fIa\fP); +.fi +.SH DESCRIPTION +.B zbits +calculates the bit-size of +.IR a . +If +.I a +is zero the bit-size is 1. +.SH RETURN VALUE +.B zbits +returns the number of bits requires +to represent +.I a +\(em 1 plus the floored binary logarithm of the +absolute value of +.I a +\(em or 1 if +.I a +is zero. +.SH SEE ALSO +.BR zlsb (3), +.BR zzero (3) |
