This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: mingw32 (egcs or not) math


On Wed, 29 Jul 1998, Stephane Cateland wrote:

> I have been trying to port some math stuff with native gcc.
> after fiddling with include math.h  I realised that at link stage some 
> math function are actually missing.
>  i noticed : rint    (not much important)
>                 cbrt   more annoying.
> (performed several nm -ao *.a | grep "function")
> is someone who knows the direct answer
> or would tell me where to find source code to build functional libm.a

There is really no "libm.a" for mingw32. It's just a stub for routines
exported by crtdll.dll, which is the MS-supplied runtime.

Now to answer you question, neither rint** nor cbrt*** are defined by
ANSI or POSIX standards; quite a few of the Unix runtime libraries do
provide it, but I've seen a few that do not. If you need it, you can
roll your own or get it from one of the freely available math libraries
such as newlib (it's bundled with Cygwin32 CDK distribution). You can
download just the newlib distribution from
ftp://ftp.cygnus.com/pub/newlib/.

Regards,
Mumit

** rint is specified by XPG4 

*** I believe that the "Future Library Directions" section of the ANSI C
standard does mention cbrt. It is still not standard. 


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]