Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hplabs!hpda!hpcupt1!hpisod2!decot From: decot@hpisod2.cup.hp.com (Dave Decot) Newsgroups: comp.lang.c Subject: Re: exp(anything_but_0) dumps core Message-ID: <2550162@hpisod2.cup.hp.com> Date: 21 Mar 91 20:55:45 GMT References: <1991Mar18.211839.3010@mccc.edu> Organization: Hewlett Packard, Cupertino Lines: 27 > I have a program: > > #include > #include > main() > { > double y; > y=exp(1.0); > } > > that compiles OK but dumps core when run (the message is 'Floating > exception'). Running 'strings' on the binary yields: > > @(#)/usr/ccs/lib/libm.a/exp.o.sl 1.1 5.0-3 11/05/89 65417 AT&T-SF 0.0 > > I'm using the AT&T Standard C (i.e., "ANSI C") Development Environment > (SCDE) 5.0/3 05/25/90 on a 6386 running AT&T UNIX System V/386 R3.2 2.2. > > 'sum /usr/ccs/lib/libm.a' yields > 17278 147 libm.a I presume that you are linking with -lm, and that a declaration of exp() returning double is found in ? Are you using a "floats is floats" option to the compiler? Dave Decot