mirror of
https://git.code.sf.net/p/mingw-w64/mingw-w64
synced 2024-11-24 02:14:43 +08:00
2010-08-01 Kai Tietz <kai.tietz@onevision.com>
* Makefile.am (sqrt): Add new c99 compatible API. * math/sqrt.def.h, math/sqrt.c: New. * math/sqrtf.c, math/sqrtl.c: Adjusted. * Makefile.in: Regenerated. git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@3075 4407c894-4637-0410-b4f5-ada5f102cad1
This commit is contained in:
parent
3300e3a851
commit
5ec22236cb
@ -1,5 +1,10 @@
|
||||
2010-08-01 Kai Tietz <kai.tietz@onevision.com>
|
||||
|
||||
* Makefile.am (sqrt): Add new c99 compatible API.
|
||||
* math/sqrt.def.h, math/sqrt.c: New.
|
||||
* math/sqrtf.c, math/sqrtl.c: Adjusted.
|
||||
* Makefile.in: Regenerated.
|
||||
|
||||
* Makefile.am (sin, cos): Add new c99 compatible API.
|
||||
* math/cos.def.h: New.
|
||||
* math/sin.def.h: New.
|
||||
|
@ -164,8 +164,11 @@ src_libmingwex=\
|
||||
math/modff.c math/modfl.c math/nextafterf.c math/nextafterl.c math/nexttoward.c math/nexttowardf.c \
|
||||
math/pow.c math/powf.c math/powi.c math/powif.c math/powil.c math/powl.c \
|
||||
math/rint.c math/rintf.c math/rintl.c math/round.c math/roundf.c math/roundl.c \
|
||||
math/s_erf.c math/sf_erf.c math/signbit.c math/signbitf.c math/signbitl.c \
|
||||
math/sinhf.c math/sinhl.c math/sqrtf.c math/sqrtl.c math/tanf.c math/tanhf.c \
|
||||
math/s_erf.c math/sf_erf.c \
|
||||
math/signbit.c math/signbitf.c math/signbitl.c \
|
||||
math/sinhf.c math/sinhl.c \
|
||||
math/sqrtf.c math/sqrt.c math/sqrtl.c \
|
||||
math/tanf.c math/tanhf.c \
|
||||
math/tanhl.c math/tgamma.c math/tgammaf.c math/tgammal.c math/trunc.c math/truncf.c \
|
||||
math/truncl.c math/cossin.c \
|
||||
\
|
||||
|
@ -384,7 +384,7 @@ am__lib32_libmingwex_a_SOURCES_DIST = intrincs/inbyte.c \
|
||||
math/rintl.c math/round.c math/roundf.c math/roundl.c \
|
||||
math/s_erf.c math/sf_erf.c math/signbit.c math/signbitf.c \
|
||||
math/signbitl.c math/sinhf.c math/sinhl.c math/sqrtf.c \
|
||||
math/sqrtl.c math/tanf.c math/tanhf.c math/tanhl.c \
|
||||
math/sqrt.c math/sqrtl.c math/tanf.c math/tanhf.c math/tanhl.c \
|
||||
math/tgamma.c math/tgammaf.c math/tgammal.c math/trunc.c \
|
||||
math/truncf.c math/truncl.c math/cossin.c misc/mb_wc_common.h \
|
||||
misc/mingw_getsp.S misc/mingw_matherr.c misc/alarm.c \
|
||||
@ -710,6 +710,7 @@ am__objects_11 = intrincs/lib32_libmingwex_a-inbyte.$(OBJEXT) \
|
||||
math/lib32_libmingwex_a-sinhf.$(OBJEXT) \
|
||||
math/lib32_libmingwex_a-sinhl.$(OBJEXT) \
|
||||
math/lib32_libmingwex_a-sqrtf.$(OBJEXT) \
|
||||
math/lib32_libmingwex_a-sqrt.$(OBJEXT) \
|
||||
math/lib32_libmingwex_a-sqrtl.$(OBJEXT) \
|
||||
math/lib32_libmingwex_a-tanf.$(OBJEXT) \
|
||||
math/lib32_libmingwex_a-tanhf.$(OBJEXT) \
|
||||
@ -1254,7 +1255,7 @@ am__lib64_libmingwex_a_SOURCES_DIST = intrincs/inbyte.c \
|
||||
math/rintl.c math/round.c math/roundf.c math/roundl.c \
|
||||
math/s_erf.c math/sf_erf.c math/signbit.c math/signbitf.c \
|
||||
math/signbitl.c math/sinhf.c math/sinhl.c math/sqrtf.c \
|
||||
math/sqrtl.c math/tanf.c math/tanhf.c math/tanhl.c \
|
||||
math/sqrt.c math/sqrtl.c math/tanf.c math/tanhf.c math/tanhl.c \
|
||||
math/tgamma.c math/tgammaf.c math/tgammal.c math/trunc.c \
|
||||
math/truncf.c math/truncl.c math/cossin.c misc/mb_wc_common.h \
|
||||
misc/mingw_getsp.S misc/mingw_matherr.c misc/alarm.c \
|
||||
@ -1592,6 +1593,7 @@ am__objects_31 = intrincs/lib64_libmingwex_a-inbyte.$(OBJEXT) \
|
||||
math/lib64_libmingwex_a-sinhf.$(OBJEXT) \
|
||||
math/lib64_libmingwex_a-sinhl.$(OBJEXT) \
|
||||
math/lib64_libmingwex_a-sqrtf.$(OBJEXT) \
|
||||
math/lib64_libmingwex_a-sqrt.$(OBJEXT) \
|
||||
math/lib64_libmingwex_a-sqrtl.$(OBJEXT) \
|
||||
math/lib64_libmingwex_a-tanf.$(OBJEXT) \
|
||||
math/lib64_libmingwex_a-tanhf.$(OBJEXT) \
|
||||
@ -3063,8 +3065,11 @@ src_libmingwex = \
|
||||
math/modff.c math/modfl.c math/nextafterf.c math/nextafterl.c math/nexttoward.c math/nexttowardf.c \
|
||||
math/pow.c math/powf.c math/powi.c math/powif.c math/powil.c math/powl.c \
|
||||
math/rint.c math/rintf.c math/rintl.c math/round.c math/roundf.c math/roundl.c \
|
||||
math/s_erf.c math/sf_erf.c math/signbit.c math/signbitf.c math/signbitl.c \
|
||||
math/sinhf.c math/sinhl.c math/sqrtf.c math/sqrtl.c math/tanf.c math/tanhf.c \
|
||||
math/s_erf.c math/sf_erf.c \
|
||||
math/signbit.c math/signbitf.c math/signbitl.c \
|
||||
math/sinhf.c math/sinhl.c \
|
||||
math/sqrtf.c math/sqrt.c math/sqrtl.c \
|
||||
math/tanf.c math/tanhf.c \
|
||||
math/tanhl.c math/tgamma.c math/tgammaf.c math/tgammal.c math/trunc.c math/truncf.c \
|
||||
math/truncl.c math/cossin.c \
|
||||
\
|
||||
@ -4979,6 +4984,8 @@ math/lib32_libmingwex_a-sinhl.$(OBJEXT): math/$(am__dirstamp) \
|
||||
math/$(DEPDIR)/$(am__dirstamp)
|
||||
math/lib32_libmingwex_a-sqrtf.$(OBJEXT): math/$(am__dirstamp) \
|
||||
math/$(DEPDIR)/$(am__dirstamp)
|
||||
math/lib32_libmingwex_a-sqrt.$(OBJEXT): math/$(am__dirstamp) \
|
||||
math/$(DEPDIR)/$(am__dirstamp)
|
||||
math/lib32_libmingwex_a-sqrtl.$(OBJEXT): math/$(am__dirstamp) \
|
||||
math/$(DEPDIR)/$(am__dirstamp)
|
||||
math/lib32_libmingwex_a-tanf.$(OBJEXT): math/$(am__dirstamp) \
|
||||
@ -6256,6 +6263,8 @@ math/lib64_libmingwex_a-sinhl.$(OBJEXT): math/$(am__dirstamp) \
|
||||
math/$(DEPDIR)/$(am__dirstamp)
|
||||
math/lib64_libmingwex_a-sqrtf.$(OBJEXT): math/$(am__dirstamp) \
|
||||
math/$(DEPDIR)/$(am__dirstamp)
|
||||
math/lib64_libmingwex_a-sqrt.$(OBJEXT): math/$(am__dirstamp) \
|
||||
math/$(DEPDIR)/$(am__dirstamp)
|
||||
math/lib64_libmingwex_a-sqrtl.$(OBJEXT): math/$(am__dirstamp) \
|
||||
math/$(DEPDIR)/$(am__dirstamp)
|
||||
math/lib64_libmingwex_a-tanf.$(OBJEXT): math/$(am__dirstamp) \
|
||||
@ -8379,6 +8388,7 @@ mostlyclean-compile:
|
||||
-rm -f math/lib32_libmingwex_a-sinhl.$(OBJEXT)
|
||||
-rm -f math/lib32_libmingwex_a-sinl.$(OBJEXT)
|
||||
-rm -f math/lib32_libmingwex_a-sinl_internal.$(OBJEXT)
|
||||
-rm -f math/lib32_libmingwex_a-sqrt.$(OBJEXT)
|
||||
-rm -f math/lib32_libmingwex_a-sqrtf.$(OBJEXT)
|
||||
-rm -f math/lib32_libmingwex_a-sqrtl.$(OBJEXT)
|
||||
-rm -f math/lib32_libmingwex_a-tanf.$(OBJEXT)
|
||||
@ -8546,6 +8556,7 @@ mostlyclean-compile:
|
||||
-rm -f math/lib64_libmingwex_a-sinhl.$(OBJEXT)
|
||||
-rm -f math/lib64_libmingwex_a-sinl.$(OBJEXT)
|
||||
-rm -f math/lib64_libmingwex_a-sinl_internal.$(OBJEXT)
|
||||
-rm -f math/lib64_libmingwex_a-sqrt.$(OBJEXT)
|
||||
-rm -f math/lib64_libmingwex_a-sqrtf.$(OBJEXT)
|
||||
-rm -f math/lib64_libmingwex_a-sqrtl.$(OBJEXT)
|
||||
-rm -f math/lib64_libmingwex_a-tanf.$(OBJEXT)
|
||||
@ -9743,6 +9754,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/lib32_libmingwex_a-sinhl.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/lib32_libmingwex_a-sinl.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/lib32_libmingwex_a-sinl_internal.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/lib32_libmingwex_a-sqrt.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/lib32_libmingwex_a-sqrtf.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/lib32_libmingwex_a-sqrtl.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/lib32_libmingwex_a-tanf.Po@am__quote@
|
||||
@ -9910,6 +9922,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/lib64_libmingwex_a-sinhl.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/lib64_libmingwex_a-sinl.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/lib64_libmingwex_a-sinl_internal.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/lib64_libmingwex_a-sqrt.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/lib64_libmingwex_a-sqrtf.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/lib64_libmingwex_a-sqrtl.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@math/$(DEPDIR)/lib64_libmingwex_a-tanf.Po@am__quote@
|
||||
@ -15603,6 +15616,20 @@ math/lib32_libmingwex_a-sqrtf.obj: math/sqrtf.c
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib32_libmingwex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o math/lib32_libmingwex_a-sqrtf.obj `if test -f 'math/sqrtf.c'; then $(CYGPATH_W) 'math/sqrtf.c'; else $(CYGPATH_W) '$(srcdir)/math/sqrtf.c'; fi`
|
||||
|
||||
math/lib32_libmingwex_a-sqrt.o: math/sqrt.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib32_libmingwex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT math/lib32_libmingwex_a-sqrt.o -MD -MP -MF math/$(DEPDIR)/lib32_libmingwex_a-sqrt.Tpo -c -o math/lib32_libmingwex_a-sqrt.o `test -f 'math/sqrt.c' || echo '$(srcdir)/'`math/sqrt.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) math/$(DEPDIR)/lib32_libmingwex_a-sqrt.Tpo math/$(DEPDIR)/lib32_libmingwex_a-sqrt.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='math/sqrt.c' object='math/lib32_libmingwex_a-sqrt.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib32_libmingwex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o math/lib32_libmingwex_a-sqrt.o `test -f 'math/sqrt.c' || echo '$(srcdir)/'`math/sqrt.c
|
||||
|
||||
math/lib32_libmingwex_a-sqrt.obj: math/sqrt.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib32_libmingwex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT math/lib32_libmingwex_a-sqrt.obj -MD -MP -MF math/$(DEPDIR)/lib32_libmingwex_a-sqrt.Tpo -c -o math/lib32_libmingwex_a-sqrt.obj `if test -f 'math/sqrt.c'; then $(CYGPATH_W) 'math/sqrt.c'; else $(CYGPATH_W) '$(srcdir)/math/sqrt.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) math/$(DEPDIR)/lib32_libmingwex_a-sqrt.Tpo math/$(DEPDIR)/lib32_libmingwex_a-sqrt.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='math/sqrt.c' object='math/lib32_libmingwex_a-sqrt.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib32_libmingwex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o math/lib32_libmingwex_a-sqrt.obj `if test -f 'math/sqrt.c'; then $(CYGPATH_W) 'math/sqrt.c'; else $(CYGPATH_W) '$(srcdir)/math/sqrt.c'; fi`
|
||||
|
||||
math/lib32_libmingwex_a-sqrtl.o: math/sqrtl.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib32_libmingwex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT math/lib32_libmingwex_a-sqrtl.o -MD -MP -MF math/$(DEPDIR)/lib32_libmingwex_a-sqrtl.Tpo -c -o math/lib32_libmingwex_a-sqrtl.o `test -f 'math/sqrtl.c' || echo '$(srcdir)/'`math/sqrtl.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) math/$(DEPDIR)/lib32_libmingwex_a-sqrtl.Tpo math/$(DEPDIR)/lib32_libmingwex_a-sqrtl.Po
|
||||
@ -23037,6 +23064,20 @@ math/lib64_libmingwex_a-sqrtf.obj: math/sqrtf.c
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib64_libmingwex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o math/lib64_libmingwex_a-sqrtf.obj `if test -f 'math/sqrtf.c'; then $(CYGPATH_W) 'math/sqrtf.c'; else $(CYGPATH_W) '$(srcdir)/math/sqrtf.c'; fi`
|
||||
|
||||
math/lib64_libmingwex_a-sqrt.o: math/sqrt.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib64_libmingwex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT math/lib64_libmingwex_a-sqrt.o -MD -MP -MF math/$(DEPDIR)/lib64_libmingwex_a-sqrt.Tpo -c -o math/lib64_libmingwex_a-sqrt.o `test -f 'math/sqrt.c' || echo '$(srcdir)/'`math/sqrt.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) math/$(DEPDIR)/lib64_libmingwex_a-sqrt.Tpo math/$(DEPDIR)/lib64_libmingwex_a-sqrt.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='math/sqrt.c' object='math/lib64_libmingwex_a-sqrt.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib64_libmingwex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o math/lib64_libmingwex_a-sqrt.o `test -f 'math/sqrt.c' || echo '$(srcdir)/'`math/sqrt.c
|
||||
|
||||
math/lib64_libmingwex_a-sqrt.obj: math/sqrt.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib64_libmingwex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT math/lib64_libmingwex_a-sqrt.obj -MD -MP -MF math/$(DEPDIR)/lib64_libmingwex_a-sqrt.Tpo -c -o math/lib64_libmingwex_a-sqrt.obj `if test -f 'math/sqrt.c'; then $(CYGPATH_W) 'math/sqrt.c'; else $(CYGPATH_W) '$(srcdir)/math/sqrt.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) math/$(DEPDIR)/lib64_libmingwex_a-sqrt.Tpo math/$(DEPDIR)/lib64_libmingwex_a-sqrt.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='math/sqrt.c' object='math/lib64_libmingwex_a-sqrt.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib64_libmingwex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o math/lib64_libmingwex_a-sqrt.obj `if test -f 'math/sqrt.c'; then $(CYGPATH_W) 'math/sqrt.c'; else $(CYGPATH_W) '$(srcdir)/math/sqrt.c'; fi`
|
||||
|
||||
math/lib64_libmingwex_a-sqrtl.o: math/sqrtl.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib64_libmingwex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT math/lib64_libmingwex_a-sqrtl.o -MD -MP -MF math/$(DEPDIR)/lib64_libmingwex_a-sqrtl.Tpo -c -o math/lib64_libmingwex_a-sqrtl.o `test -f 'math/sqrtl.c' || echo '$(srcdir)/'`math/sqrtl.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) math/$(DEPDIR)/lib64_libmingwex_a-sqrtl.Tpo math/$(DEPDIR)/lib64_libmingwex_a-sqrtl.Po
|
||||
|
46
mingw-w64-crt/math/sqrt.c
Executable file
46
mingw-w64-crt/math/sqrt.c
Executable file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
This Software is provided under the Zope Public License (ZPL) Version 2.1.
|
||||
|
||||
Copyright (c) 2009, 2010 by the mingw-w64 project
|
||||
|
||||
See the AUTHORS file for the list of contributors to the mingw-w64 project.
|
||||
|
||||
This license has been certified as open source. It has also been designated
|
||||
as GPL compatible by the Free Software Foundation (FSF).
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions in source code must retain the accompanying copyright
|
||||
notice, this list of conditions, and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the accompanying
|
||||
copyright notice, this list of conditions, and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
3. Names of the copyright holders must not be used to endorse or promote
|
||||
products derived from this software without prior written permission
|
||||
from the copyright holders.
|
||||
4. The right to distribute this software or to use it for any purpose does
|
||||
not give you the right to use Servicemarks (sm) or Trademarks (tm) of
|
||||
the copyright holders. Use of them is covered by separate agreement
|
||||
with the copyright holders.
|
||||
5. If any files are modified, you must cause the modified files to carry
|
||||
prominent notices stating that you changed the files and the date of
|
||||
any change.
|
||||
|
||||
Disclaimer
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
|
||||
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _NEW_COMPLEX_DOUBLE 1
|
||||
#include "sqrt.def.h"
|
66
mingw-w64-crt/math/sqrt.def.h
Normal file
66
mingw-w64-crt/math/sqrt.def.h
Normal file
@ -0,0 +1,66 @@
|
||||
/*
|
||||
This Software is provided under the Zope Public License (ZPL) Version 2.1.
|
||||
|
||||
Copyright (c) 2009, 2010 by the mingw-w64 project
|
||||
|
||||
See the AUTHORS file for the list of contributors to the mingw-w64 project.
|
||||
|
||||
This license has been certified as open source. It has also been designated
|
||||
as GPL compatible by the Free Software Foundation (FSF).
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions in source code must retain the accompanying copyright
|
||||
notice, this list of conditions, and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the accompanying
|
||||
copyright notice, this list of conditions, and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
3. Names of the copyright holders must not be used to endorse or promote
|
||||
products derived from this software without prior written permission
|
||||
from the copyright holders.
|
||||
4. The right to distribute this software or to use it for any purpose does
|
||||
not give you the right to use Servicemarks (sm) or Trademarks (tm) of
|
||||
the copyright holders. Use of them is covered by separate agreement
|
||||
with the copyright holders.
|
||||
5. If any files are modified, you must cause the modified files to carry
|
||||
prominent notices stating that you changed the files and the date of
|
||||
any change.
|
||||
|
||||
Disclaimer
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
|
||||
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "../complex/complex_internal.h"
|
||||
#include <errno.h>
|
||||
|
||||
__FLT_TYPE
|
||||
__FLT_ABI (sqrt) (__FLT_TYPE x)
|
||||
{
|
||||
__FLT_TYPE res = __FLT_CST (0.0);
|
||||
int x_class = fpclassify (x);
|
||||
if (x_class == FP_NAN || signbit (x))
|
||||
{
|
||||
errno = EDOM;
|
||||
return (signbit (x) ? -__FLT_NAN : __FLT_NAN);
|
||||
}
|
||||
else if (x_class == FP_ZERO)
|
||||
return __FLT_CST (0.0);
|
||||
else if (x_class == FP_INFINITE)
|
||||
return __FLT_HUGE_VAL;
|
||||
else if (x == __FLT_CST (1.0))
|
||||
return __FLT_CST (1.0);
|
||||
asm ("fsqrt" : "=t" (res) : "0" (x));
|
||||
return res;
|
||||
}
|
@ -1,25 +1,46 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
#include <math.h>
|
||||
#include <errno.h>
|
||||
/*
|
||||
This Software is provided under the Zope Public License (ZPL) Version 2.1.
|
||||
|
||||
extern float __QNANF;
|
||||
Copyright (c) 2009, 2010 by the mingw-w64 project
|
||||
|
||||
float
|
||||
sqrtf (float x)
|
||||
{
|
||||
if (x < 0.0F )
|
||||
{
|
||||
errno = EDOM;
|
||||
return __QNANF;
|
||||
}
|
||||
else
|
||||
{
|
||||
float res = 0.0F;
|
||||
asm ("fsqrt" : "=t" (res) : "0" (x));
|
||||
return res;
|
||||
}
|
||||
}
|
||||
See the AUTHORS file for the list of contributors to the mingw-w64 project.
|
||||
|
||||
This license has been certified as open source. It has also been designated
|
||||
as GPL compatible by the Free Software Foundation (FSF).
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions in source code must retain the accompanying copyright
|
||||
notice, this list of conditions, and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the accompanying
|
||||
copyright notice, this list of conditions, and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
3. Names of the copyright holders must not be used to endorse or promote
|
||||
products derived from this software without prior written permission
|
||||
from the copyright holders.
|
||||
4. The right to distribute this software or to use it for any purpose does
|
||||
not give you the right to use Servicemarks (sm) or Trademarks (tm) of
|
||||
the copyright holders. Use of them is covered by separate agreement
|
||||
with the copyright holders.
|
||||
5. If any files are modified, you must cause the modified files to carry
|
||||
prominent notices stating that you changed the files and the date of
|
||||
any change.
|
||||
|
||||
Disclaimer
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
|
||||
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _NEW_COMPLEX_FLOAT 1
|
||||
#include "sqrt.def.h"
|
||||
|
@ -1,25 +1,46 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
#include <math.h>
|
||||
#include <errno.h>
|
||||
/*
|
||||
This Software is provided under the Zope Public License (ZPL) Version 2.1.
|
||||
|
||||
extern long double __QNANL;
|
||||
Copyright (c) 2009, 2010 by the mingw-w64 project
|
||||
|
||||
long double
|
||||
sqrtl (long double x)
|
||||
{
|
||||
if (x < 0.0L )
|
||||
{
|
||||
errno = EDOM;
|
||||
return __QNANL;
|
||||
}
|
||||
else
|
||||
{
|
||||
long double res = 0.0L;
|
||||
asm ("fsqrt" : "=t" (res) : "0" (x));
|
||||
return res;
|
||||
}
|
||||
}
|
||||
See the AUTHORS file for the list of contributors to the mingw-w64 project.
|
||||
|
||||
This license has been certified as open source. It has also been designated
|
||||
as GPL compatible by the Free Software Foundation (FSF).
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions in source code must retain the accompanying copyright
|
||||
notice, this list of conditions, and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the accompanying
|
||||
copyright notice, this list of conditions, and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
3. Names of the copyright holders must not be used to endorse or promote
|
||||
products derived from this software without prior written permission
|
||||
from the copyright holders.
|
||||
4. The right to distribute this software or to use it for any purpose does
|
||||
not give you the right to use Servicemarks (sm) or Trademarks (tm) of
|
||||
the copyright holders. Use of them is covered by separate agreement
|
||||
with the copyright holders.
|
||||
5. If any files are modified, you must cause the modified files to carry
|
||||
prominent notices stating that you changed the files and the date of
|
||||
any change.
|
||||
|
||||
Disclaimer
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
|
||||
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _NEW_COMPLEX_LDOUBLE 1
|
||||
#include "sqrt.def.h"
|
||||
|
Loading…
Reference in New Issue
Block a user