public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* Example of changes to math function page (log.3)
@ 2008-07-13 16:25 Michael Kerrisk
  0 siblings, 0 replies; only message in thread
From: Michael Kerrisk @ 2008-07-13 16:25 UTC (permalink / raw)
  To: Andries Brouwer; +Cc: Fabian Kreutz, linux-man-u79uwXL29TY76Z2rM5mHXA

Andries, (and Fabian, et al.)

Just by way of background, below are the kinds of changes I plan to
make to the math pages to address:

a) The poor discussion of return values for various special cases (Nan, +/-Inf).

b) The need to tell the programmer how to detect errrors (addressed
    by referring them to math-error.7).

The example here is the changed text for log.3.

Does this seem like a reasonable approach?

Cheers,

Michael


+.SH RETURN VALUE
+On success, these functions return the natural logarithm of
+.IR x .
+
+If
+.I x
+is a NaN, then a NaN is returned.
+
+If
+.I x
+is the representation of positive infinity, then
+.I x
+is returned.
+
+If
+.I x
+is zero, a "pole error" occurs, and the functions
+return
+.RB - HUGEVAL ,
+.RB - HUGEVALF ,
+or
+.RB - HUGEVALL ,
+respectively.
+
+If
+.I x
+is negative
+(including the representation of negative infinity)
+a "domain error" occurs, and a NaN (not a number) is returned.
  .SH ERRORS
+See
+.BR math_error (7)
+for information on how to determine whether an error has occurred
+when calling these functions.
+.PP
+.I errno
+may be set to the following values:


--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-07-13 16:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-13 16:25 Example of changes to math function page (log.3) Michael Kerrisk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox