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

DJ Delorie dj@redhat.com
Fri Mar 29 22:08:19 GMT 2024


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>



More information about the Libc-alpha mailing list