]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
logb.3: logb(x) is floor(log2(fabs(x)))
authorAlejandro Colomar <alx@kernel.org>
Mon, 4 Mar 2024 23:20:09 +0000 (00:20 +0100)
committerAlejandro Colomar <alx@kernel.org>
Tue, 12 Mar 2024 17:13:43 +0000 (18:13 +0100)
log2(3) doesn't accept negative input, but it seems logb(3) does accept
it.

Link: <https://lore.kernel.org/linux-man/ZeYKUOKYS7G90SaV@debian/T/#u>
Reported-by: Morten Welinder <mwelinder@gmail.com>
Cc: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Cc: Vincent Lefevre <vincent@vinc17.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man3/logb.3

index 7cbb2470abc301690093e0dc67879bf1305a0faa..7a1ad2f4a7eeb66229a9a380bbce6d24eabe3146 100644 (file)
@@ -58,7 +58,7 @@ If
 is 2,
 .BI logb( x )
 is equal to
-.BI floor(log2( x ))\fR,
+.BI floor(log2(fabs( x )))\f[R],\f[]
 except that it is probably faster.
 .P
 If