www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/29/20:44:43

Sender: nate AT cartsys DOT com
Message-ID: <36117E06.13063A1B@cartsys.com>
Date: Tue, 29 Sep 1998 17:40:38 -0700
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.05 [en] (X11; I; Linux 2.0.35 i486)
MIME-Version: 1.0
To: Goh Yong Kwang <s6606555 AT mercury DOT np DOT ac DOT sg>
CC: djgpp AT backup DOT delorie DOT com
Subject: Re: Need for Math library
References: <Pine DOT SOL DOT 3 DOT 91 DOT 980929155546 DOT 14291A-100000 AT mercury>

Goh Yong Kwang wrote:
> 
> I've been using DJGPP for about a year or so and I've not figured out
> when the Math library is needed. It seems that DJGPP has no problem doing
> floating point calculation without Math library but sometimes the Math
> library is needed for some reasons unknown to me. Can anyone enlighten me
> on when the Math library is required?

You mean libm.a?  You are right, many math functions are defined in
libc, and don't need libm.  Some are even automagically inlined by the
compiler (like `sin').  libm contains more esoteric functions (like
gamma), and it also behaves more nicely when errors occur (setting
errno, etc).  It may be somewhat slower, however.
-- 

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


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