------- Comment #7 from harald dot vogt at desy dot de  2005-11-29 09:42 -------
(In reply to comment #6)
> Subject: Re:  sqrt, csqrt may give a wrong result if real part of compex
> argument is zero
> 
> On Thu, Nov 24, 2005 at 05:05:12PM -0000, pinskia at gcc dot gnu dot org 
> wrote:
> > 
> > (In reply to comment #4)
> > > c99_functions.c contains implementations of csqrt[fl],
> > > which are the fixed glibc routines.  We can remove
> > > the "#if !defined(HAVE_CSQRTF)" and simply have gfortran
> > > use its own versions.
> > 
> > For only targets which have a broken csqrtf yes.  Please don't do it all the
> > time.
> > 
> 
> I've never used glibc.  Does it define a _GLIBC_VERSION_MAJOR
> and _GLIBC_VERSION_MINOR?  We could do
> 
> #if !defined(HAVE_CSQRTF) || (xx_MAJOR < 42 & xx_MINOR < 42)
> 

Dont rely on the glibc version. The better way should be to use
libgfortran/configure for csqrt, csqrtf, csqrtl to check them and setting 
HAVE_CSQRT, HAVE_CSQRTF, HAVE_CSQRTL if the checks will not fail.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25017

Reply via email to