diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-19 07:28:17 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-19 07:28:17 +0000 |
commit | 8db68199f2b5512c467bce6ea80b13a463c7fc16 (patch) | |
tree | 444e1c1a219a8b1f5c18e7b23532f2e12dbfa224 /gcc/fortran/intrinsic.texi | |
parent | c0c208f9882698d7db1dbfcb4f075f1a8ca9c427 (diff) | |
download | gcc-8db68199f2b5512c467bce6ea80b13a463c7fc16.tar.gz |
2010-08-19 Tobias Burnus <burnus@net-b.de>
PR fortran/36158
PR fortran/33197
* check.c (gfc_check_bessel_n2): New function.
* gfortran.h (gfc_isym_id): Add GFC_ISYM_JN2 and GFC_ISYM_YN2.
* intrinsic.c (add_functions): Add transformational version
of the Bessel_jn/yn intrinsics.
* intrinsic.h (gfc_check_bessel_n2,gfc_simplify_bessel_jn2,
gfc_simplify_bessel_yn2): New prototypes.
* intrinsic.texi (Bessel_jn, Bessel_yn): Document
transformational variant.
* simplify.c (gfc_simplify_bessel_jn, gfc_simplify_bessel_yn):
Check for negative order.
(gfc_simplify_bessel_n2,gfc_simplify_bessel_jn2,
gfc_simplify_bessel_yn2): New functions.
2010-08-19 Tobias Burnus <burnus@net-b.de>
PR fortran/36158
PR fortran/33197
* gfortran.dg/bessel_3.f90: New.
* gfortran.dg/bessel_4.f90: New.
* gfortran.dg/bessel_5.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163364 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/intrinsic.texi')
-rw-r--r-- | gcc/fortran/intrinsic.texi | 46 |
1 files changed, 35 insertions, 11 deletions
diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi index 566050062a1..3c82ffc2c14 100644 --- a/gcc/fortran/intrinsic.texi +++ b/gcc/fortran/intrinsic.texi @@ -1630,29 +1630,41 @@ end program test_besj1 @item @emph{Description}: @code{BESSEL_JN(N, X)} computes the Bessel function of the first kind of order @var{N} of @var{X}. This function is available under the name -@code{BESJN} as a GNU extension. +@code{BESJN} as a GNU extension. If @var{N} and @var{X} are arrays, +their ranks and shapes shall conform. -If both arguments are arrays, their ranks and shapes shall conform. +@code{BESSEL_JN(N1, N2, X)} returns an array with the Bessel functions +of the first kind of the orders @var{N1} to @var{N2}. @item @emph{Standard}: -Fortran 2008 and later +Fortran 2008 and later, negative @var{N} is allowed as GNU extension @item @emph{Class}: -Elemental function +Elemental function, except for the tranformational function +@code{BESSEL_JN(N1, N2, X)} @item @emph{Syntax}: @code{RESULT = BESSEL_JN(N, X)} +@code{RESULT = BESSEL_JN(N1, N2, X)} @item @emph{Arguments}: @multitable @columnfractions .15 .70 @item @var{N} @tab Shall be a scalar or an array of type @code{INTEGER}. -@item @var{X} @tab Shall be a scalar or an array of type @code{REAL}. +@item @var{N1} @tab Shall be a non-negative scalar of type @code{INTEGER}. +@item @var{N2} @tab Shall be a non-negative scalar of type @code{INTEGER}. +@item @var{X} @tab Shall be a scalar or an array of type @code{REAL}; +for @code{BESSEL_JN(N1, N2, X)} it shall be scalar. @end multitable @item @emph{Return value}: The return value is a scalar of type @code{REAL}. It has the same kind as @var{X}. +@item @emph{Note}: +The transformational function uses a recurrance algorithm which might, +for some values of @var{X}, lead to different results than calls to +the elemental function. + @item @emph{Example}: @smallexample program test_besjn @@ -1778,29 +1790,41 @@ end program test_besy1 @item @emph{Description}: @code{BESSEL_YN(N, X)} computes the Bessel function of the second kind of order @var{N} of @var{X}. This function is available under the name -@code{BESYN} as a GNU extension. +@code{BESYN} as a GNU extension. If @var{N} and @var{X} are arrays, +their ranks and shapes shall conform. -If both arguments are arrays, their ranks and shapes shall conform. +@code{BESSEL_YN(N1, N2, X)} returns an array with the Bessel functions +of the first kind of the orders @var{N1} to @var{N2}. @item @emph{Standard}: -Fortran 2008 and later +Fortran 2008 and later, negative @var{N} is allowed as GNU extension @item @emph{Class}: -Elemental function +Elemental function, except for the tranformational function +@code{BESSEL_YN(N1, N2, X)} @item @emph{Syntax}: @code{RESULT = BESSEL_YN(N, X)} +@code{RESULT = BESSEL_YN(N1, N2, X)} @item @emph{Arguments}: @multitable @columnfractions .15 .70 -@item @var{N} @tab Shall be a scalar or an array of type @code{INTEGER}. -@item @var{X} @tab Shall be a scalar or an array of type @code{REAL}. +@item @var{N} @tab Shall be a scalar or an array of type @code{INTEGER} . +@item @var{N1} @tab Shall be a non-negative scalar of type @code{INTEGER}. +@item @var{N2} @tab Shall be a non-negative scalar of type @code{INTEGER}. +@item @var{X} @tab Shall be a scalar or an array of type @code{REAL}; +for @code{BESSEL_YN(N1, N2, X)} it shall be scalar. @end multitable @item @emph{Return value}: The return value is a scalar of type @code{REAL}. It has the same kind as @var{X}. +@item @emph{Note}: +The transformational function uses a recurrance algorithm which might, +for some values of @var{X}, lead to different results than calls to +the elemental function. + @item @emph{Example}: @smallexample program test_besyn |