[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gsl] parameter check typo in specfunc/bessel_y.c

From: Kort Travis
Subject: [Bug-gsl] parameter check typo in specfunc/bessel_y.c
Date: Wed, 30 Mar 2005 09:30:02 +0200
User-agent: Mozilla Thunderbird 0.7.3 (X11/20040803)

GSL version: 1.6

filename: specfunc/bessel_y.c

description:  This is a "typo" or design inconsistency, depending on how you 
look at it.

If lmax == 0, the following function has a "domain error".

Perhaps I'm missing something, but this behavior is inconsistent with the behavior of 
"gsl_sf_bessel_jl_array" and there seems no valid numerical reason for this error (i.e. 
y0 exists and is well defined; two-dimensional arrays where one of the dimensions is "1" 
are well defined and have clearly predicable, cross-platform behavior; etc...).

lines 232..238: (I suggest that the lmax < 1 be changed to lmax < 0 as in 
"gsl_sf_bessel_jl_array" ):
int gsl_sf_bessel_yl_array(const int lmax, const double x, double * 
 /* CHECK_POINTER(result_array) */

 if(lmax < 1 || x <= 0.0) {
   GSL_ERROR ("error", GSL_EDOM);


Kort Travis
Universität Leipzig
Fakultät für Physik und Geowissenschaften
Abteilung Physik der weichen Materie
Linnéstrasse 5
04103 Leipzig

telefon: +49(0)341/973 2572(office) +49(0)341/462 5905(home)
fax:     +49(0)341/973 2479
email:   address@hidden / address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]