Article View: uk.comp.os.linux
Article #775Debian 2.0/g++ problem
From: JHB NIJHOF
Date: Mon, 24 Aug 1998 00:00
Date: Mon, 24 Aug 1998 00:00
41 lines
1946 bytes
1946 bytes
Last Saturday I upgraded to Debian 2.0, and therefore to
egcs 1.0.3's c++ --- I used gcc 2.8.0 before ---
but now I've got a problem with my recompiled (c++) numbercrunching program!
It gives a SYSSEGV on the line
dz= pow(tolerance,0.25)/(pow(xnl+xlin,0.6)*pow(xnl*xlin,0.2));
where dz, tolerance, xnl and xlin are local variables.
the SIGSEGV occurs in /usr/include/__math.h , in pow:
pow (double __x, double __y)
{
register double __value, __exponent;
long long int __p = (long long int) __y;
if (__x == 0.0 && __y > 0.0)
return 0.0;
if (__y == (double) __p) <== SIGSEGV here!
What's even worse, the SYSSEGV occurs on a different line depending
on the amount of diagnostics:
cout << "xlin = " << xlin << endl;
double t1 = pow(tolerance,0.25);
cout << "t1 = " << t1 <<endl;
double t2 = pow(xnl+xlin,0.6);
cout << "t2 = " << t2 <<endl;
cout << "xnl * xlin = " << xnl * xlin <<endl; // 1
double t3 = pow(xnl*xlin,0.2); //2
cout << "t3 = " << t3 <<endl;
dz= pow(tolerance,0.25)/(pow(xnl+xlin,0.6)*pow(xnl*xlin,0.2)); //3
cout << "further .. " <<endl;;
whith line 1, it crashes on line 3; without line 1, with
line 1 commented out, the crash occurs in line 2!
Does anyone have an idea what could be wrong?
--
Jeroen Nijhof J.H.B.Nijhof@aston.ac.uk
Accordion Links http://www-th.phys.rug.nl/~nijhof/accordions.html
Technical Details
Message-ID:
<6rriai$qbt$1@whatsit.aston.ac.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10ba33,1758ae0dbec2346e,start X-Google-Attributes: gid10ba33,public X-Google-Thread: 10d8ad,1758ae0dbec2346e,start X-Google-Attributes: gid10d8ad,public From: JHB NIJHOF <nijhojhb@aston.ac.uk> Subject: Debian 2.0/g++ problem Date: 1998/08/24 Message-ID: <6rriai$qbt$1@whatsit.aston.ac.uk> X-Deja-AN: 384155780 Organization: Aston University User-Agent: tin/pre-1.4-980226 (UNIX) (Linux/2.0.33 (i686)) Newsgroups: uk.comp.os.linux,gnu.g++.help