GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
* Sign Up! *

Support
Customer Portal
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
STDC_BIT_FLOOR(3) FreeBSD Library Functions Manual STDC_BIT_FLOOR(3)

stdc_bit_floorround down to the previous power of 2

/* -lc */
#include <stdbit.h>

unsigned char
stdc_bit_floor_uc(unsigned char value);

unsigned short
stdc_bit_floor_us(unsigned short value);

unsigned int
stdc_bit_floor_ui(unsigned int value);

unsigned long
stdc_bit_floor_ul(unsigned long value);

unsigned long long
stdc_bit_floor_ull(unsigned long long value);

typeof()
stdc_bit_floor(value);

The stdc_bit_floor_type() family of functions rounds value down to the previous power of 2, where value is of type unsigned char, unsigned short, unsigned int, unsigned long, or unsigned long long for type being , , , , or respectively. The (value) type-generic macro picks the appropriate stdc_bit_floor_type() function based on the type of value.

Returns value round down to the previous power of 2. If value is equal to zero, zero is returned.

The stdc_bit_floor_type() family of functions and the stdc_bit_floor() type-generic macro conform to ISO/IEC 9899:2024 (“ISO C23”).

The stdc_bit_floor_type() family of functions and the stdc_bit_floor() type-generic macro were added in FreeBSD 15.1.

Robert Clausecker <fuz@FreeBSD.org>

November 9, 2025 FreeBSD 15.1-RELEASE-p1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.