Re: Man page issues: logb, significand, cbrt, log2, log10, exp10

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Morten,

On Thu, Feb 29, 2024 at 07:28:10PM -0500, Morten Welinder wrote:
> cbrt:
> The phrase "every representable real value has a representable real
> cube root" is wrong.  In fact, a representable cube root is quite
> rare.  This should be something like "every representable real value
> has a real cube root and rounding it to a representable value never
> causes overflow or underflow."

Thanks for the report!  I've fixed it with the following commit (your
wording, except for a 'nor' instead of 'or').

This one is also present in the glibc manual, so I'll also send a fix
for it, Adhemerval.

Have a lovely night!
Alex

---
commit da7bb7434ce8b20deaed58cac9e942c3531a5db3 (HEAD -> contrib)
Author: Alejandro Colomar <alx@xxxxxxxxxx>
Date:   Tue Mar 5 02:01:34 2024 +0100

    cbrt.3: wfix
    
    On Thu, Feb 29, 2024 at 07:28:10PM -0500, Morten Welinder wrote:
    > The phrase "every representable real value has a representable real
    > cube root" is wrong.  In fact, a representable cube root is quite
    > rare.
    
    Reported-by: Morten Welinder <mwelinder@xxxxxxxxx>
    Cowritten-by: Morten Welinder <mwelinder@xxxxxxxxx>
    Cc: Adhemerval Zanella Netto <adhemerval.zanella@xxxxxxxxxx>
    Signed-off-by: Alejandro Colomar <alx@xxxxxxxxxx>

diff --git a/man3/cbrt.3 b/man3/cbrt.3
index cf9c41771..64fc3c072 100644
--- a/man3/cbrt.3
+++ b/man3/cbrt.3
@@ -47,8 +47,11 @@ .SH SYNOPSIS
 .SH DESCRIPTION
 These functions return the (real) cube root of
 .IR x .
-This function cannot fail; every representable real value has a
-representable real cube root.
+This function cannot fail;
+every representable real value
+has a real cube root,
+and rounding it to a representable value
+never causes overflow nor underflow.
 .SH RETURN VALUE
 These functions return the cube root of
 .IR x .


-- 
<https://www.alejandro-colomar.es/>
Looking for a remote C programming job at the moment.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux