[Feature Request] Rename bit_ceil
and bit_floor
to closest_pow_2_ge
and closest_pow_2_le
#3271
Open
1 task done
Labels
Review Mojo's priorities
What is your request?
Rename
bit_ceil
andbit_floor
toclosest_pow_2_ge
andclosest_pow_2_le
.Similarly as issue #3158, I think some renaming would be fitting here. I know these names come from C++, but some verbosity and clearer use case is better when looking for something and not intuitively understanding what the function name means.
In my particular case, I literally reimplemented
bit_ceil
with bitshifting (100% copied from stack overflow) because I was looking for the closest power of two greater than or equal to a dynamic value. And I was literally writing the code to include in a PR when I read the code forbit_ceil
What is your motivation for this change?
Verbose names in exchange for clarity. Also, extending the naming to include
closest_pow_2_gt
andclosest_pow_2_lt
becomes clear and simple.Any other details?
No response
The text was updated successfully, but these errors were encountered: