Hi Theo,

Theo Buehler wrote on Mon, May 30, 2016 at 07:33:04PM +0200:

> Fine. Here's the diff only doing the markup stuff.

No objection here if you think it reads better.  The spacing is a
matter of personal taste.  I'm not aware of any recommendation
whether to insert spacing into in-line mathematical formulae in
mdoc(7) code.

GNU eqn(1) removes the spacing even if you provide it:

  schwarze@isnote $ eqn -Tascii | nroff -mdoc -Tascii -c -p | hexdump -C
  .EQ
  x + 1
  .EN
  00000000  5f 08 78 2b 31 0a ...  |_.x+1.|

But that's not a strong argument.
Besides, mandoc(1) currently does not:

  schwarze@isnote $ mandoc | hexdump -C
  .EQ
  x + 1
  .EN
  [...]
  00000050  0a 0a 78 20 2b 20 31 0a ...  |..x + 1.|

In mathematical formulae, \(mi is slightly better than \- for minus.

Yours,
  Ingo


> Index: exp.3
> ===================================================================
> RCS file: /var/cvs/src/lib/libm/man/exp.3,v
> retrieving revision 1.33
> diff -u -p -r1.33 exp.3
> --- exp.3     26 Apr 2016 19:49:22 -0000      1.33
> +++ exp.3     30 May 2016 17:30:40 -0000
> @@ -139,7 +139,7 @@ function is an extended precision versio
>  .Pp
>  The
>  .Fn expm1
> -function computes the value exp(x)\-1 accurately even for tiny argument
> +function computes the value exp(x) \(mi 1 accurately even for tiny argument
>  .Fa x .
>  The
>  .Fn expm1f
> @@ -194,7 +194,7 @@ function is an extended precision versio
>  The
>  .Fn log1p
>  function computes
> -the value of log(1+x) accurately even for tiny argument
> +the value of log(1 + x) accurately even for tiny argument
>  .Fa x .
>  The
>  .Fn log1pf
> @@ -277,12 +277,12 @@ are accurate enough that
>  .Fn pow integer integer
>  is exact until it is bigger than 2**53 for IEEE 754.
>  .Sh NOTES
> -The functions exp(x)\-1 and log(1+x) are called
> +The functions exp(x) \(mi 1 and log(1 + x) are called
>  expm1 and logp1 in BASIC on the Hewlett\-Packard HP-71B
>  and APPLE Macintosh, EXP1 and LN1 in Pascal, exp1 and log1 in C
>  on APPLE Macintoshes, where they have been provided to make
> -sure financial calculations of ((1+x)**n\-1)/x, namely
> -expm1(n*log1p(x))/x, will be accurate when x is tiny.
> +sure financial calculations of ((1 + x)**n \(mi 1) / x, namely
> +expm1(n * log1p(x)) / x, will be accurate when x is tiny.
>  They also provide accurate inverse hyperbolic functions.
>  .Pp
>  The function

Reply via email to