[PATCH v2 1/3] manual: logb(x) is floor(log2(fabs(x)))

Alejandro Colomar alx@kernel.org
Fri Mar 29 23:00:04 GMT 2024


Hi DJ,

On Fri, Mar 29, 2024 at 06:08:19PM -0400, DJ Delorie wrote:
> Alejandro Colomar <alx@kernel.org> writes:
> > -to @code{floor (log2 (      x ))}, except it's probably faster.
> > +to @code{floor (log2 (fabs (x)))}, except it's probably faster.
> 
> Confirmed that the only change here is the addition of fabs()
> 
> Confirmed that logb() accepts negative numbers
> 
> LGTM
> Reviewed-by: DJ Delorie <dj@redhat.com>

Thanks!

Have a lovely night!
Alex

-- 
<https://www.alejandro-colomar.es/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20240330/13be1e93/attachment.sig>


More information about the Libc-alpha mailing list