From: e8725229 AT stud1 DOT tuwien DOT ac DOT at (godzilla) Newsgroups: comp.os.msdos.djgpp Subject: Re: newbie math.h problem Date: Mon, 30 Jun 97 07:53:36 GMT Organization: Vienna University of Technology, Austria Lines: 26 Message-ID: <5p7om0$tk_002@tuwien.ac.at> References: <339A8355 DOT 4CF6 AT glasgow DOT prestel DOT co DOT uk> NNTP-Posting-Host: tubiomed.tuwien.ac.at To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In article <339A8355 DOT 4CF6 AT glasgow DOT prestel DOT co DOT uk>, Michael Johnson wrote: >Hello and please take pity on a C newbie, > >I've called the math.h lib and I get a SIGFPE error with what I think is >a stack dump? Any it will compile but not run. > >Here's what I've got: > >#include >#include > >main() >{ > double b; > > printf("the square root of %d is %d\n",b,sqrt(b)); >} > have you assigned a value to b anywhere ? if not, try .. double b = 4.e0 .. hope that works greetings godzilla