Removed material for the y*() functions to a separate y0.3 page.

Reason: the return values and errors/exceptions differ, and it
would have been confusing to document them on the same page.
Added RETURN VALUE section.
Added ERRORS section; noted that errno is not set; see
also http://sources.redhat.com/bugzilla/show_bug.cgi?id=6805.
This commit is contained in:
Michael Kerrisk 2008-08-01 05:26:24 +00:00
parent d33cd73d6a
commit 8f6f581dab
1 changed files with 59 additions and 46 deletions

105
man3/j0.3
View File

@ -1,4 +1,6 @@
.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
.\" <mtk.manpages@gmail.com>
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
@ -27,51 +29,34 @@
.\" Modified Sat Jul 24 19:08:17 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified 2002-08-25, aeb
.\" Modified 2004-11-12 as per suggestion by Fabian Kreutz/AEB
.\" 2008-07-24, mtk, moved yxx() material into separate y0.3 page
.\"
.TH J0 3 2007-07-26 "" "Linux Programmer's Manual"
.TH J0 3 2008-07-29 "" "Linux Programmer's Manual"
.SH NAME
j0, j0f, j0l, j1, j1f, j1l, jn, jnf, jnl,
y0, y0f, y0l, y1, y1f, y1l, yn, ynf, ynl \- Bessel functions
j0, j0f, j0l, j1, j1f, j1l, jn, jnf, jnl \-
Bessel functions of the first kind
.SH SYNOPSIS
.nf
.B #include <math.h>
.sp
.fi
.BI "double j0(double " x );
.br
.BI "double j1(double " x );
.br
.BI "double jn(int " n ", double " x );
.br
.BI "double y0(double " x );
.br
.BI "double y1(double " x );
.br
.BI "double yn(int " n ", double " x );
.sp
.BI "float j0f(float " x );
.br
.BI "float j1f(float " x );
.br
.BI "float jnf(int " n ", float " x );
.br
.BI "float y0f(float " x );
.br
.BI "float y1f(float " x );
.br
.BI "float ynf(int " n ", float " x );
.sp
.BI "long double j0l(long double " x );
.br
.BI "long double j1l(long double " x );
.br
.BI "long double jnl(int " n ", long double " x );
.br
.BI "long double y0l(long double " x );
.br
.BI "long double y1l(long double " x );
.br
.BI "long double ynl(int " n ", long double " x );
.fi
.sp
Link with \fI\-lm\fP.
.sp
@ -81,8 +66,19 @@ Feature Test Macro Requirements for glibc (see
.in
.sp
.ad l
For all of these functions:
.BR j0 (),
.BR j1 (),
.BR jn (),
_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE
.br
.BR j0f (),
.BR j0l (),
.BR j1f (),
.BR j1l (),
.BR jnf (),
.BR jnl (),
_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 600
.\" Also seems to work: -std=c99 -D_XOPEN_SOURCE
.ad b
.SH DESCRIPTION
The
@ -97,41 +93,56 @@ function
returns the Bessel function of \fIx\fP of the first kind of order \fIn\fP.
.PP
The
.BR y0 ()
and
.BR y1 ()
functions return Bessel functions of \fIx\fP
of the second kind of orders 0 and 1, respectively.
The
.BR yn ()
function
returns the Bessel function of \fIx\fP of the second kind of order \fIn\fP.
.PP
For the functions
.BR y0 (),
.BR y1 ()
and
.BR yn (),
the value of \fIx\fP
must be positive.
For negative values of \fIx\fP, these functions return
\-\fBHUGE_VAL\fP.
.PP
The
.BR j0f ()
etc. and
.BR j0l ()
etc. functions are versions that take
and return
etc. functions are versions that take and return
.I float
and
.I "long double"
values, respectively.
.SH RETURN VALUE
On success, these functions return the appropriate
Bessel value of the first kind for
.IR x .
If
.I x
is a NaN, a NaN is returned.
If
.I x
is too large in magnitude,
or the result underflows,
a "range error" occurs,
and the return value is 0.
.SH ERRORS
See
.BR math_error (7)
for information on how to determine whether an error has occurred
when calling these functions.
.PP
The following errors can occur:
.TP
Range error: result underflow, or \fIx\fP is too large in magnitude
.I errno
is set to
.BR ERANGE .
.\" An underflow floating-point exception
.\" .RB ( FE_UNDERFLOW )
.\" is raised.
.PP
These functions do not raise exceptions for
.BR fetestexcept (3).
.\" FIXME . Is it intentional that these functions do not raise exceptions?
.\" e.g., j0(1.5e16)
.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6805
.SH "CONFORMING TO"
The functions returning
.I double
conform to SVr4, 4.3BSD,
POSIX.1-2001.
The others are non-standard functions that also exist on the BSDs.
.SH BUGS
There are errors of up to 2e\-16 in the values returned by
.BR j0 (),
@ -139,3 +150,5 @@ There are errors of up to 2e\-16 in the values returned by
and
.BR jn ()
for values of \fIx\fP between \-8 and 8.
.SH SEE ALSO
.BR y0 (3)