Date: Tue, 8 Jun 1999 11:50:57 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Scott Rohde 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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".