Re: [PATCH v2 1/6] math.h: Add macros for rounding to the closest value
From: Devarsh Thakkar
Date: Fri Aug 30 2024 - 12:10:15 EST
Hi Andy, Randy, Sebastian,
On 29/08/24 15:24, Jiri Slaby wrote:
> On 29. 08. 24, 11:19, Jani Nikula wrote:
>> The stupid thing here is, I still don't remember which one is the
>> generic thing, rounddown() or round_down(). I have to look it up every
>> single time to be sure. I refuse to believe I'd be the only one.
>>
>> It's okay to accidentally use the generic version, no harm done. It's
>> definitely not okay to accidentally use the special pow-2 version, so it
>> should have a special name. I think _pow2() or _pow_2() is a fine
>> suffix.
>
> Concur.
>
We have got 2 votes to change round_closest_up to round_closest_up_pow_2 and
likewise for round_closest_down to round_closest_up_pow_2.
Kindly let us know if you have any concerns w.r.t above name change. Else, I
was thinking to proceed with the suggestion.
Regards
Devarsh