diff options
| author | Mattias Andrée <maandree@kth.se> | 2016-03-02 08:57:46 +0100 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2016-03-02 08:57:50 +0100 |
| commit | fe15c7e5b115cae4717f5481e7962cf376066387 (patch) | |
| tree | 31e2a0c18ceabd2deb6be9d78fdf03cb8072cd92 /man/zbits.3 | |
| parent | Add typedef zahl_char_t for internal use (diff) | |
| download | libzahl-fe15c7e5b115cae4717f5481e7962cf376066387.tar.gz libzahl-fe15c7e5b115cae4717f5481e7962cf376066387.tar.bz2 libzahl-fe15c7e5b115cae4717f5481e7962cf376066387.tar.xz | |
Why zbits returns 1 for 0
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'man/zbits.3')
| -rw-r--r-- | man/zbits.3 | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/man/zbits.3 b/man/zbits.3 index 3dea6d9..191a87c 100644 --- a/man/zbits.3 +++ b/man/zbits.3 @@ -25,6 +25,14 @@ absolute value of \(em or 1 if .I a is zero. +.SH RATIONALE +.B zbits +returns 1 rather than 0 if +.B a +is zero, this is to avoid off-by-one errors +and it is the number of digits requires to +write the number in binary. You will see this +in corresponding functions in other libraries. .SH SEE ALSO .BR zlsb (3), .BR zzero (3) |
