Date: Fri, 9 Oct 1998 15:28:50 +0100 (BST) From: George Foot To: djgpp AT delorie DOT com Subject: Re: Math library source code In-Reply-To: <361D9115.18068562@purdue.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Thu, 8 Oct 1998, Chris Frolik wrote: > I downloaded the source code to the library files, but I can't seem to > find the source code to the math library files (the functions I get when > I include math.h). Can someone tell me what ZIP file I need for this, > and what .C files the standard math functions are in (such as sqrt(), > pow(), etc.). I only have the source to djgpp v2.02's library, so this may not be completely in sync with what you're looking at. Exactly which functions you get depends upon whether you link in the maths library (`-lm'). If you do, you get the functions whose source is in `src/libm/math'. If you don't link in that library then you get functions from libc. The source for this is in `src/libc', and it's split up according to origin of the function. For ANSI maths functions, look in `src/libc/ansi/math'. There are some more in `src/libc/compat/math'. Basically, browse around until you find what you're looking for. Something like `grep' is very helpful here -- or even "dir /s sqrt*.c" or using djgpp builds of fileutils "ls .../sqrt*.c". Also note that some editors (Emacs?) have the facility to scan a directory tree for function definitions, and remember exactly which file defines which function, allowing you to later look up functions just by typing their names. -- george DOT foot AT merton DOT oxford DOT ac DOT uk xu do tavla fo la lojban -- http://xiron.pc.helsinki.fi/lojban/lojban.html