delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/03/11:17:12

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

In article <339A8355 DOT 4CF6 AT glasgow DOT prestel DOT co DOT uk>,
   Michael Johnson <mj AT glasgow DOT prestel DOT co DOT uk> 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 <stdio.h>
>#include <math.h>
>
>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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019