diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-24 04:52:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-24 04:52:22 +0000 |
commit | 3d08cd331c1adcf0d917392f7e527b3f00511748 (patch) | |
tree | 312f0d1e1632f48862f044b8bb87e602dcffb5f9 /man3/powerof2.3 | |
parent | Adding debian version 6.7-2. (diff) | |
download | manpages-3d08cd331c1adcf0d917392f7e527b3f00511748.tar.xz manpages-3d08cd331c1adcf0d917392f7e527b3f00511748.zip |
Merging upstream version 6.8.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man3/powerof2.3')
-rw-r--r-- | man3/powerof2.3 | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/man3/powerof2.3 b/man3/powerof2.3 deleted file mode 100644 index cc21e4d..0000000 --- a/man3/powerof2.3 +++ /dev/null @@ -1,46 +0,0 @@ -.\" Copyright (C) 2022 Alejandro Colomar <alx@kernel.org> -.\" -.\" SPDX-License-Identifier: Linux-man-pages-copyleft -.\" -.TH powerof2 3 2023-10-31 "Linux man-pages 6.7" -.SH NAME -powerof2 \- test if a value is a power of 2 -.SH LIBRARY -Standard C library -.RI ( libc ) -.SH SYNOPSIS -.nf -.B #include <sys/param.h> -.P -.BI "int powerof2(" x ); -.fi -.SH DESCRIPTION -This macro returns true if -.I x -is a power of 2, -and false otherwise. -.P -.B 0 -is considered a power of 2. -This can make sense considering wrapping of unsigned integers, -and has interesting properties. -.SH RETURN VALUE -True or false, -if -.I x -is a power of 2 or not, -respectively. -.SH STANDARDS -BSD. -.SH CAVEATS -The arguments may be evaluated more than once. -.P -Because this macro is implemented using bitwise operations, -some negative values can invoke undefined behavior. -For example, -the following invokes undefined behavior: -.IR "powerof2(INT_MIN);". -Call it only with unsigned types to be safe. -.SH SEE ALSO -.BR stdc_bit_ceil (3), -.BR stdc_bit_floor (3) |