From: m.de.beurs@pi.net <m.de.beurs@pi.net>
Subject: segmentation fault with math lib
Date: Wed, 07 May 97 18:54:27 GMT [thread overview]
Message-ID: <30f9b33d80c2dc81538f9f6e1bbb4f82.axp-list@archive.invalid> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1051 bytes --]
I´m having a problem with making a program with uses the math library and I
don´t know wether I´m doing something wrong, or my system is not correctly
installed.
I have linux-axp version 2.0.25 for the dec multia.
I'm having problems with making a program with uses cos() and sin()
functions. If I don't use these functions everything goes ok. The program
gives a core dump when started. The following is an example of the problem:
the test program (test.c):
#include <stdio.h>
#include <math.h>
main(void)
{
float
a,b;
a = 1.;
b = sin(a);
printf(" b = %f\n",b);
}
compiling with:
gcc test.c -o test -lm
running:
test
and then the error:
Segmentation fault (core dumped)
running debug:
gdb test core
gives:
Program terminated with signal 11, Segmentation fault.
#0 0x1200083a4 in __libc_init ()
Can anyone help me with this?
Thanks,
M. de Beurs
m.de.beurs@pi.net
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
next reply other threads:[~1997-05-07 18:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-05-07 18:54 m.de.beurs [this message]
-- strict thread matches above, loose matches on Subject: below --
1997-05-08 17:15 segmentation fault with math lib Hunter A. Ware
[not found] <M.050797.205427.14@LOCALNAME>
1997-05-08 0:19 ` Andrew D. Isaacson
1997-05-08 18:01 ` Richard Henderson
[not found] <199705081801.NAA24268@stommel.tamu.edu>
1997-05-08 21:01 ` Zach
[not found] <m3n2q5hom4.fsf@spunky.virginia.edu>
1997-05-08 22:14 ` Zach
[not found] <Pine.LNX.3.95.970508134813.3342B-100000@thebrain>
1997-05-08 23:09 ` Richard Henderson
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox