help-octave
[Top][All Lists]
Advanced

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

Re: Besseli Function


From: John W. Eaton
Subject: Re: Besseli Function
Date: Mon, 8 Sep 2003 12:17:24 -0500

On  8-Sep-2003, David Bateman <address@hidden> wrote:

| Why can't we just replace the code in lo-specfun.cc so that an overflow
| without scaling, automatically forces a scaling. Something like
| 
| 
|       F77_FUNC (zbesi, ZBESI) (zr, zi, alpha, 0, 1, &yr, &yi, nz, ierr);
| 
|       if (ierr == 2)
|         {
|           // Overflow condition. Try scaling the result
|           F77_FUNC (zbesi, ZBESI) (zr, zi, alpha, 1, 1, &yr, &yi, nz, ierr);
|           
|           yr *= exp(z);
|           yi *= exp(z);
| 
|         }
| 
|       if (zi == 0.0 && zr > 0.0)
|       yi = 0.0;
| 
|       retval = bessel_return_value (Complex (yr, yi), ierr);
| 
| Then the whole issue goes away. The patch the lo-specfun.cc is pretty
| trivial. However, a lot of dead code will need to be removed from 
| a dozen different places, starting with besselj.cc and working downwards.

Why not leave the option for scaling, but try scaling if it was not
requested and overflow has occurred?

But in any case, I'm asking that someone who wants this feature
provide a complete patch rather than waiting for me to get around to
doing it.

Thanks,

jwe



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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