delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/08/08:45:46

Date: Tue, 8 Jun 1999 11:50:57 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Scott Rohde <rohde AT prairienet DOT org>
cc: djgpp AT delorie DOT com
Subject: Re: Linking in the math library produces peculiar results.
In-Reply-To: <_3K63.2422$xg.109@firefly>
Message-ID: <Pine.SUN.3.91.990608115014.4197P-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 7 Jun 1999, Scott Rohde wrote:

> The following test program, which uses the sine function, works as
> expected when compiled without the -lm option (I assume that means it
> is using a definition for sin(double) in libc.a).  But with -lm, I get
> very peculiar results: for the integral (but not int!) values of x
> between x = 29.0 and x = 75.0, the value returned by the sine function
> for one of the four angles having x for a reference angle is off in
> all but eleven cases.

You didn't tell the versions of the installed compiler and the DJGPP
libraries.  Please always include this information when reporting
problems.  In this case, the version of GCC (type "gcc --version") and
the libraries is required.  The versions of the libraries can be seen
by one of these two commands:

	  ident libc.a
or
	  strings libc.a | grep Id

(the first one requires ident.exe from the RCS package); and the same
for libm.a.  If you have neither RCS nor Grep installed, pipe the
output of `strings' into some text editor/browser and search for the
string "Id".

- Raw text -


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