On Mon, May 30, 2016 at 06:24:55PM +0200, Mark Kettenis wrote:
> > Date: Mon, 30 May 2016 15:34:04 +0200
> > From: Joerg Sonnenberger <jo...@bec.de>
> > 
> > On Mon, May 30, 2016 at 02:16:20PM +0200, Theo Buehler wrote:
> > > It may be somewhat interesting to mention why expm1(x) = exp(x) - 1 and
> > > log1p(x) = log(1 + x) are provided and what their historical purpose is.
> > > However, as mlarkin@ put it: are any of our users of exp(3) going to
> > > seriously be asking themselves "hmm, is OpenBSD's exp compatible with
> > > BASIC on the HP-71B?"
> > 
> > The wording change also changes the semantics quite a bit. The old
> > wording explained where the name came from and what the function does.
> > The new wording implies somewhat that the functions are obsolete, which
> > is far from true.
> 
> Right.  The function is as releveant as ever. And not only for
> "financial" calculations.  The new text isn't an improvment.

Ok, maybe the choice of the word 'historically' was suboptimal.  I
didn't intend to imply irrelevance or obsolescence.  Note also that this
is in the NOTES section, not in the DESCRIPTION section.

How about this?

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 16:38:34 -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,9 @@ 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
-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.
+Originally, expm1(x) = exp(x) \(mi 1 and log1p(x) = log(1 + x)
+were used to ensure financial calculations of ((1 + x)**n \(mi 1) / x,
+namely expm1(n * log1p(x)) / x, are accurate when x is tiny.
 They also provide accurate inverse hyperbolic functions.
 .Pp
 The function


Reply via email to