znot.3 - libzahl - big integer library
(HTM) git clone git://git.suckless.org/libzahl
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
znot.3 (714B)
---
1 .TH ZNOT 3 libzahl
2 .SH NAME
3 znot - Calculate the bitwise complement of a big integer
4 .SH SYNOPSIS
5 .nf
6 #include <zahl.h>
7
8 void znot(z_t \fIa\fP, z_t \fIb\fP);
9 .fi
10 .SH DESCRIPTION
11 .B znot
12 calculates the bitwise complement of
13 .I b
14 and stores the result in
15 .IR a .
16 .P
17 It is safe to call
18 .B znot
19 with
20 .IR "(a==b)" .
21 .SH NOTES
22 Be aware, the following code will halt for any input
23 .P
24 .nf
25 #include <zahl.h>
26
27 void
28 silly(z_t a)
29 {
30 while (!zzero(a))
31 znot(a, a);
32 }
33 .fi
34 .P
35 Also note that
36 .B z_t
37 uses neither two's complement, ones' complement, nor
38 sign-and-magnitude.
39 .SH SEE ALSO
40 .BR zand (3),
41 .BR zor (3),
42 .BR zxor (3),
43 .BR zlsh (3),
44 .BR zrsh (3),
45 .BR zsplit (3),
46 .BR zbtest (3),
47 .BR zbset (3),
48 .BR zlsb (3),
49 .BR zbits (3)