From bug-octave-request at bevo dot che dot wisc dot edu Fri Jan 29 02:28:09 1999 Subject: Bessel Functions of the Second Kind Crash From: "John W. Eaton" To: "Rafael R. Sevilla 94-22131" Cc: bug-octave at bevo dot che dot wisc dot edu Date: Fri, 29 Jan 1999 02:20:45 -0600 (CST) On 29-Jan-1999, Rafael R. Sevilla 94-22131 wrote: | Bug report for Octave 2.0.13 configured for i386-redhat-linux-gnu | | Description: | ----------- | | * Using the Bessel functions of the second kind (bessely) crashes Octave, | given arguments which are nonzero for order zero. | * Bessel Y for zero arguments for any order (including zero) give a | misleading error message (I think it should return -inf and warn of a | singularity, see below) | | Repeat-By: | --------- | | octave:1> bessely(0,x) | | for any nonzero value of x will instantly crash Octave with a segmentation | fault. The octave-core file is empty. | | Bessel Y with zero arguments for any order gives a cryptic and misleading error | message: | | octave:1> bessely(n,0) | error: bessely: error computing function values | error: evaluating index expression near line 1, column 1 | | where n is any order number (this happens even for order zero). This doesn't | return anything! The Bessel functions of the second kind have a singularity | at zero and in this case it should act like the csc(x) function and return | -Inf as its function value and warn about a singularity. These problems should be fixed in the current test release which uses new code for Bessel functions that can handle a lot more cases than the old stuff: $ src/octave Octave, version 2.0.13.96 (i686-pc-linux-gnulibc1). Copyright (C) 1996, 1997, 1998 John W. Eaton. This is free software with ABSOLUTELY NO WARRANTY. For details, type `warranty'. octave:1> bessely (0, 1) ans = 0.088257 octave:2> bessely (0,0) ans = -Inf octave:3> bessely (1,0) ans = -Inf The test releases are available at ftp.che.wisc.edu in the directory /pub/octave/test-releases. | Besides, where's the | 'index expression' there? Anything that looks like x(args) is an `index expression' to Octave. It's too bad that Matlab didn't distinguish variable indexing and function calls using different operators (e.g., [] for indexing and () for function calls). Oh well... | (Sorry. I've never been able to compile the sources for Octave on | my machine. If GCC doesn't sig 11 it comes up with a mysterious | error message somewhere that I don't see when compiling anything | else. Sorry, random sig11 when using gcc sounds like bad hardware. | This has happened for Octave 1.1.1 on my old Slackware | machine and for Octave 2.0.11 and 2.0.13 on my current Red Hat | machine. And while I'd like to think I have a lot of knowledge on | numerical algorithms, I have a real distaste for C++ programming | bordering on "religious intolerance.") My apologies for not consulting you when I chose the implementation language. jwe