Mail Archives: djgpp/1997/07/03/11:17:12
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 -