erfc failure with large numbers
John W. Eaton
jwe at bevo.che.wisc.edu
Thu Oct 30 15:27:02 CDT 2008
On 30-Oct-2008, Sergei Steshenko wrote:
|
|
|
| --- On Thu, 10/30/08, Shea, Philip <pshea at dtri.net> wrote:
|
| > From: Shea, Philip <pshea at dtri.net>
| > Subject: erfc failure with large numbers
| > To: bug at octave.org
| > Date: Thursday, October 30, 2008, 5:29 AM
| > I'm a little surprised that the library routine
| > can't handle large
| > numbers. There are good approximations to the erfc for
| > large numbers
| > (see Proakis, John G., Digital Communications, pg. 40, eq.
| > (2-1-96)). I
| > have attached the output of the octave bug_report function.
| >
| > octave-3.0.1.exe:4> erfc(1000)
| > ***MESSAGE FROM ROUTINE DERFC IN LIBRARY SLATEC.
| > ***POTENTIALLY RECOVERABLE ERROR, PROG ABORTED, TRACEBACK
| > REQUESTED
| > * X SO BIG ERFC UNDERFLOWS
| > * ERROR NUMBER = 1
| > *
| > ***END OF MESSAGE
| >
| > ***JOB ABORT DUE TO UNRECOVERED ERROR.
| > 0 ERROR MESSAGE SUMMARY
| > LIBRARY SUBROUTINE MESSAGE START NERR
| > LEVEL
| > COUNT
| > SLATEC DERFC X SO BIG ERFC UNDERF 1
| > 1
| > 1
| >
| >
| > Philip A. Shea
| > DTRI
| > 1835 Alexander Bell Dr., Suite 400
| > Reston, VA 20191
| > 703-707-8555 x6270 (Office)
| > 877-383-8802 (Pager)
| >
|
| I can't reproduce this problem on my self-built Linux 3.0.3 'octave':
|
| "
| octave:2> erfc(1000)
| ans = 0
| ".
Octave uses
#if !defined (HAVE_ERFC)
double
erfc (double x)
{
double retval;
F77_XFCN (xderfc, XDERFC, (x, retval));
return retval;
}
#endif
So if configure detects that an erfc function is available in the C
library, it uses that instead of calling derfc from the slatec
library. It's the function from slatec that needs to be fixed or
replaced with something that isn't broken.
jwe
More information about the Bug-octave
mailing list