From: Vincent Lefevre <vincent@vinc17.net>
To: Alejandro Colomar <alx@kernel.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>,
Alejandro Colomar <alx.manpages@gmail.com>,
linux-man@vger.kernel.org
Subject: Re: [PATCH] nextup.3: minor improvements
Date: Thu, 8 Aug 2024 04:56:36 +0200 [thread overview]
Message-ID: <20240808025636.GE3086@qaa.vinc17.org> (raw)
In-Reply-To: <oa5aca4pqtnnwjopngqkouwueglyujmusnms535mgh4ipyawbk@4wonm4ymhcdv>
On 2024-08-07 23:19:56 +0200, Alejandro Colomar wrote:
> Hi Vincent,
>
> On Wed, Aug 07, 2024 at 12:56:17PM GMT, Vincent Lefevre wrote:
> > The current "If x is 0" is a bit misleading because "is" is not the
> > equality test, while this condition should apply to both -0 and 0.
> > Replace this condition by "If x is equal to 0".
>
> How does 'is' differ semantically from 'is equal to' in this case?
"is" designates the value (it is a short for "has the value").
For instance, in the same man page (with the typo fixed):
"If x is NaN" (saying "is equal to" would be incorrect, because
the equality comparison with NaN is always false).
That's why the sqrt(3) man page has
If x is +0 (-0), +0 (-0) is returned.
and the cbrt(3) man page has
If x is +0, -0, positive infinity, [...]
"is equal to" corresponds to the usual equality, as written in
a source code. (IEEE 754-2019 actually uses "equals".)
For zero, one can also say "If x is ±0" as in the IEEE 754 standard.
The IEEE 754 standard also uses "zero" in the sense "±0" (but it
never uses "0" in this sense when there may be an ambiguity, knowing
that in practice, "0" has the same meaning as "+0"). In a condition,
when it says something like "x = 0", this means that x is either +0
or -0 because these values compare equal to each other.
So one could also say "If x is zero".
> I don't think 'is equal to' does anything different to mean also -0.
Note that the glibc manual in info format says for nextup:
If X = ‘0’ the function returns the smallest positive subnormal
number in the type of X.
and for nextdown:
If X = ‘0’ the function returns the smallest negative subnormal
number in the type of X.
> > If
> > .I x
> > -is 0, the returned value is the smallest representable positive number
> > -of the corresponding type.
> > +is equal to 0, the returned value is the smallest representable positive
> > +number of the corresponding type.
>
> Please keep semantic newlines. See man-pages(7).
I suppose that the issue is here "long clauses should be split at
phrase boundaries", so that you would like to avoid a split between
"positive" and "number". Perhaps better between "is" and "the".
BTW, it seems that this is often not honored, including in new text
(see e.g. commit c86bb39a117fb593f1ff7b7e729d70166d942446 two months
ago, with a split between "undefined" and "behavior").
And should I introduce a newline after the comma, though it is
currently not present? But this will not eliminate the need for
another line break.
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
next prev parent reply other threads:[~2024-08-08 2:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-07 10:56 [PATCH] nextup.3: minor improvements Vincent Lefevre
2024-08-07 21:19 ` Alejandro Colomar
2024-08-08 2:56 ` Vincent Lefevre [this message]
2024-08-08 8:07 ` Alejandro Colomar
2024-08-08 11:54 ` Vincent Lefevre
2024-08-08 11:56 ` [PATCH v2] " Vincent Lefevre
2024-08-16 11:47 ` Alejandro Colomar
2024-08-08 12:16 ` [PATCH] " G. Branden Robinson
2024-08-08 12:58 ` Vincent Lefevre
2024-08-08 22:14 ` Dave Kemper
[not found] ` <CAGcdaje1Fo_DuFf87ST8rrNCHmXx8uEzjJCwHiZ2Wf47h_O0Pg@mail.gmail.com>
2024-08-09 6:19 ` G. Branden Robinson
[not found] ` <CAGcdajd_+tT+7QTYFzRTe=MnpJd_5YtxWL+fhr_EUAnaZ2OE2w@mail.gmail.com>
2024-08-09 7:37 ` G. Branden Robinson
2024-08-09 6:37 ` Damian McGuckin
2024-08-09 9:25 ` Vincent Lefevre
[not found] ` <CAGcdajc55V7D0H2WiX5xEBcVg+mydTrvhXCKEXDpmWHZ75uj5w@mail.gmail.com>
2024-08-09 9:55 ` G. Branden Robinson
2024-08-09 10:41 ` Vincent Lefevre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240808025636.GE3086@qaa.vinc17.org \
--to=vincent@vinc17.net \
--cc=alx.manpages@gmail.com \
--cc=alx@kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox