summaryrefslogtreecommitdiffstats
path: root/man3
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2024-01-29 13:23:19 +0100
committerAlejandro Colomar <alx@kernel.org>2024-01-29 13:25:33 +0100
commit2b0b48b0acb2a18a640123117f330f5cae8ccba0 (patch)
treefabf014c7e19c099901c2a5d35e9452fde32653b /man3
parent5f971ca8d6d9974d5c5e4c369841027f7edd47ca (diff)
frexp.3: ISO C defines frexp(3) in terms of 2, not FLT_RADIX
Even in systems where FLT_RADIX != 2, frexp(3) would be 2-based. This was correctly worded in the DESCRIPTION, but the example program was incorrect. Link: <https://lore.kernel.org/linux-man/CANv4PNkqQBPn_oyfdYZfOck-7gGwzP6YPPA9hDaiaJPUj+c3xw@mail.gmail.com/T/#u> Reported-by: Morten Welinder <mwelinder@gmail.com> Cc: Matthew House <mattlloydhouse@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man3')
-rw-r--r--man3/frexp.33
1 files changed, 1 insertions, 2 deletions
diff --git a/man3/frexp.3 b/man3/frexp.3
index ddcbc5802..16ece267d 100644
--- a/man3/frexp.3
+++ b/man3/frexp.3
@@ -131,8 +131,7 @@ main(int argc, char *argv[])
x = strtod(argv[1], NULL);
r = frexp(x, &exp);
\&
- printf("frexp(%g, &e) = %g: %g * %d\[ha]%d = %g\en",
- x, r, r, FLT_RADIX, exp, x);
+ printf("frexp(%g, &e) = %g: %g * %d\[ha]%d = %g\en", x, r, r, 2, exp, x);
exit(EXIT_SUCCESS);
}
.EE