From: "G. Branden Robinson" <g.branden.robinson@gmail.com>
To: Alejandro Colomar <alx@kernel.org>
Cc: Vincent Lefevre <vincent@vinc17.net>,
Michael Kerrisk <mtk.manpages@gmail.com>,
linux-man@vger.kernel.org, groff@gnu.org
Subject: Re: [PATCH] nextup.3: minor improvements
Date: Thu, 8 Aug 2024 07:16:03 -0500 [thread overview]
Message-ID: <20240808121603.fatotzqmtpbf2jez@illithid> (raw)
In-Reply-To: <wpkh52aryrsgp52qur6igf5uwidbhetszb4krfcfgfpyarv7yg@abea5srk4kuy>
[-- Attachment #1: Type: text/plain, Size: 2665 bytes --]
[looping in groff@gnu]
At 2024-08-08T10:07:35+0200, Alejandro Colomar wrote:
> On Thu, Aug 08, 2024 at 04:56:36AM GMT, Vincent Lefevre wrote:
> > 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.
>
> Hmmm, I see. Thanks! I think "If x is ±0" is the clearest way to say
> it. I'm not sure if that glyph is available everywhere, though. How
> about "If x is 0 or -0"?
I think it's reasonable to assume that it's available.[1] groff's
terminal output devices will either output it as-is or substitute a
fallback.
$ printf '±\n' | groff -K utf8 -T ascii | cat -s
+-
An argument could be made that this fallback should render "+/-"
instead.
With low-capability devices, there's often no single best answer to how
one should limp along.
In groff, of course, you can ask an output device whether it supports a
given glyph and define a string appropriately--but the first part of
that is not portable to formatters that don't implement groff
extensions, and doing so could rouse the ire of Ingo Schwarze's
mandoc(1).
Regards,
Branden
[1] The ± symbol was in the Seventh Edition Unix troff glyph repertoire
and is also in ISO 8859-1. I conclude that it's as portable as
anything not in US-ASCII gets.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-08-08 12:16 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
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 ` G. Branden Robinson [this message]
2024-08-08 12:58 ` [PATCH] " 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=20240808121603.fatotzqmtpbf2jez@illithid \
--to=g.branden.robinson@gmail.com \
--cc=alx@kernel.org \
--cc=groff@gnu.org \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=vincent@vinc17.net \
/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