Mercurial > hg > octave-lojdl
changeset 4490:1aed172ab84a
[project @ 2003-08-28 19:03:06 by jwe]
author | jwe |
---|---|
date | Thu, 28 Aug 2003 19:03:13 +0000 |
parents | a90c3cbded0d |
children | 96a25f032846 |
files | liboctave/ChangeLog liboctave/lo-specfun.cc |
diffstat | 2 files changed, 12 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,9 @@ +2003-08-28 John W. Eaton <jwe@bevo.che.wisc.edu> + + * lo-specfun.cc (zbesj, zbesy, zbesi, zbesk, airy, biry): + Also zero imaginary part of result if real part of input value is + zero. + 2003-07-30 Heine Kolltveit <kolltvei@idi.ntnu.no> * mx-base.h: Include ArrayN.h.
--- a/liboctave/lo-specfun.cc +++ b/liboctave/lo-specfun.cc @@ -219,7 +219,7 @@ F77_FUNC (zbesj, ZBESJ) (zr, zi, alpha, kode, 1, &yr, &yi, nz, ierr); - if (zi == 0.0 && zr > 0.0) + if (zi == 0.0 && zr >= 0.0) yi = 0.0; retval = bessel_return_value (Complex (yr, yi), ierr); @@ -272,7 +272,7 @@ F77_FUNC (zbesy, ZBESY) (zr, zi, alpha, kode, 1, &yr, &yi, nz, &wr, &wi, ierr); - if (zi == 0.0 && zr > 0.0) + if (zi == 0.0 && zr >= 0.0) yi = 0.0; } @@ -314,7 +314,7 @@ F77_FUNC (zbesi, ZBESI) (zr, zi, alpha, kode, 1, &yr, &yi, nz, ierr); - if (zi == 0.0 && zr > 0.0) + if (zi == 0.0 && zr >= 0.0) yi = 0.0; retval = bessel_return_value (Complex (yr, yi), ierr); @@ -365,7 +365,7 @@ { F77_FUNC (zbesk, ZBESK) (zr, zi, alpha, kode, 1, &yr, &yi, nz, ierr); - if (zi == 0.0 && zr > 0.0) + if (zi == 0.0 && zr >= 0.0) yi = 0.0; } @@ -616,7 +616,7 @@ F77_FUNC (zairy, ZAIRY) (zr, zi, id, kode, ar, ai, nz, ierr); - if (zi == 0.0 && (! scaled || zr > 0.0)) + if (zi == 0.0 && (! scaled || zr >= 0.0)) ai = 0.0; return bessel_return_value (Complex (ar, ai), ierr); @@ -637,7 +637,7 @@ F77_FUNC (zbiry, ZBIRY) (zr, zi, id, kode, ar, ai, ierr); - if (zi == 0.0 && (! scaled || zr > 0.0)) + if (zi == 0.0 && (! scaled || zr >= 0.0)) ai = 0.0; return bessel_return_value (Complex (ar, ai), ierr);