delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/07/31/12:30:39

From: khan AT xraylith DOT wisc DOT edu (Mumit Khan)
Subject: Re: mingw32 (egcs or not) math
31 Jul 1998 12:30:39 -0700 :
Message-ID: <Pine.SUN.3.93.980730190610.19089C-100000.cygnus.gnu-win32@modi.xraylith.wisc.edu>
References: <199807292126 DOT XAA21080 AT chewbacca DOT worldnet DOT net>
Mime-Version: 1.0
To: Stephane Cateland <cateland AT adersa DOT asso DOT fr>
Cc: gnu-win32 AT cygnus DOT com

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 AT cygnus DOT com" with one line of text: "help".

- Raw text -


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