Mail Archives: djgpp/1998/09/29/20:44:43
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 -