Skip to content

Commit 07e1de8

Browse files
committed
[libc] add doc, fix func name case
Signed-off-by: Shreeyash Pandey <[email protected]>
1 parent 303dc94 commit 07e1de8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

libc/docs/headers/stdfix.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ The following functions are included in the ISO/IEC TR 18037:2008 standard.
8181
+---------------+----------------+-------------+---------------+------------+----------------+-------------+----------------+-------------+---------------+------------+----------------+-------------+
8282
| muli | | | | | | | | | | | | |
8383
+---------------+----------------+-------------+---------------+------------+----------------+-------------+----------------+-------------+---------------+------------+----------------+-------------+
84-
| \*divi | | | | | | | | | | | | |
84+
| \*divi | | | | |check| | | | | | | | | |
8585
+---------------+----------------+-------------+---------------+------------+----------------+-------------+----------------+-------------+---------------+------------+----------------+-------------+
8686
| round | |check| | |check| | |check| | |check| | |check| | |check| | |check| | |check| | |check| | |check| | |check| | |check| |
8787
+---------------+----------------+-------------+---------------+------------+----------------+-------------+----------------+-------------+---------------+------------+----------------+-------------+

libc/src/__support/fixed_point/fx_bits.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,11 @@ template <typename XType> LIBC_INLINE constexpr XType divi(int n, int d) {
247247
if (LIBC_UNLIKELY(n == 0)) {
248248
return FXRep<XType>::ZERO();
249249
}
250-
auto isPowerOfTwo = [](int n) { return (n > 0) && ((n & (n - 1)) == 0); };
250+
auto is_power_of_two = [](int n) { return (n > 0) && ((n & (n - 1)) == 0); };
251251
long accum max_val = static_cast<long accum>(FXRep<XType>::MAX());
252252
long accum min_val = static_cast<long accum>(FXRep<XType>::MIN());
253253

254-
if (isPowerOfTwo(cpp::abs(d))) {
254+
if (is_power_of_two(cpp::abs(d))) {
255255
int k = cpp::countr_zero<uint32_t>(static_cast<uint32_t>(cpp::abs(d)));
256256
constexpr int F = FXRep<XType>::FRACTION_LEN;
257257
int64_t scaled_n = static_cast<int64_t>(n) << F;

0 commit comments

Comments
 (0)