[v3,4/4] manual: significand() uses FLT_RADIX, not 2

Message ID 20240331203829.23591-5-alx@kernel.org
State Committed
Commit 95c70fd0d467450e75354316453824693f07c3cc
Delegated to: DJ Delorie
Headers
Series manual: arith.texi and math.texi fixes |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
redhat-pt-bot/TryBot-32bit success Build for i686
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-arm success Testing passed

Commit Message

Alejandro Colomar March 31, 2024, 8:38 p.m. UTC
  It's implemented using scalb(), which uses FLT_RADIX, AFAIK.

Link: <https://lore.kernel.org/linux-man/ZeYKUOKYS7G90SaV@debian/T/#mf21ab57e16b92eb6be6c7df79dc0eb43d4454056>
Reported-by: Morten Welinder <mwelinder@gmail.com>
Cc: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Cc: Vincent Lefevre <vincent@vinc17.net>
Cc: DJ Delorie <dj@redhat.com>
Cc: Paul Zimmermann <Paul.Zimmermann@inria.fr>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
---
 manual/arith.texi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

DJ Delorie April 1, 2024, 7:09 p.m. UTC | #1
Alejandro Colomar <alx@kernel.org> writes:
> -@math{[1, 2               )}.
> +@math{[1, @code{FLT_RADIX})}.

LGTM
Reviewed-by: DJ Delorie <dj@redhat.com>
  

Patch

diff --git a/manual/arith.texi b/manual/arith.texi
index 0742c08ac4..034d9d2ba5 100644
--- a/manual/arith.texi
+++ b/manual/arith.texi
@@ -1395,7 +1395,7 @@  The @code{scalb} function is the BSD name for @code{ldexp}.
 @standards{BSD, math.h}
 @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
 @code{significand} returns the mantissa of @var{x} scaled to the range
-@math{[1, 2)}.
+@math{[1, @code{FLT_RADIX})}.
 It is equivalent to @w{@code{scalb (@var{x}, (double) -ilogb (@var{x}))}}.
 
 This function exists mainly for use in certain standardized tests