Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/sys/linux/cmath')
-rw-r--r--newlib/libc/sys/linux/cmath/Makefile.am28
-rw-r--r--newlib/libc/sys/linux/cmath/Makefile.in390
-rw-r--r--newlib/libc/sys/linux/cmath/math_private.h356
-rw-r--r--newlib/libc/sys/linux/cmath/s_cacos.c42
-rw-r--r--newlib/libc/sys/linux/cmath/s_cacosf.c38
-rw-r--r--newlib/libc/sys/linux/cmath/s_cacosh.c88
-rw-r--r--newlib/libc/sys/linux/cmath/s_cacoshf.c98
-rw-r--r--newlib/libc/sys/linux/cmath/s_cacoshl.c84
-rw-r--r--newlib/libc/sys/linux/cmath/s_cacosl.c38
-rw-r--r--newlib/libc/sys/linux/cmath/s_casin.c66
-rw-r--r--newlib/libc/sys/linux/cmath/s_casinf.c63
-rw-r--r--newlib/libc/sys/linux/cmath/s_casinh.c84
-rw-r--r--newlib/libc/sys/linux/cmath/s_casinhf.c80
-rw-r--r--newlib/libc/sys/linux/cmath/s_casinhl.c80
-rw-r--r--newlib/libc/sys/linux/cmath/s_casinl.c62
-rw-r--r--newlib/libc/sys/linux/cmath/s_catan.c89
-rw-r--r--newlib/libc/sys/linux/cmath/s_catanf.c85
-rw-r--r--newlib/libc/sys/linux/cmath/s_catanh.c84
-rw-r--r--newlib/libc/sys/linux/cmath/s_catanhf.c80
-rw-r--r--newlib/libc/sys/linux/cmath/s_catanhl.c80
-rw-r--r--newlib/libc/sys/linux/cmath/s_catanl.c85
-rw-r--r--newlib/libc/sys/linux/cmath/s_cbrtl.c15
-rw-r--r--newlib/libc/sys/linux/cmath/s_ccos.c80
-rw-r--r--newlib/libc/sys/linux/cmath/s_ccosf.c76
-rw-r--r--newlib/libc/sys/linux/cmath/s_ccosh.c105
-rw-r--r--newlib/libc/sys/linux/cmath/s_ccoshf.c101
-rw-r--r--newlib/libc/sys/linux/cmath/s_ccoshl.c101
-rw-r--r--newlib/libc/sys/linux/cmath/s_ccosl.c76
-rw-r--r--newlib/libc/sys/linux/cmath/s_cexp.c127
-rw-r--r--newlib/libc/sys/linux/cmath/s_cexpf.c123
-rw-r--r--newlib/libc/sys/linux/cmath/s_cexpl.c123
-rw-r--r--newlib/libc/sys/linux/cmath/s_clog.c65
-rw-r--r--newlib/libc/sys/linux/cmath/s_clog10.c65
-rw-r--r--newlib/libc/sys/linux/cmath/s_clog10f.c61
-rw-r--r--newlib/libc/sys/linux/cmath/s_clog10l.c61
-rw-r--r--newlib/libc/sys/linux/cmath/s_clogf.c61
-rw-r--r--newlib/libc/sys/linux/cmath/s_clogl.c61
-rw-r--r--newlib/libc/sys/linux/cmath/s_cpow.c34
-rw-r--r--newlib/libc/sys/linux/cmath/s_cpowf.c30
-rw-r--r--newlib/libc/sys/linux/cmath/s_cpowl.c30
-rw-r--r--newlib/libc/sys/linux/cmath/s_cproj.c51
-rw-r--r--newlib/libc/sys/linux/cmath/s_cprojf.c47
-rw-r--r--newlib/libc/sys/linux/cmath/s_cprojl.c48
-rw-r--r--newlib/libc/sys/linux/cmath/s_csin.c131
-rw-r--r--newlib/libc/sys/linux/cmath/s_csinf.c127
-rw-r--r--newlib/libc/sys/linux/cmath/s_csinh.c126
-rw-r--r--newlib/libc/sys/linux/cmath/s_csinhf.c122
-rw-r--r--newlib/libc/sys/linux/cmath/s_csinhl.c122
-rw-r--r--newlib/libc/sys/linux/cmath/s_csinl.c127
-rw-r--r--newlib/libc/sys/linux/cmath/s_csqrt.c114
-rw-r--r--newlib/libc/sys/linux/cmath/s_csqrtf.c110
-rw-r--r--newlib/libc/sys/linux/cmath/s_csqrtl.c110
-rw-r--r--newlib/libc/sys/linux/cmath/s_ctan.c74
-rw-r--r--newlib/libc/sys/linux/cmath/s_ctanf.c70
-rw-r--r--newlib/libc/sys/linux/cmath/s_ctanh.c74
-rw-r--r--newlib/libc/sys/linux/cmath/s_ctanhf.c70
-rw-r--r--newlib/libc/sys/linux/cmath/s_ctanhl.c70
-rw-r--r--newlib/libc/sys/linux/cmath/s_ctanl.c70
58 files changed, 0 insertions, 5158 deletions
diff --git a/newlib/libc/sys/linux/cmath/Makefile.am b/newlib/libc/sys/linux/cmath/Makefile.am
deleted file mode 100644
index 6c47f2149..000000000
--- a/newlib/libc/sys/linux/cmath/Makefile.am
+++ /dev/null
@@ -1,28 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = -I$(srcdir)/../include $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-LIB_SOURCES = \
- s_cacos.c s_casinf.c s_catanh.c s_ccosh.c s_clog.c s_cpowf.c s_csinh.c s_ctan.c \
- s_cacosf.c s_casinh.c s_catanhf.c s_ccoshf.c s_clog10.c s_csinhf.c s_ctanf.c \
- s_cacosh.c s_casinhf.c s_clog10f.c s_cproj.c s_ctanh.c \
- s_cacoshf.c s_cprojf.c s_ctanhf.c \
- s_cexp.c s_clogf.c s_csqrt.c \
- s_catan.c s_ccos.c s_cexpf.c s_csin.c s_csqrtf.c \
- s_casin.c s_catanf.c s_ccosf.c s_cpow.c s_csinf.c
-
-libcmath_la_LDFLAGS = -Xcompiler -nostdlib
-
-if USE_LIBTOOL
-noinst_LTLIBRARIES = libcmath.la
-libcmath_la_SOURCES = $(LIB_SOURCES)
-noinst_DATA = objectlist.awk.in
-else
-noinst_LIBRARIES = lib.a
-lib_a_SOURCES = $(LIB_SOURCES)
-noinst_DATA =
-endif # USE_LIBTOOL
-
-include $(srcdir)/../../../../Makefile.shared
diff --git a/newlib/libc/sys/linux/cmath/Makefile.in b/newlib/libc/sys/linux/cmath/Makefile.in
deleted file mode 100644
index fee3d914d..000000000
--- a/newlib/libc/sys/linux/cmath/Makefile.in
+++ /dev/null
@@ -1,390 +0,0 @@
-# Makefile.in generated automatically by automake 1.4 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = ..
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-AWK = @AWK@
-CC = @CC@
-CPP = @CPP@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-DLLTOOL = @DLLTOOL@
-EXEEXT = @EXEEXT@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBTOOL = @LIBTOOL@
-LINUX_MACH_LIB = @LINUX_MACH_LIB@
-LN_S = @LN_S@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-STRIP = @STRIP@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = -I$(srcdir)/../include $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-LIB_SOURCES = \
- s_cacos.c s_casinf.c s_catanh.c s_ccosh.c s_clog.c s_cpowf.c s_csinh.c s_ctan.c \
- s_cacosf.c s_casinh.c s_catanhf.c s_ccoshf.c s_clog10.c s_csinhf.c s_ctanf.c \
- s_cacosh.c s_casinhf.c s_clog10f.c s_cproj.c s_ctanh.c \
- s_cacoshf.c s_cprojf.c s_ctanhf.c \
- s_cexp.c s_clogf.c s_csqrt.c \
- s_catan.c s_ccos.c s_cexpf.c s_csin.c s_csqrtf.c \
- s_casin.c s_catanf.c s_ccosf.c s_cpow.c s_csinf.c
-
-
-libcmath_la_LDFLAGS = -Xcompiler -nostdlib
-
-@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = @USE_LIBTOOL_TRUE@libcmath.la
-@USE_LIBTOOL_TRUE@libcmath_la_SOURCES = @USE_LIBTOOL_TRUE@$(LIB_SOURCES)
-@USE_LIBTOOL_TRUE@noinst_DATA = @USE_LIBTOOL_TRUE@objectlist.awk.in
-@USE_LIBTOOL_FALSE@noinst_DATA =
-@USE_LIBTOOL_FALSE@noinst_LIBRARIES = @USE_LIBTOOL_FALSE@lib.a
-@USE_LIBTOOL_FALSE@lib_a_SOURCES = @USE_LIBTOOL_FALSE@$(LIB_SOURCES)
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-@USE_LIBTOOL_FALSE@lib_a_OBJECTS = s_cacos.$(OBJEXT) s_casinf.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_catanh.$(OBJEXT) s_ccosh.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_clog.$(OBJEXT) s_cpowf.$(OBJEXT) s_csinh.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_ctan.$(OBJEXT) s_cacosf.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_casinh.$(OBJEXT) s_catanhf.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_ccoshf.$(OBJEXT) s_clog10.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_csinhf.$(OBJEXT) s_ctanf.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_cacosh.$(OBJEXT) s_casinhf.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_clog10f.$(OBJEXT) s_cproj.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_ctanh.$(OBJEXT) s_cacoshf.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_cprojf.$(OBJEXT) s_ctanhf.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_cexp.$(OBJEXT) s_clogf.$(OBJEXT) s_csqrt.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_catan.$(OBJEXT) s_ccos.$(OBJEXT) s_cexpf.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_csin.$(OBJEXT) s_csqrtf.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_casin.$(OBJEXT) s_catanf.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_ccosf.$(OBJEXT) s_cpow.$(OBJEXT) s_csinf.$(OBJEXT)
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-
-libcmath_la_LIBADD =
-@USE_LIBTOOL_TRUE@libcmath_la_OBJECTS = s_cacos.lo s_casinf.lo \
-@USE_LIBTOOL_TRUE@s_catanh.lo s_ccosh.lo s_clog.lo s_cpowf.lo \
-@USE_LIBTOOL_TRUE@s_csinh.lo s_ctan.lo s_cacosf.lo s_casinh.lo \
-@USE_LIBTOOL_TRUE@s_catanhf.lo s_ccoshf.lo s_clog10.lo s_csinhf.lo \
-@USE_LIBTOOL_TRUE@s_ctanf.lo s_cacosh.lo s_casinhf.lo s_clog10f.lo \
-@USE_LIBTOOL_TRUE@s_cproj.lo s_ctanh.lo s_cacoshf.lo s_cprojf.lo \
-@USE_LIBTOOL_TRUE@s_ctanhf.lo s_cexp.lo s_clogf.lo s_csqrt.lo \
-@USE_LIBTOOL_TRUE@s_catan.lo s_ccos.lo s_cexpf.lo s_csin.lo s_csqrtf.lo \
-@USE_LIBTOOL_TRUE@s_casin.lo s_catanf.lo s_ccosf.lo s_cpow.lo \
-@USE_LIBTOOL_TRUE@s_csinf.lo
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DATA = $(noinst_DATA)
-
-DIST_COMMON = Makefile.am Makefile.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES) $(libcmath_la_SOURCES)
-OBJECTS = $(lib_a_OBJECTS) $(libcmath_la_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .obj .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/../../../../Makefile.shared
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus cmath/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
- -rm -f *.$(OBJEXT)
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
-
-maintainer-clean-libtool:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-mostlyclean-noinstLTLIBRARIES:
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-
-distclean-noinstLTLIBRARIES:
-
-maintainer-clean-noinstLTLIBRARIES:
-
-libcmath.la: $(libcmath_la_OBJECTS) $(libcmath_la_DEPENDENCIES)
- $(LINK) $(libcmath_la_LDFLAGS) $(libcmath_la_OBJECTS) $(libcmath_la_LIBADD) $(LIBS)
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = cmath
-
-distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-libtool mostlyclean-noinstLTLIBRARIES \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-libtool \
- clean-noinstLTLIBRARIES clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-libtool distclean-noinstLTLIBRARIES \
- distclean-tags distclean-generic clean-am
- -rm -f libtool
-
-distclean: distclean-am
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-noinstLTLIBRARIES \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool mostlyclean-noinstLTLIBRARIES \
-distclean-noinstLTLIBRARIES clean-noinstLTLIBRARIES \
-maintainer-clean-noinstLTLIBRARIES tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-objectlist.awk.in: $(noinst_LTLIBRARIES)
- -rm -f objectlist.awk.in
- for i in `ls *.lo` ; \
- do \
- echo $$i `pwd`/$$i >> objectlist.awk.in ; \
- done
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/linux/cmath/math_private.h b/newlib/libc/sys/linux/cmath/math_private.h
deleted file mode 100644
index 6c4a472cf..000000000
--- a/newlib/libc/sys/linux/cmath/math_private.h
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-/*
- * from: @(#)fdlibm.h 5.1 93/09/24
- * $Id$
- */
-
-#ifndef _MATH_PRIVATE_H_
-#define _MATH_PRIVATE_H_
-
-#include <endian.h>
-#include <sys/types.h>
-#include <machine/weakalias.h>
-#include <machine/huge_val.h>
-
-#define INFINITY HUGE_VALF
-
-#define __nan(x) nan()
-#define __isnan isnan
-#define __isinf isinf
-#define __copysignf copysignf
-#define __copysign copysign
-#define __isnanf isnanf
-#define __isinff isinff
-#define __nanf(x) nanf()
-#define feraiseexcept(x) /* nothing */
-#define __sincos sincos
-#define __sincosf sincosf
-
-int __signbitd (double x);
-int __signbitf (float x);
-
-/* The original fdlibm code used statements like:
- n0 = ((*(int*)&one)>>29)^1; * index of high word *
- ix0 = *(n0+(int*)&x); * high word of x *
- ix1 = *((1-n0)+(int*)&x); * low word of x *
- to dig two 32 bit words out of the 64 bit IEEE floating point
- value. That is non-ANSI, and, moreover, the gcc instruction
- scheduler gets it wrong. We instead use the following macros.
- Unlike the original code, we determine the endianness at compile
- time, not at run time; I don't see much benefit to selecting
- endianness at run time. */
-
-/* A union which permits us to convert between a double and two 32 bit
- ints. */
-
-#if __FLOAT_WORD_ORDER == BIG_ENDIAN
-
-typedef union
-{
- double value;
- struct
- {
- u_int32_t msw;
- u_int32_t lsw;
- } parts;
-} ieee_double_shape_type;
-
-#endif
-
-#if __FLOAT_WORD_ORDER == LITTLE_ENDIAN
-
-typedef union
-{
- double value;
- struct
- {
- u_int32_t lsw;
- u_int32_t msw;
- } parts;
-} ieee_double_shape_type;
-
-#endif
-
-/* Get two 32 bit ints from a double. */
-
-#define EXTRACT_WORDS(ix0,ix1,d) \
-do { \
- ieee_double_shape_type ew_u; \
- ew_u.value = (d); \
- (ix0) = ew_u.parts.msw; \
- (ix1) = ew_u.parts.lsw; \
-} while (0)
-
-/* Get the more significant 32 bit int from a double. */
-
-#define GET_HIGH_WORD(i,d) \
-do { \
- ieee_double_shape_type gh_u; \
- gh_u.value = (d); \
- (i) = gh_u.parts.msw; \
-} while (0)
-
-/* Get the less significant 32 bit int from a double. */
-
-#define GET_LOW_WORD(i,d) \
-do { \
- ieee_double_shape_type gl_u; \
- gl_u.value = (d); \
- (i) = gl_u.parts.lsw; \
-} while (0)
-
-/* Set a double from two 32 bit ints. */
-
-#define INSERT_WORDS(d,ix0,ix1) \
-do { \
- ieee_double_shape_type iw_u; \
- iw_u.parts.msw = (ix0); \
- iw_u.parts.lsw = (ix1); \
- (d) = iw_u.value; \
-} while (0)
-
-/* Set the more significant 32 bits of a double from an int. */
-
-#define SET_HIGH_WORD(d,v) \
-do { \
- ieee_double_shape_type sh_u; \
- sh_u.value = (d); \
- sh_u.parts.msw = (v); \
- (d) = sh_u.value; \
-} while (0)
-
-/* Set the less significant 32 bits of a double from an int. */
-
-#define SET_LOW_WORD(d,v) \
-do { \
- ieee_double_shape_type sl_u; \
- sl_u.value = (d); \
- sl_u.parts.lsw = (v); \
- (d) = sl_u.value; \
-} while (0)
-
-/* A union which permits us to convert between a float and a 32 bit
- int. */
-
-typedef union
-{
- float value;
- u_int32_t word;
-} ieee_float_shape_type;
-
-/* Get a 32 bit int from a float. */
-
-#define GET_FLOAT_WORD(i,d) \
-do { \
- ieee_float_shape_type gf_u; \
- gf_u.value = (d); \
- (i) = gf_u.word; \
-} while (0)
-
-/* Set a float from a 32 bit int. */
-
-#define SET_FLOAT_WORD(d,i) \
-do { \
- ieee_float_shape_type sf_u; \
- sf_u.word = (i); \
- (d) = sf_u.value; \
-} while (0)
-
-#if 0
-/* ieee style elementary functions */
-extern double __ieee754_sqrt (double);
-extern double __ieee754_acos (double);
-extern double __ieee754_acosh (double);
-extern double __ieee754_log (double);
-extern double __ieee754_atanh (double);
-extern double __ieee754_asin (double);
-extern double __ieee754_atan2 (double,double);
-extern double __ieee754_exp (double);
-extern double __ieee754_exp2 (double);
-extern double __ieee754_exp10 (double);
-extern double __ieee754_cosh (double);
-extern double __ieee754_fmod (double,double);
-extern double __ieee754_pow (double,double);
-extern double __ieee754_lgamma_r (double,int *);
-extern double __ieee754_gamma_r (double,int *);
-extern double __ieee754_lgamma (double);
-extern double __ieee754_gamma (double);
-extern double __ieee754_log10 (double);
-extern double __ieee754_log2 (double);
-extern double __ieee754_sinh (double);
-extern double __ieee754_hypot (double,double);
-extern double __ieee754_j0 (double);
-extern double __ieee754_j1 (double);
-extern double __ieee754_y0 (double);
-extern double __ieee754_y1 (double);
-extern double __ieee754_jn (int,double);
-extern double __ieee754_yn (int,double);
-extern double __ieee754_remainder (double,double);
-extern int32_t __ieee754_rem_pio2 (double,double*);
-extern double __ieee754_scalb (double,double);
-#endif
-
-/* This is necessary because the hardware accelerated version of libm
- does not provide the __ieee754 functions. */
-#define __ieee754_sinh sinh
-#define __ieee754_hypot hypot
-#define __ieee754_hypotf hypotf
-#define __ieee754_logf logf
-#define __ieee754_log10 log10
-#define __ieee754_exp exp
-#define __ieee754_cosh cosh
-#define __ieee754_expf expf
-#define __ieee754_log10f log10f
-#define __ieee754_atan2 atan2
-#define __ieee754_sqrtf sqrtf
-#define __ieee754_sinhf sinhf
-#define __ieee754_log log
-#define __ieee754_sqrt sqrt
-#define __ieee754_coshf coshf
-#define __ieee754_atan2f atan2f
-
-/* fdlibm kernel function */
-extern double __kernel_standard (double,double,int);
-extern double __kernel_sin (double,double,int);
-extern double __kernel_cos (double,double);
-extern double __kernel_tan (double,double,int);
-extern int __kernel_rem_pio2 (double*,double*,int,int,int, const int32_t*);
-
-/* internal functions. */
-extern double __copysign (double x, double __y);
-
-
-/* ieee style elementary float functions */
-extern float __ieee754_sqrtf (float);
-extern float __ieee754_acosf (float);
-extern float __ieee754_acoshf (float);
-extern float __ieee754_logf (float);
-extern float __ieee754_atanhf (float);
-extern float __ieee754_asinf (float);
-extern float __ieee754_atan2f (float,float);
-extern float __ieee754_expf (float);
-extern float __ieee754_exp2f (float);
-extern float __ieee754_exp10f (float);
-extern float __ieee754_coshf (float);
-extern float __ieee754_fmodf (float,float);
-extern float __ieee754_powf (float,float);
-extern float __ieee754_lgammaf_r (float,int *);
-extern float __ieee754_gammaf_r (float,int *);
-extern float __ieee754_lgammaf (float);
-extern float __ieee754_gammaf (float);
-extern float __ieee754_log10f (float);
-extern float __ieee754_log2f (float);
-extern float __ieee754_sinhf (float);
-extern float __ieee754_hypotf (float,float);
-extern float __ieee754_j0f (float);
-extern float __ieee754_j1f (float);
-extern float __ieee754_y0f (float);
-extern float __ieee754_y1f (float);
-extern float __ieee754_jnf (int,float);
-extern float __ieee754_ynf (int,float);
-extern float __ieee754_remainderf (float,float);
-extern int32_t __ieee754_rem_pio2f (float,float*);
-extern float __ieee754_scalbf (float,float);
-
-
-/* float versions of fdlibm kernel functions */
-extern float __kernel_sinf (float,float,int);
-extern float __kernel_cosf (float,float);
-extern float __kernel_tanf (float,float,int);
-extern int __kernel_rem_pio2f (float*,float*,int,int,int, const int32_t*);
-
-
-/* ieee style elementary long double functions */
-extern long double __ieee754_sqrtl (long double);
-extern long double __ieee754_acosl (long double);
-extern long double __ieee754_acoshl (long double);
-extern long double __ieee754_logl (long double);
-extern long double __ieee754_atanhl (long double);
-extern long double __ieee754_asinl (long double);
-extern long double __ieee754_atan2l (long double,long double);
-extern long double __ieee754_expl (long double);
-extern long double __ieee754_exp2l (long double);
-extern long double __ieee754_exp10l (long double);
-extern long double __ieee754_coshl (long double);
-extern long double __ieee754_fmodl (long double,long double);
-extern long double __ieee754_powl (long double,long double);
-extern long double __ieee754_lgammal_r (long double,int *);
-extern long double __ieee754_gammal_r (long double,int *);
-extern long double __ieee754_lgammal (long double);
-extern long double __ieee754_gammal (long double);
-extern long double __ieee754_log10l (long double);
-extern long double __ieee754_log2l (long double);
-extern long double __ieee754_sinhl (long double);
-extern long double __ieee754_hypotl (long double,long double);
-extern long double __ieee754_j0l (long double);
-extern long double __ieee754_j1l (long double);
-extern long double __ieee754_y0l (long double);
-extern long double __ieee754_y1l (long double);
-extern long double __ieee754_jnl (int,long double);
-extern long double __ieee754_ynl (int,long double);
-extern long double __ieee754_remainderl (long double,long double);
-extern int __ieee754_rem_pio2l (long double,long double*);
-extern long double __ieee754_scalbl (long double,long double);
-
-/* long double versions of fdlibm kernel functions */
-extern long double __kernel_sinl (long double,long double,int);
-extern long double __kernel_cosl (long double,long double);
-extern long double __kernel_tanl (long double,long double,int);
-extern void __kernel_sincosl (long double,long double,
- long double *,long double *, int);
-extern int __kernel_rem_pio2l (long double*,long double*,int,int,
- int,const int*);
-
-#ifndef NO_LONG_DOUBLE
-/* prototypes required to compile the ldbl-96 support without warnings */
-extern int __finitel (long double);
-extern int __ilogbl (long double);
-extern int __isinfl (long double);
-extern int __isnanl (long double);
-extern long double __atanl (long double);
-extern long double __copysignl (long double, long double);
-extern long double __expm1l (long double);
-extern long double __floorl (long double);
-extern long double __frexpl (long double, int *);
-extern long double __ldexpl (long double, int);
-extern long double __log1pl (long double);
-extern long double __nanl (const char *);
-extern long double __rintl (long double);
-extern long double __scalbnl (long double, int);
-extern long double __sqrtl (long double x);
-extern long double fabsl (long double x);
-extern void __sincosl (long double, long double *, long double *);
-extern long double __logbl (long double x);
-extern long double __significandl (long double x);
-#endif
-
-/* Prototypes for functions of the IBM Accurate Mathematical Library. */
-extern double __exp1 (double __x, double __xx, double __error);
-extern double __sin (double __x);
-extern double __cos (double __x);
-extern int __branred (double __x, double *__a, double *__aa);
-extern void __doasin (double __x, double __dx, double __v[]);
-extern void __dubsin (double __x, double __dx, double __v[]);
-extern void __dubcos (double __x, double __dx, double __v[]);
-extern double __halfulp (double __x, double __y);
-extern double __sin32 (double __x, double __res, double __res1);
-extern double __cos32 (double __x, double __res, double __res1);
-extern double __mpsin (double __x, double __dx);
-extern double __mpcos (double __x, double __dx);
-extern double __mpsin1 (double __x);
-extern double __mpcos1 (double __x);
-extern double __slowexp (double __x);
-extern double __slowpow (double __x, double __y, double __z);
-extern void __docos (double __x, double __dx, double __v[]);
-
-#endif /* _MATH_PRIVATE_H_ */
diff --git a/newlib/libc/sys/linux/cmath/s_cacos.c b/newlib/libc/sys/linux/cmath/s_cacos.c
deleted file mode 100644
index f9864472b..000000000
--- a/newlib/libc/sys/linux/cmath/s_cacos.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Return cosine of complex double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ double
-__cacos (__complex__ double x)
-{
- __complex__ double y;
- __complex__ double res;
-
- y = __casin (x);
-
- __real__ res = (double) M_PI_2 - __real__ y;
- __imag__ res = -__imag__ y;
-
- return res;
-}
-weak_alias (__cacos, cacos)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cacos, __cacosl)
-weak_alias (__cacos, cacosl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_cacosf.c b/newlib/libc/sys/linux/cmath/s_cacosf.c
deleted file mode 100644
index bf01890ad..000000000
--- a/newlib/libc/sys/linux/cmath/s_cacosf.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Return cosine of complex float value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ float
-__cacosf (__complex__ float x)
-{
- __complex__ float y;
- __complex__ float res;
-
- y = __casinf (x);
-
- __real__ res = (float) M_PI_2 - __real__ y;
- __imag__ res = -__imag__ y;
-
- return res;
-}
-weak_alias (__cacosf, cacosf)
diff --git a/newlib/libc/sys/linux/cmath/s_cacosh.c b/newlib/libc/sys/linux/cmath/s_cacosh.c
deleted file mode 100644
index 6ca3426b5..000000000
--- a/newlib/libc/sys/linux/cmath/s_cacosh.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/* Return arc hyperbole cosine for double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ double
-__cacosh (__complex__ double x)
-{
- __complex__ double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = HUGE_VAL;
-
- if (rcls == FP_NAN)
- __imag__ res = __nan ("");
- else
- __imag__ res = __copysign ((rcls == FP_INFINITE
- ? (__real__ x < 0.0
- ? M_PI - M_PI_4 : M_PI_4)
- : M_PI_2), __imag__ x);
- }
- else if (rcls == FP_INFINITE)
- {
- __real__ res = HUGE_VAL;
-
- if (icls >= FP_ZERO)
- __imag__ res = __copysign (signbit (__real__ x) ? M_PI : 0.0,
- __imag__ x);
- else
- __imag__ res = __nan ("");
- }
- else
- {
- __real__ res = __nan ("");
- __imag__ res = __nan ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- __real__ res = 0.0;
- __imag__ res = __copysign (M_PI_2, __imag__ x);
- }
- else
- {
- __complex__ double y;
-
- __real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) - 1.0;
- __imag__ y = 2.0 * __real__ x * __imag__ x;
-
- y = __csqrt (y);
-
- __real__ y += __real__ x;
- __imag__ y += __imag__ x;
-
- res = __clog (y);
- }
-
- return res;
-}
-weak_alias (__cacosh, cacosh)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cacosh, __cacoshl)
-weak_alias (__cacosh, cacoshl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_cacoshf.c b/newlib/libc/sys/linux/cmath/s_cacoshf.c
deleted file mode 100644
index 69054cde3..000000000
--- a/newlib/libc/sys/linux/cmath/s_cacoshf.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/* Return arc hyperbole cosine for float value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ float
-__cacoshf (__complex__ float x)
-{
- __complex__ float res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = HUGE_VALF;
-
- if (rcls == FP_NAN)
- __imag__ res = __nanf ("");
- else
- __imag__ res = __copysignf ((rcls == FP_INFINITE
- ? (__real__ x < 0.0
- ? M_PI - M_PI_4 : M_PI_4)
- : M_PI_2), __imag__ x);
- }
- else if (rcls == FP_INFINITE)
- {
- __real__ res = HUGE_VALF;
-
- if (icls >= FP_ZERO)
- __imag__ res = __copysignf (signbit (__real__ x) ? M_PI : 0.0,
- __imag__ x);
- else
- __imag__ res = __nanf ("");
- }
- else
- {
- __real__ res = __nanf ("");
- __imag__ res = __nanf ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- __real__ res = 0.0;
- __imag__ res = __copysignf (M_PI_2, __imag__ x);
- }
- else
- {
-#if 1
- __complex__ float y;
-
- __real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) - 1.0;
- __imag__ y = 2.0 * __real__ x * __imag__ x;
-
- y = __csqrtf (y);
-
- __real__ y += __real__ x;
- __imag__ y += __imag__ x;
-
- res = __clogf (y);
-#else
- float re2 = __real__ x * __real__ x;
- float im2 = __imag__ x * __imag__ x;
- float sq = re2 - im2 - 1.0;
- float ro = __ieee754_sqrtf (sq * sq + 4 * re2 * im2);
- float a = __ieee754_sqrtf ((sq + ro) / 2.0);
- float b = __ieee754_sqrtf ((-sq + ro) / 2.0);
-
- __real__ res = 0.5 * __ieee754_logf (re2 + __real__ x * 2 * a
- + im2 + __imag__ x * 2 * b
- + ro);
- __imag__ res = __ieee754_atan2f (__imag__ x + b, __real__ x + a);
-#endif
- }
-
- return res;
-}
-weak_alias (__cacoshf, cacoshf)
diff --git a/newlib/libc/sys/linux/cmath/s_cacoshl.c b/newlib/libc/sys/linux/cmath/s_cacoshl.c
deleted file mode 100644
index 3d0cd7f2a..000000000
--- a/newlib/libc/sys/linux/cmath/s_cacoshl.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Return arc hyperbole cosine for long double value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ long double
-__cacoshl (__complex__ long double x)
-{
- __complex__ long double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = HUGE_VALL;
-
- if (rcls == FP_NAN)
- __imag__ res = __nanl ("");
- else
- __imag__ res = __copysignl ((rcls == FP_INFINITE
- ? (__real__ x < 0.0
- ? M_PIl - M_PI_4l : M_PI_4l)
- : M_PI_2l), __imag__ x);
- }
- else if (rcls == FP_INFINITE)
- {
- __real__ res = HUGE_VALL;
-
- if (icls >= FP_ZERO)
- __imag__ res = __copysignl (signbit (__real__ x) ? M_PIl : 0.0,
- __imag__ x);
- else
- __imag__ res = __nanl ("");
- }
- else
- {
- __real__ res = __nanl ("");
- __imag__ res = __nanl ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- __real__ res = 0.0;
- __imag__ res = __copysignl (M_PI_2l, __imag__ x);
- }
- else
- {
- __complex__ long double y;
-
- __real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) - 1.0;
- __imag__ y = 2.0 * __real__ x * __imag__ x;
-
- y = __csqrtl (y);
-
- __real__ y += __real__ x;
- __imag__ y += __imag__ x;
-
- res = __clogl (y);
- }
-
- return res;
-}
-weak_alias (__cacoshl, cacoshl)
diff --git a/newlib/libc/sys/linux/cmath/s_cacosl.c b/newlib/libc/sys/linux/cmath/s_cacosl.c
deleted file mode 100644
index d4bbfec87..000000000
--- a/newlib/libc/sys/linux/cmath/s_cacosl.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Return cosine of complex long double value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ long double
-__cacosl (__complex__ long double x)
-{
- __complex__ long double y;
- __complex__ long double res;
-
- y = __casinl (x);
-
- __real__ res = M_PI_2l - __real__ y;
- __imag__ res = -__imag__ y;
-
- return res;
-}
-weak_alias (__cacosl, cacosl)
diff --git a/newlib/libc/sys/linux/cmath/s_casin.c b/newlib/libc/sys/linux/cmath/s_casin.c
deleted file mode 100644
index 4c164b534..000000000
--- a/newlib/libc/sys/linux/cmath/s_casin.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Return arc sine of complex double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ double
-__casin (__complex__ double x)
-{
- __complex__ double res;
-
- if (isnan (__real__ x) || isnan (__imag__ x))
- {
- if (__real__ x == 0.0)
- {
- res = x;
- }
- else if (__isinf (__real__ x) || __isinf (__imag__ x))
- {
- __real__ res = __nan ("");
- __imag__ res = __copysign (HUGE_VAL, __imag__ x);
- }
- else
- {
- __real__ res = __nan ("");
- __imag__ res = __nan ("");
- }
- }
- else
- {
- __complex__ double y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- y = __casinh (y);
-
- __real__ res = __imag__ y;
- __imag__ res = -__real__ y;
- }
-
- return res;
-}
-weak_alias (__casin, casin)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__casin, __casinl)
-weak_alias (__casin, casinl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_casinf.c b/newlib/libc/sys/linux/cmath/s_casinf.c
deleted file mode 100644
index 09e52b400..000000000
--- a/newlib/libc/sys/linux/cmath/s_casinf.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Return arc sine of complex float value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-
-__complex__ float
-__casinf (__complex__ float x)
-{
- __complex__ float res;
-
- if (isnan (__real__ x) || isnan (__imag__ x))
- {
- if (__real__ x == 0.0)
- {
- res = x;
- }
- else if (__isinff (__real__ x) || __isinff (__imag__ x))
- {
- __real__ res = __nanf ("");
- __imag__ res = __copysignf (HUGE_VALF, __imag__ x);
- }
- else
- {
- __real__ res = __nanf ("");
- __imag__ res = __nanf ("");
- }
- }
- else
- {
- __complex__ float y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- y = __casinhf (y);
-
- __real__ res = __imag__ y;
- __imag__ res = -__real__ y;
- }
-
- return res;
-}
-weak_alias (__casinf, casinf)
diff --git a/newlib/libc/sys/linux/cmath/s_casinh.c b/newlib/libc/sys/linux/cmath/s_casinh.c
deleted file mode 100644
index 30b9dbb18..000000000
--- a/newlib/libc/sys/linux/cmath/s_casinh.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Return arc hyperbole sine for double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ double
-__casinh (__complex__ double x)
-{
- __complex__ double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = __copysign (HUGE_VAL, __real__ x);
-
- if (rcls == FP_NAN)
- __imag__ res = __nan ("");
- else
- __imag__ res = __copysign (rcls >= FP_ZERO ? M_PI_2 : M_PI_4,
- __imag__ x);
- }
- else if (rcls <= FP_INFINITE)
- {
- __real__ res = __real__ x;
- if ((rcls == FP_INFINITE && icls >= FP_ZERO)
- || (rcls == FP_NAN && icls == FP_ZERO))
- __imag__ res = __copysign (0.0, __imag__ x);
- else
- __imag__ res = __nan ("");
- }
- else
- {
- __real__ res = __nan ("");
- __imag__ res = __nan ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- res = x;
- }
- else
- {
- __complex__ double y;
-
- __real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) + 1.0;
- __imag__ y = 2.0 * __real__ x * __imag__ x;
-
- y = __csqrt (y);
-
- __real__ y += __real__ x;
- __imag__ y += __imag__ x;
-
- res = __clog (y);
- }
-
- return res;
-}
-weak_alias (__casinh, casinh)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__casinh, __casinhl)
-weak_alias (__casinh, casinhl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_casinhf.c b/newlib/libc/sys/linux/cmath/s_casinhf.c
deleted file mode 100644
index f9fc4e73c..000000000
--- a/newlib/libc/sys/linux/cmath/s_casinhf.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Return arc hyperbole sine for float value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ float
-__casinhf (__complex__ float x)
-{
- __complex__ float res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = __copysignf (HUGE_VALF, __real__ x);
-
- if (rcls == FP_NAN)
- __imag__ res = __nanf ("");
- else
- __imag__ res = __copysignf (rcls >= FP_ZERO ? M_PI_2 : M_PI_4,
- __imag__ x);
- }
- else if (rcls <= FP_INFINITE)
- {
- __real__ res = __real__ x;
- if ((rcls == FP_INFINITE && icls >= FP_ZERO)
- || (rcls == FP_NAN && icls == FP_ZERO))
- __imag__ res = __copysignf (0.0, __imag__ x);
- else
- __imag__ res = __nanf ("");
- }
- else
- {
- __real__ res = __nanf ("");
- __imag__ res = __nanf ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- res = x;
- }
- else
- {
- __complex__ float y;
-
- __real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) + 1.0;
- __imag__ y = 2.0 * __real__ x * __imag__ x;
-
- y = __csqrtf (y);
-
- __real__ y += __real__ x;
- __imag__ y += __imag__ x;
-
- res = __clogf (y);
- }
-
- return res;
-}
-weak_alias (__casinhf, casinhf)
diff --git a/newlib/libc/sys/linux/cmath/s_casinhl.c b/newlib/libc/sys/linux/cmath/s_casinhl.c
deleted file mode 100644
index b48c60932..000000000
--- a/newlib/libc/sys/linux/cmath/s_casinhl.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Return arc hyperbole sine for long double value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ long double
-__casinhl (__complex__ long double x)
-{
- __complex__ long double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = __copysignl (HUGE_VALL, __real__ x);
-
- if (rcls == FP_NAN)
- __imag__ res = __nanl ("");
- else
- __imag__ res = __copysignl (rcls >= FP_ZERO ? M_PI_2l : M_PI_4l,
- __imag__ x);
- }
- else if (rcls <= FP_INFINITE)
- {
- __real__ res = __real__ x;
- if ((rcls == FP_INFINITE && icls >= FP_ZERO)
- || (rcls == FP_NAN && icls == FP_ZERO))
- __imag__ res = __copysignl (0.0, __imag__ x);
- else
- __imag__ res = __nanl ("");
- }
- else
- {
- __real__ res = __nanl ("");
- __imag__ res = __nanl ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- res = x;
- }
- else
- {
- __complex__ long double y;
-
- __real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) + 1.0;
- __imag__ y = 2.0 * __real__ x * __imag__ x;
-
- y = __csqrtl (y);
-
- __real__ y += __real__ x;
- __imag__ y += __imag__ x;
-
- res = __clogl (y);
- }
-
- return res;
-}
-weak_alias (__casinhl, casinhl)
diff --git a/newlib/libc/sys/linux/cmath/s_casinl.c b/newlib/libc/sys/linux/cmath/s_casinl.c
deleted file mode 100644
index d6b7a8087..000000000
--- a/newlib/libc/sys/linux/cmath/s_casinl.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Return arc sine of complex long double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ long double
-__casinl (__complex__ long double x)
-{
- __complex__ long double res;
-
- if (isnan (__real__ x) || isnan (__imag__ x))
- {
- if (__real__ x == 0.0)
- {
- res = x;
- }
- else if (__isinfl (__real__ x) || __isinfl (__imag__ x))
- {
- __real__ res = __nanl ("");
- __imag__ res = __copysignl (HUGE_VALL, __imag__ x);
- }
- else
- {
- __real__ res = __nanl ("");
- __imag__ res = __nanl ("");
- }
- }
- else
- {
- __complex__ long double y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- y = __casinhl (y);
-
- __real__ res = __imag__ y;
- __imag__ res = -__real__ y;
- }
-
- return res;
-}
-weak_alias (__casinl, casinl)
diff --git a/newlib/libc/sys/linux/cmath/s_catan.c b/newlib/libc/sys/linux/cmath/s_catan.c
deleted file mode 100644
index 1d0673ad6..000000000
--- a/newlib/libc/sys/linux/cmath/s_catan.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/* Return arc tangent of complex double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__catan (__complex__ double x)
-{
- __complex__ double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (rcls == FP_INFINITE)
- {
- __real__ res = __copysign (M_PI_2, __real__ x);
- __imag__ res = __copysign (0.0, __imag__ x);
- }
- else if (icls == FP_INFINITE)
- {
- if (rcls >= FP_ZERO)
- __real__ res = __copysign (M_PI_2, __real__ x);
- else
- __real__ res = __nan ("");
- __imag__ res = __copysign (0.0, __imag__ x);
- }
- else if (icls == FP_ZERO || icls == FP_INFINITE)
- {
- __real__ res = __nan ("");
- __imag__ res = __copysign (0.0, __imag__ x);
- }
- else
- {
- __real__ res = __nan ("");
- __imag__ res = __nan ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- res = x;
- }
- else
- {
- double r2, num, den;
-
- r2 = __real__ x * __real__ x;
-
- den = 1 - r2 - __imag__ x * __imag__ x;
-
- __real__ res = 0.5 * __ieee754_atan2 (2.0 * __real__ x, den);
-
- num = __imag__ x + 1.0;
- num = r2 + num * num;
-
- den = __imag__ x - 1.0;
- den = r2 + den * den;
-
- __imag__ res = 0.25 * __ieee754_log (num / den);
- }
-
- return res;
-}
-weak_alias (__catan, catan)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__catan, __catanl)
-weak_alias (__catan, catanl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_catanf.c b/newlib/libc/sys/linux/cmath/s_catanf.c
deleted file mode 100644
index cc9e5ea7a..000000000
--- a/newlib/libc/sys/linux/cmath/s_catanf.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Return arc tangent of complex float value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__catanf (__complex__ float x)
-{
- __complex__ float res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (rcls == FP_INFINITE)
- {
- __real__ res = __copysignf (M_PI_2, __real__ x);
- __imag__ res = __copysignf (0.0, __imag__ x);
- }
- else if (icls == FP_INFINITE)
- {
- if (rcls >= FP_ZERO)
- __real__ res = __copysignf (M_PI_2, __real__ x);
- else
- __real__ res = __nanf ("");
- __imag__ res = __copysignf (0.0, __imag__ x);
- }
- else if (icls == FP_ZERO || icls == FP_INFINITE)
- {
- __real__ res = __nanf ("");
- __imag__ res = __copysignf (0.0, __imag__ x);
- }
- else
- {
- __real__ res = __nanf ("");
- __imag__ res = __nanf ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- res = x;
- }
- else
- {
- float r2, num, den;
-
- r2 = __real__ x * __real__ x;
-
- den = 1 - r2 - __imag__ x * __imag__ x;
-
- __real__ res = 0.5 * __ieee754_atan2f (2.0 * __real__ x, den);
-
- num = __imag__ x + 1.0;
- num = r2 + num * num;
-
- den = __imag__ x - 1.0;
- den = r2 + den * den;
-
- __imag__ res = 0.25 * __ieee754_logf (num / den);
- }
-
- return res;
-}
-weak_alias (__catanf, catanf)
diff --git a/newlib/libc/sys/linux/cmath/s_catanh.c b/newlib/libc/sys/linux/cmath/s_catanh.c
deleted file mode 100644
index e15c073f9..000000000
--- a/newlib/libc/sys/linux/cmath/s_catanh.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Return arc hyperbole tangent for double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__catanh (__complex__ double x)
-{
- __complex__ double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = __copysign (0.0, __real__ x);
- __imag__ res = __copysign (M_PI_2, __imag__ x);
- }
- else if (rcls == FP_INFINITE || rcls == FP_ZERO)
- {
- __real__ res = __copysign (0.0, __real__ x);
- if (icls >= FP_ZERO)
- __imag__ res = __copysign (M_PI_2, __imag__ x);
- else
- __imag__ res = __nan ("");
- }
- else
- {
- __real__ res = __nan ("");
- __imag__ res = __nan ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- res = x;
- }
- else
- {
- double i2, num, den;
-
- i2 = __imag__ x * __imag__ x;
-
- num = 1.0 + __real__ x;
- num = i2 + num * num;
-
- den = 1.0 - __real__ x;
- den = i2 + den * den;
-
- __real__ res = 0.25 * (__ieee754_log (num) - __ieee754_log (den));
-
- den = 1 - __real__ x * __real__ x - i2;
-
- __imag__ res = 0.5 * __ieee754_atan2 (2.0 * __imag__ x, den);
- }
-
- return res;
-}
-weak_alias (__catanh, catanh)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__catanh, __catanhl)
-weak_alias (__catanh, catanhl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_catanhf.c b/newlib/libc/sys/linux/cmath/s_catanhf.c
deleted file mode 100644
index 30a5a1b8a..000000000
--- a/newlib/libc/sys/linux/cmath/s_catanhf.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Return arc hyperbole tangent for float value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__catanhf (__complex__ float x)
-{
- __complex__ float res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = __copysignf (0.0, __real__ x);
- __imag__ res = __copysignf (M_PI_2, __imag__ x);
- }
- else if (rcls == FP_INFINITE || rcls == FP_ZERO)
- {
- __real__ res = __copysignf (0.0, __real__ x);
- if (icls >= FP_ZERO)
- __imag__ res = __copysignf (M_PI_2, __imag__ x);
- else
- __imag__ res = __nanf ("");
- }
- else
- {
- __real__ res = __nanf ("");
- __imag__ res = __nanf ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- res = x;
- }
- else
- {
- float i2, num, den;
-
- i2 = __imag__ x * __imag__ x;
-
- num = 1.0 + __real__ x;
- num = i2 + num * num;
-
- den = 1.0 - __real__ x;
- den = i2 + den * den;
-
- __real__ res = 0.25 * (__ieee754_logf (num) - __ieee754_logf (den));
-
- den = 1 - __real__ x * __real__ x - i2;
-
- __imag__ res = 0.5 * __ieee754_atan2f (2.0 * __imag__ x, den);
- }
-
- return res;
-}
-weak_alias (__catanhf, catanhf)
diff --git a/newlib/libc/sys/linux/cmath/s_catanhl.c b/newlib/libc/sys/linux/cmath/s_catanhl.c
deleted file mode 100644
index c3fb0ce5f..000000000
--- a/newlib/libc/sys/linux/cmath/s_catanhl.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Return arc hyperbole tangent for long double value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__catanhl (__complex__ long double x)
-{
- __complex__ long double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = __copysignl (0.0, __real__ x);
- __imag__ res = __copysignl (M_PI_2l, __imag__ x);
- }
- else if (rcls == FP_INFINITE || rcls == FP_ZERO)
- {
- __real__ res = __copysignl (0.0, __real__ x);
- if (icls >= FP_ZERO)
- __imag__ res = __copysignl (M_PI_2l, __imag__ x);
- else
- __imag__ res = __nanl ("");
- }
- else
- {
- __real__ res = __nanl ("");
- __imag__ res = __nanl ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- res = x;
- }
- else
- {
- long double i2, num, den;
-
- i2 = __imag__ x * __imag__ x;
-
- num = 1.0 + __real__ x;
- num = i2 + num * num;
-
- den = 1.0 - __real__ x;
- den = i2 + den * den;
-
- __real__ res = 0.25 * (__ieee754_logl (num) - __ieee754_logl (den));
-
- den = 1 - __real__ x * __real__ x - i2;
-
- __imag__ res = 0.5 * __ieee754_atan2l (2.0 * __imag__ x, den);
- }
-
- return res;
-}
-weak_alias (__catanhl, catanhl)
diff --git a/newlib/libc/sys/linux/cmath/s_catanl.c b/newlib/libc/sys/linux/cmath/s_catanl.c
deleted file mode 100644
index 6cb45e5be..000000000
--- a/newlib/libc/sys/linux/cmath/s_catanl.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Return arc tangent of complex long double value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__catanl (__complex__ long double x)
-{
- __complex__ long double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (rcls == FP_INFINITE)
- {
- __real__ res = __copysignl (M_PI_2l, __real__ x);
- __imag__ res = __copysignl (0.0, __imag__ x);
- }
- else if (icls == FP_INFINITE)
- {
- if (rcls >= FP_ZERO)
- __real__ res = __copysignl (M_PI_2l, __real__ x);
- else
- __real__ res = __nanl ("");
- __imag__ res = __copysignl (0.0, __imag__ x);
- }
- else if (icls == FP_ZERO || icls == FP_INFINITE)
- {
- __real__ res = __nanl ("");
- __imag__ res = __copysignl (0.0, __imag__ x);
- }
- else
- {
- __real__ res = __nanl ("");
- __imag__ res = __nanl ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- res = x;
- }
- else
- {
- long double r2, num, den;
-
- r2 = __real__ x * __real__ x;
-
- den = 1 - r2 - __imag__ x * __imag__ x;
-
- __real__ res = 0.5 * __ieee754_atan2l (2.0 * __real__ x, den);
-
- num = __imag__ x + 1.0;
- num = r2 + num * num;
-
- den = __imag__ x - 1.0;
- den = r2 + den * den;
-
- __imag__ res = 0.25 * __ieee754_logl (num / den);
- }
-
- return res;
-}
-weak_alias (__catanl, catanl)
diff --git a/newlib/libc/sys/linux/cmath/s_cbrtl.c b/newlib/libc/sys/linux/cmath/s_cbrtl.c
deleted file mode 100644
index d668e377a..000000000
--- a/newlib/libc/sys/linux/cmath/s_cbrtl.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <math.h>
-#include <stdio.h>
-#include <errno.h>
-
-long double
-__cbrtl(long double x)
-{
- fputs ("__cbrtl not implemented\n", stderr);
- __set_errno (ENOSYS);
- return 0.0;
-}
-
-weak_alias (__cbrtl, cbrtl)
-stub_warning (cbrtl)
-#include <stub-tag.h>
diff --git a/newlib/libc/sys/linux/cmath/s_ccos.c b/newlib/libc/sys/linux/cmath/s_ccos.c
deleted file mode 100644
index e65ea38a5..000000000
--- a/newlib/libc/sys/linux/cmath/s_ccos.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Return cosine of complex double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ double
-__ccos (__complex__ double x)
-{
- __complex__ double res;
-
- if (!isfinite (__real__ x) || __isnan (__imag__ x))
- {
- if (__real__ x == 0.0 || __imag__ x == 0.0)
- {
- __real__ res = __nan ("");
- __imag__ res = 0.0;
-
-#ifdef FE_INVALID
- if (__isinf (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else if (__isinf (__imag__ x))
- {
- __real__ res = HUGE_VAL;
- __imag__ res = __nan ("");
-
-#ifdef FE_INVALID
- if (__isinf (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ res = __nan ("");
- __imag__ res = __nan ("");
-
-#ifdef FE_INVALID
- if (isfinite (__imag__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __complex__ double y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- res = __ccosh (y);
- }
-
- return res;
-}
-weak_alias (__ccos, ccos)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__ccos, __ccosl)
-weak_alias (__ccos, ccosl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_ccosf.c b/newlib/libc/sys/linux/cmath/s_ccosf.c
deleted file mode 100644
index 016d8062b..000000000
--- a/newlib/libc/sys/linux/cmath/s_ccosf.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Return cosine of complex float value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ float
-__ccosf (__complex__ float x)
-{
- __complex__ float res;
-
- if (!isfinite (__real__ x) || __isnanf (__imag__ x))
- {
- if (__real__ x == 0.0 || __imag__ x == 0.0)
- {
- __real__ res = __nanf ("");
- __imag__ res = 0.0;
-
-#ifdef FE_INVALID
- if (__isinff (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else if (__isinff (__imag__ x))
- {
- __real__ res = HUGE_VALF;
- __imag__ res = __nanf ("");
-
-#ifdef FE_INVALID
- if (__isinff (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ res = __nanf ("");
- __imag__ res = __nanf ("");
-
-#ifdef FE_INVALID
- if (isfinite (__imag__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __complex__ float y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- res = __ccoshf (y);
- }
-
- return res;
-}
-weak_alias (__ccosf, ccosf)
diff --git a/newlib/libc/sys/linux/cmath/s_ccosh.c b/newlib/libc/sys/linux/cmath/s_ccosh.c
deleted file mode 100644
index f5b29db24..000000000
--- a/newlib/libc/sys/linux/cmath/s_ccosh.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/* Complex cosine hyperbole function for double.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__ccosh (__complex__ double x)
-{
- __complex__ double retval;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- double sinh_val = __ieee754_sinh (__real__ x);
- double cosh_val = __ieee754_cosh (__real__ x);
- double sinix, cosix;
-
- __sincos (__imag__ x, &sinix, &cosix);
-
- __real__ retval = cosh_val * cosix;
- __imag__ retval = sinh_val * sinix;
- }
- else
- {
- __imag__ retval = __real__ x == 0.0 ? 0.0 : __nan ("");
- __real__ retval = __nan ("") + __nan ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else if (rcls == FP_INFINITE)
- {
- /* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = HUGE_VAL;
- __imag__ retval = __imag__ x * __copysign (1.0, __real__ x);
- }
- else if (icls > FP_ZERO)
- {
- /* Imaginary part is finite. */
- double sinix, cosix;
-
- __sincos (__imag__ x, &sinix, &cosix);
-
- __real__ retval = __copysign (HUGE_VAL, cosix);
- __imag__ retval = (__copysign (HUGE_VAL, sinix)
- * __copysign (1.0, __real__ x));
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = HUGE_VAL;
- __imag__ retval = __nan ("") + __nan ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __real__ retval = __nan ("");
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : __nan ("");
- }
-
- return retval;
-}
-weak_alias (__ccosh, ccosh)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__ccosh, __ccoshl)
-weak_alias (__ccosh, ccoshl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_ccoshf.c b/newlib/libc/sys/linux/cmath/s_ccoshf.c
deleted file mode 100644
index 339b6bc1c..000000000
--- a/newlib/libc/sys/linux/cmath/s_ccoshf.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/* Complex cosine hyperbole function for float.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__ccoshf (__complex__ float x)
-{
- __complex__ float retval;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- float sinh_val = __ieee754_sinhf (__real__ x);
- float cosh_val = __ieee754_coshf (__real__ x);
- float sinix, cosix;
-
- __sincosf (__imag__ x, &sinix, &cosix);
-
- __real__ retval = cosh_val * cosix;
- __imag__ retval = sinh_val * sinix;
- }
- else
- {
- __imag__ retval = __real__ x == 0.0 ? 0.0 : __nanf ("");
- __real__ retval = __nanf ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else if (rcls == FP_INFINITE)
- {
- /* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = HUGE_VALF;
- __imag__ retval = __imag__ x * __copysignf (1.0, __real__ x);
- }
- else if (icls > FP_ZERO)
- {
- /* Imaginary part is finite. */
- float sinix, cosix;
-
- __sincosf (__imag__ x, &sinix, &cosix);
-
- __real__ retval = __copysignf (HUGE_VALF, cosix);
- __imag__ retval = (__copysignf (HUGE_VALF, sinix)
- * __copysignf (1.0, __real__ x));
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = HUGE_VALF;
- __imag__ retval = __nanf ("") + __nanf ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __real__ retval = __nanf ("");
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : __nanf ("");
- }
-
- return retval;
-}
-weak_alias (__ccoshf, ccoshf)
diff --git a/newlib/libc/sys/linux/cmath/s_ccoshl.c b/newlib/libc/sys/linux/cmath/s_ccoshl.c
deleted file mode 100644
index 61ffb49ca..000000000
--- a/newlib/libc/sys/linux/cmath/s_ccoshl.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/* Complex cosine hyperbole function for long double.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__ccoshl (__complex__ long double x)
-{
- __complex__ long double retval;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- long double sinh_val = __ieee754_sinhl (__real__ x);
- long double cosh_val = __ieee754_coshl (__real__ x);
- long double sinix, cosix;
-
- __sincosl (__imag__ x, &sinix, &cosix);
-
- __real__ retval = cosh_val * cosix;
- __imag__ retval = sinh_val * sinix;
- }
- else
- {
- __imag__ retval = __real__ x == 0.0 ? 0.0 : __nanl ("");
- __real__ retval = __nanl ("") + __nanl ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else if (rcls == FP_INFINITE)
- {
- /* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = HUGE_VALL;
- __imag__ retval = __imag__ x * __copysignl (1.0, __real__ x);
- }
- else if (icls > FP_ZERO)
- {
- /* Imaginary part is finite. */
- long double sinix, cosix;
-
- __sincosl (__imag__ x, &sinix, &cosix);
-
- __real__ retval = __copysignl (HUGE_VALL, cosix);
- __imag__ retval = (__copysignl (HUGE_VALL, sinix)
- * __copysignl (1.0, __real__ x));
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = HUGE_VALL;
- __imag__ retval = __nanl ("") + __nanl ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __real__ retval = __nanl ("");
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : __nanl ("");
- }
-
- return retval;
-}
-weak_alias (__ccoshl, ccoshl)
diff --git a/newlib/libc/sys/linux/cmath/s_ccosl.c b/newlib/libc/sys/linux/cmath/s_ccosl.c
deleted file mode 100644
index 4ebe2c347..000000000
--- a/newlib/libc/sys/linux/cmath/s_ccosl.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Return cosine of complex long double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-
-__complex__ long double
-__ccosl (__complex__ long double x)
-{
- __complex__ long double res;
-
- if (!isfinite (__real__ x) || __isnanl (__imag__ x))
- {
- if (__real__ x == 0.0 || __imag__ x == 0.0)
- {
- __real__ res = __nanl ("");
- __imag__ res = 0.0;
-
-#ifdef FE_INVALID
- if (__isinfl (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else if (__isinfl (__imag__ x))
- {
- __real__ res = HUGE_VALL;
- __imag__ res = __nanl ("");
-
-#ifdef FE_INVALID
- if (__isinfl (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ res = __nanl ("");
- __imag__ res = __nanl ("");
-
-#ifdef FE_INVALID
- if (isfinite (__imag__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __complex__ long double y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- res = __ccoshl (y);
- }
-
- return res;
-}
-weak_alias (__ccosl, ccosl)
diff --git a/newlib/libc/sys/linux/cmath/s_cexp.c b/newlib/libc/sys/linux/cmath/s_cexp.c
deleted file mode 100644
index 5a299b768..000000000
--- a/newlib/libc/sys/linux/cmath/s_cexp.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/* Return value of complex exponential function for double complex value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__cexp (__complex__ double x)
-{
- __complex__ double retval;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- double exp_val = __ieee754_exp (__real__ x);
- double sinix, cosix;
-
- __sincos (__imag__ x, &sinix, &cosix);
-
- if (isfinite (exp_val))
- {
- __real__ retval = exp_val * cosix;
- __imag__ retval = exp_val * sinix;
- }
- else
- {
- __real__ retval = __copysign (exp_val, cosix);
- __imag__ retval = __copysign (exp_val, sinix);
- }
- }
- else
- {
- /* If the imaginary part is +-inf or NaN and the real part
- is not +-inf the result is NaN + iNaN. */
- __real__ retval = __nan ("");
- __imag__ retval = __nan ("");
-
-#ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else if (rcls == FP_INFINITE)
- {
- /* Real part is infinite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- double value = signbit (__real__ x) ? 0.0 : HUGE_VAL;
-
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = value;
- __imag__ retval = __imag__ x;
- }
- else
- {
- double sinix, cosix;
-
- __sincos (__imag__ x, &sinix, &cosix);
-
- __real__ retval = __copysign (value, cosix);
- __imag__ retval = __copysign (value, sinix);
- }
- }
- else if (signbit (__real__ x) == 0)
- {
- __real__ retval = HUGE_VAL;
- __imag__ retval = __nan ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ retval = 0.0;
- __imag__ retval = __copysign (0.0, __imag__ x);
- }
- }
- else
- {
- /* If the real part is NaN the result is NaN + iNaN. */
- __real__ retval = __nan ("");
- __imag__ retval = __nan ("");
-
-#ifdef FE_INVALID
- if (rcls != FP_NAN || icls != FP_NAN)
- feraiseexcept (FE_INVALID);
-#endif
- }
-
- return retval;
-}
-weak_alias (__cexp, cexp)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cexp, __cexpl)
-weak_alias (__cexp, cexpl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_cexpf.c b/newlib/libc/sys/linux/cmath/s_cexpf.c
deleted file mode 100644
index 93bfe2049..000000000
--- a/newlib/libc/sys/linux/cmath/s_cexpf.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/* Return value of complex exponential function for float complex value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__cexpf (__complex__ float x)
-{
- __complex__ float retval;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- float exp_val = __ieee754_expf (__real__ x);
- float sinix, cosix;
-
- __sincosf (__imag__ x, &sinix, &cosix);
-
- if (isfinite (exp_val))
- {
- __real__ retval = exp_val * cosix;
- __imag__ retval = exp_val * sinix;
- }
- else
- {
- __real__ retval = __copysignf (exp_val, cosix);
- __imag__ retval = __copysignf (exp_val, sinix);
- }
- }
- else
- {
- /* If the imaginary part is +-inf or NaN and the real part
- is not +-inf the result is NaN + iNaN. */
- __real__ retval = __nanf ("");
- __imag__ retval = __nanf ("");
-
-#ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else if (rcls == FP_INFINITE)
- {
- /* Real part is infinite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- float value = signbit (__real__ x) ? 0.0 : HUGE_VALF;
-
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = value;
- __imag__ retval = __imag__ x;
- }
- else
- {
- float sinix, cosix;
-
- __sincosf (__imag__ x, &sinix, &cosix);
-
- __real__ retval = __copysignf (value, cosix);
- __imag__ retval = __copysignf (value, sinix);
- }
- }
- else if (signbit (__real__ x) == 0)
- {
- __real__ retval = HUGE_VALF;
- __imag__ retval = __nanf ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ retval = 0.0;
- __imag__ retval = __copysignf (0.0, __imag__ x);
- }
- }
- else
- {
- /* If the real part is NaN the result is NaN + iNaN. */
- __real__ retval = __nanf ("");
- __imag__ retval = __nanf ("");
-
-#ifdef FE_INVALID
- if (rcls != FP_NAN || icls != FP_NAN)
- feraiseexcept (FE_INVALID);
-#endif
- }
-
- return retval;
-}
-weak_alias (__cexpf, cexpf)
diff --git a/newlib/libc/sys/linux/cmath/s_cexpl.c b/newlib/libc/sys/linux/cmath/s_cexpl.c
deleted file mode 100644
index cf6bc974a..000000000
--- a/newlib/libc/sys/linux/cmath/s_cexpl.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/* Return value of complex exponential function for long double complex value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__cexpl (__complex__ long double x)
-{
- __complex__ long double retval;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- long double exp_val = __ieee754_expl (__real__ x);
- long double sinix, cosix;
-
- __sincosl (__imag__ x, &sinix, &cosix);
-
- if (isfinite (exp_val))
- {
- __real__ retval = exp_val * cosix;
- __imag__ retval = exp_val * sinix;
- }
- else
- {
- __real__ retval = __copysignl (exp_val, cosix);
- __imag__ retval = __copysignl (exp_val, sinix);
- }
- }
- else
- {
- /* If the imaginary part is +-inf or NaN and the real part
- is not +-inf the result is NaN + iNaN. */
- __real__ retval = __nanl ("");
- __imag__ retval = __nanl ("");
-
-#ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else if (rcls == FP_INFINITE)
- {
- /* Real part is infinite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- long double value = signbit (__real__ x) ? 0.0 : HUGE_VALL;
-
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = value;
- __imag__ retval = __imag__ x;
- }
- else
- {
- long double sinix, cosix;
-
- __sincosl (__imag__ x, &sinix, &cosix);
-
- __real__ retval = __copysignl (value, cosix);
- __imag__ retval = __copysignl (value, sinix);
- }
- }
- else if (signbit (__real__ x) == 0)
- {
- __real__ retval = HUGE_VALL;
- __imag__ retval = __nanl ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ retval = 0.0;
- __imag__ retval = __copysignl (0.0, __imag__ x);
- }
- }
- else
- {
- /* If the real part is NaN the result is NaN + iNaN. */
- __real__ retval = __nanl ("");
- __imag__ retval = __nanl ("");
-
-#ifdef FE_INVALID
- if (rcls != FP_NAN || icls != FP_NAN)
- feraiseexcept (FE_INVALID);
-#endif
- }
-
- return retval;
-}
-weak_alias (__cexpl, cexpl)
diff --git a/newlib/libc/sys/linux/cmath/s_clog.c b/newlib/libc/sys/linux/cmath/s_clog.c
deleted file mode 100644
index f796024b4..000000000
--- a/newlib/libc/sys/linux/cmath/s_clog.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Compute complex natural logarithm.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__clog (__complex__ double x)
-{
- __complex__ double result;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- /* Real and imaginary part are 0.0. */
- __imag__ result = signbit (__real__ x) ? M_PI : 0.0;
- __imag__ result = __copysign (__imag__ result, __imag__ x);
- /* Yes, the following line raises an exception. */
- __real__ result = -1.0 / fabs (__real__ x);
- }
- else if (rcls != FP_NAN && icls != FP_NAN)
- {
- /* Neither real nor imaginary part is NaN. */
- __real__ result = __ieee754_log (__ieee754_hypot (__real__ x,
- __imag__ x));
- __imag__ result = __ieee754_atan2 (__imag__ x, __real__ x);
- }
- else
- {
- __imag__ result = __nan ("");
- if (rcls == FP_INFINITE || icls == FP_INFINITE)
- /* Real or imaginary part is infinite. */
- __real__ result = HUGE_VAL;
- else
- __real__ result = __nan ("");
- }
-
- return result;
-}
-weak_alias (__clog, clog)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__clog, __clogl)
-weak_alias (__clog, clogl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_clog10.c b/newlib/libc/sys/linux/cmath/s_clog10.c
deleted file mode 100644
index 62c2ca724..000000000
--- a/newlib/libc/sys/linux/cmath/s_clog10.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Compute complex base 10 logarithm.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__clog10 (__complex__ double x)
-{
- __complex__ double result;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- /* Real and imaginary part are 0.0. */
- __imag__ result = signbit (__real__ x) ? M_PI : 0.0;
- __imag__ result = __copysign (__imag__ result, __imag__ x);
- /* Yes, the following line raises an exception. */
- __real__ result = -1.0 / fabs (__real__ x);
- }
- else if (rcls != FP_NAN && icls != FP_NAN)
- {
- /* Neither real nor imaginary part is NaN. */
- __real__ result = __ieee754_log10 (__ieee754_hypot (__real__ x,
- __imag__ x));
- __imag__ result = M_LOG10E * __ieee754_atan2 (__imag__ x, __real__ x);
- }
- else
- {
- __imag__ result = __nan ("");
- if (rcls == FP_INFINITE || icls == FP_INFINITE)
- /* Real or imaginary part is infinite. */
- __real__ result = HUGE_VAL;
- else
- __real__ result = __nan ("");
- }
-
- return result;
-}
-weak_alias (__clog10, clog10)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__clog10, __clog10l)
-weak_alias (__clog10, clog10l)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_clog10f.c b/newlib/libc/sys/linux/cmath/s_clog10f.c
deleted file mode 100644
index 6d60c5fc2..000000000
--- a/newlib/libc/sys/linux/cmath/s_clog10f.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Compute complex base 10 logarithm.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__clog10f (__complex__ float x)
-{
- __complex__ float result;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- /* Real and imaginary part are 0.0. */
- __imag__ result = signbit (__real__ x) ? M_PI : 0.0;
- __imag__ result = __copysignf (__imag__ result, __imag__ x);
- /* Yes, the following line raises an exception. */
- __real__ result = -1.0 / fabsf (__real__ x);
- }
- else if (rcls != FP_NAN && icls != FP_NAN)
- {
- /* Neither real nor imaginary part is NaN. */
- __real__ result = __ieee754_log10f (__ieee754_hypotf (__real__ x,
- __imag__ x));
- __imag__ result = M_LOG10E * __ieee754_atan2f (__imag__ x, __real__ x);
- }
- else
- {
- __imag__ result = __nanf ("");
- if (rcls == FP_INFINITE || icls == FP_INFINITE)
- /* Real or imaginary part is infinite. */
- __real__ result = HUGE_VALF;
- else
- __real__ result = __nanf ("");
- }
-
- return result;
-}
-weak_alias (__clog10f, clog10f)
diff --git a/newlib/libc/sys/linux/cmath/s_clog10l.c b/newlib/libc/sys/linux/cmath/s_clog10l.c
deleted file mode 100644
index f901543d0..000000000
--- a/newlib/libc/sys/linux/cmath/s_clog10l.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Compute complex base 10 logarithm.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__clog10l (__complex__ long double x)
-{
- __complex__ long double result;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- /* Real and imaginary part are 0.0. */
- __imag__ result = signbit (__real__ x) ? M_PIl : 0.0;
- __imag__ result = __copysignl (__imag__ result, __imag__ x);
- /* Yes, the following line raises an exception. */
- __real__ result = -1.0 / fabsl (__real__ x);
- }
- else if (rcls != FP_NAN && icls != FP_NAN)
- {
- /* Neither real nor imaginary part is NaN. */
- __real__ result = __ieee754_log10l (__ieee754_hypotl (__real__ x,
- __imag__ x));
- __imag__ result = M_LOG10El * __ieee754_atan2l (__imag__ x, __real__ x);
- }
- else
- {
- __imag__ result = __nanl ("");
- if (rcls == FP_INFINITE || icls == FP_INFINITE)
- /* Real or imaginary part is infinite. */
- __real__ result = HUGE_VALL;
- else
- __real__ result = __nanl ("");
- }
-
- return result;
-}
-weak_alias (__clog10l, clog10l)
diff --git a/newlib/libc/sys/linux/cmath/s_clogf.c b/newlib/libc/sys/linux/cmath/s_clogf.c
deleted file mode 100644
index c7151f2e5..000000000
--- a/newlib/libc/sys/linux/cmath/s_clogf.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Compute complex natural logarithm.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__clogf (__complex__ float x)
-{
- __complex__ float result;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- /* Real and imaginary part are 0.0. */
- __imag__ result = signbit (__real__ x) ? M_PI : 0.0;
- __imag__ result = __copysignf (__imag__ result, __imag__ x);
- /* Yes, the following line raises an exception. */
- __real__ result = -1.0 / fabsf (__real__ x);
- }
- else if (rcls != FP_NAN && icls != FP_NAN)
- {
- /* Neither real nor imaginary part is NaN. */
- __real__ result = __ieee754_logf (__ieee754_hypotf (__real__ x,
- __imag__ x));
- __imag__ result = __ieee754_atan2f (__imag__ x, __real__ x);
- }
- else
- {
- __imag__ result = __nanf ("");
- if (rcls == FP_INFINITE || icls == FP_INFINITE)
- /* Real or imaginary part is infinite. */
- __real__ result = HUGE_VALF;
- else
- __real__ result = __nanf ("");
- }
-
- return result;
-}
-weak_alias (__clogf, clogf)
diff --git a/newlib/libc/sys/linux/cmath/s_clogl.c b/newlib/libc/sys/linux/cmath/s_clogl.c
deleted file mode 100644
index 43118f768..000000000
--- a/newlib/libc/sys/linux/cmath/s_clogl.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Compute complex natural logarithm.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__clogl (__complex__ long double x)
-{
- __complex__ long double result;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- /* Real and imaginary part are 0.0. */
- __imag__ result = signbit (__real__ x) ? M_PIl : 0.0;
- __imag__ result = __copysignl (__imag__ result, __imag__ x);
- /* Yes, the following line raises an exception. */
- __real__ result = -1.0 / fabsl (__real__ x);
- }
- else if (rcls != FP_NAN && icls != FP_NAN)
- {
- /* Neither real nor imaginary part is NaN. */
- __real__ result = __ieee754_logl (__ieee754_hypotl (__real__ x,
- __imag__ x));
- __imag__ result = __ieee754_atan2l (__imag__ x, __real__ x);
- }
- else
- {
- __imag__ result = __nanl ("");
- if (rcls == FP_INFINITE || icls == FP_INFINITE)
- /* Real or imaginary part is infinite. */
- __real__ result = HUGE_VALL;
- else
- __real__ result = __nanl ("");
- }
-
- return result;
-}
-weak_alias (__clogl, clogl)
diff --git a/newlib/libc/sys/linux/cmath/s_cpow.c b/newlib/libc/sys/linux/cmath/s_cpow.c
deleted file mode 100644
index 9018a8a65..000000000
--- a/newlib/libc/sys/linux/cmath/s_cpow.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Complex power of double values.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ double
-__cpow (__complex__ double x, __complex__ double c)
-{
- return __cexp (c * __clog (x));
-}
-weak_alias (__cpow, cpow)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cpow, __cpowl)
-weak_alias (__cpow, cpowl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_cpowf.c b/newlib/libc/sys/linux/cmath/s_cpowf.c
deleted file mode 100644
index b0c032422..000000000
--- a/newlib/libc/sys/linux/cmath/s_cpowf.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Complex power of float values.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ float
-__cpowf (__complex__ float x, __complex__ float c)
-{
- return __cexpf (c * __clogf (x));
-}
-weak_alias (__cpowf, cpowf)
diff --git a/newlib/libc/sys/linux/cmath/s_cpowl.c b/newlib/libc/sys/linux/cmath/s_cpowl.c
deleted file mode 100644
index 4c358b3eb..000000000
--- a/newlib/libc/sys/linux/cmath/s_cpowl.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Complex power of long double values.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-
-__complex__ long double
-__cpowl (__complex__ long double x, __complex__ long double c)
-{
- return __cexpl (c * __clogl (x));
-}
-weak_alias (__cpowl, cpowl)
diff --git a/newlib/libc/sys/linux/cmath/s_cproj.c b/newlib/libc/sys/linux/cmath/s_cproj.c
deleted file mode 100644
index 6c9e41704..000000000
--- a/newlib/libc/sys/linux/cmath/s_cproj.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Compute projection of complex double value to Riemann sphere.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ double
-__cproj (__complex__ double x)
-{
- __complex__ double res;
-
- if (isnan (__real__ x) && isnan (__imag__ x))
- return x;
- else if (!isfinite (__real__ x) || !isfinite (__imag__ x))
- {
- __real__ res = INFINITY;
- __imag__ res = __copysign (0.0, __imag__ x);
- }
- else
- {
- double den = __real__ x * __real__ x + __imag__ x * __imag__ x + 1.0;
-
- __real__ res = (2.0 * __real__ x) / den;
- __imag__ res = (2.0 * __imag__ x) / den;
- }
-
- return res;
-}
-weak_alias (__cproj, cproj)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cproj, __cprojl)
-weak_alias (__cproj, cprojl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_cprojf.c b/newlib/libc/sys/linux/cmath/s_cprojf.c
deleted file mode 100644
index a302078b5..000000000
--- a/newlib/libc/sys/linux/cmath/s_cprojf.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Compute projection of complex float value to Riemann sphere.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ float
-__cprojf (__complex__ float x)
-{
- __complex__ float res;
-
- if (isnan (__real__ x) && isnan (__imag__ x))
- return x;
- else if (!isfinite (__real__ x) || !isfinite (__imag__ x))
- {
- __real__ res = INFINITY;
- __imag__ res = __copysignf (0.0, __imag__ x);
- }
- else
- {
- float den = __real__ x * __real__ x + __imag__ x * __imag__ x + 1.0;
-
- __real__ res = (2.0 * __real__ x) / den;
- __imag__ res = (2.0 * __imag__ x) / den;
- }
-
- return res;
-}
-weak_alias (__cprojf, cprojf)
diff --git a/newlib/libc/sys/linux/cmath/s_cprojl.c b/newlib/libc/sys/linux/cmath/s_cprojl.c
deleted file mode 100644
index c70cdc47d..000000000
--- a/newlib/libc/sys/linux/cmath/s_cprojl.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Compute projection of complex long double value to Riemann sphere.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-
-__complex__ long double
-__cprojl (__complex__ long double x)
-{
- __complex__ long double res;
-
- if (isnan (__real__ x) && isnan (__imag__ x))
- return x;
- else if (!isfinite (__real__ x) || !isfinite (__imag__ x))
- {
- __real__ res = INFINITY;
- __imag__ res = __copysignl (0.0, __imag__ x);
- }
- else
- {
- long double den = (__real__ x * __real__ x + __imag__ x * __imag__ x
- + 1.0);
-
- __real__ res = (2.0 * __real__ x) / den;
- __imag__ res = (2.0 * __imag__ x) / den;
- }
-
- return res;
-}
-weak_alias (__cprojl, cprojl)
diff --git a/newlib/libc/sys/linux/cmath/s_csin.c b/newlib/libc/sys/linux/cmath/s_csin.c
deleted file mode 100644
index eb380e2c3..000000000
--- a/newlib/libc/sys/linux/cmath/s_csin.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/* Complex sine function for double.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__csin (__complex__ double x)
-{
- __complex__ double retval;
- int negate = signbit (__real__ x);
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- __real__ x = fabs (__real__ x);
-
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- double sinh_val = __ieee754_sinh (__imag__ x);
- double cosh_val = __ieee754_cosh (__imag__ x);
- double sinix, cosix;
-
- __sincos (__real__ x, &sinix, &cosix);
-
- __real__ retval = cosh_val * sinix;
- __imag__ retval = sinh_val * cosix;
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = __nan ("");
- __imag__ retval = __imag__ x;
-
-#ifdef FE_INVALID
- if (rcls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ retval = __nan ("");
- __imag__ retval = __nan ("");
-
-#ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- }
- else if (icls == FP_INFINITE)
- {
- /* Imaginary part is infinite. */
- if (rcls == FP_ZERO)
- {
- /* Real part is 0.0. */
- __real__ retval = __copysign (0.0, negate ? -1.0 : 1.0);
- __imag__ retval = __imag__ x;
- }
- else if (rcls > FP_ZERO)
- {
- /* Real part is finite. */
- double sinix, cosix;
-
- __sincos (__real__ x, &sinix, &cosix);
-
- __real__ retval = __copysign (HUGE_VAL, sinix);
- __imag__ retval = __copysign (HUGE_VAL, cosix);
-
- if (negate)
- __real__ retval = -__real__ retval;
- if (signbit (__imag__ x))
- __imag__ retval = -__imag__ retval;
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = __nan ("");
- __imag__ retval = HUGE_VAL;
-
-#ifdef FE_INVALID
- if (rcls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- if (rcls == FP_ZERO)
- __real__ retval = __copysign (0.0, negate ? -1.0 : 1.0);
- else
- __real__ retval = __nan ("");
- __imag__ retval = __nan ("");
- }
-
- return retval;
-}
-weak_alias (__csin, csin)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__csin, __csinl)
-weak_alias (__csin, csinl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_csinf.c b/newlib/libc/sys/linux/cmath/s_csinf.c
deleted file mode 100644
index b7278810d..000000000
--- a/newlib/libc/sys/linux/cmath/s_csinf.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/* Complex sine function for float.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__csinf (__complex__ float x)
-{
- __complex__ float retval;
- int negate = signbit (__real__ x);
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- __real__ x = fabsf (__real__ x);
-
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- float sinh_val = __ieee754_sinhf (__imag__ x);
- float cosh_val = __ieee754_coshf (__imag__ x);
- float sinix, cosix;
-
- __sincosf (__real__ x, &sinix, &cosix);
-
- __real__ retval = cosh_val * sinix;
- __imag__ retval = sinh_val * cosix;
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = __nanf ("");
- __imag__ retval = __imag__ x;
-
-#ifdef FE_INVALID
- if (rcls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ retval = __nanf ("");
- __imag__ retval = __nanf ("");
-
-#ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- }
- else if (icls == FP_INFINITE)
- {
- /* Imaginary part is infinite. */
- if (rcls == FP_ZERO)
- {
- /* Real part is 0.0. */
- __real__ retval = __copysignf (0.0, negate ? -1.0 : 1.0);
- __imag__ retval = __imag__ x;
- }
- else if (rcls > FP_ZERO)
- {
- /* Real part is finite. */
- float sinix, cosix;
-
- __sincosf (__real__ x, &sinix, &cosix);
-
- __real__ retval = __copysignf (HUGE_VALF, sinix);
- __imag__ retval = __copysignf (HUGE_VALF, cosix);
-
- if (negate)
- __real__ retval = -__real__ retval;
- if (signbit (__imag__ x))
- __imag__ retval = -__imag__ retval;
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = __nanf ("");
- __imag__ retval = HUGE_VALF;
-
-#ifdef FE_INVALID
- if (rcls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- if (rcls == FP_ZERO)
- __real__ retval = __copysignf (0.0, negate ? -1.0 : 1.0);
- else
- __real__ retval = __nanf ("");
- __imag__ retval = __nanf ("");
- }
-
- return retval;
-}
-weak_alias (__csinf, csinf)
diff --git a/newlib/libc/sys/linux/cmath/s_csinh.c b/newlib/libc/sys/linux/cmath/s_csinh.c
deleted file mode 100644
index f0e0cc61f..000000000
--- a/newlib/libc/sys/linux/cmath/s_csinh.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/* Complex sine hyperbole function for double.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__csinh (__complex__ double x)
-{
- __complex__ double retval;
- int negate = signbit (__real__ x);
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- __real__ x = fabs (__real__ x);
-
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- double sinh_val = __ieee754_sinh (__real__ x);
- double cosh_val = __ieee754_cosh (__real__ x);
- double sinix, cosix;
-
- __sincos (__imag__ x, &sinix, &cosix);
-
- __real__ retval = sinh_val * cosix;
- __imag__ retval = cosh_val * sinix;
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- if (rcls == FP_ZERO)
- {
- /* Real part is 0.0. */
- __real__ retval = __copysign (0.0, negate ? -1.0 : 1.0);
- __imag__ retval = __nan ("") + __nan ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ retval = __nan ("");
- __imag__ retval = __nan ("");
-
-#ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- }
- else if (rcls == FP_INFINITE)
- {
- /* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = negate ? -HUGE_VAL : HUGE_VAL;
- __imag__ retval = __imag__ x;
- }
- else if (icls > FP_ZERO)
- {
- /* Imaginary part is finite. */
- double sinix, cosix;
-
- __sincos (__imag__ x, &sinix, &cosix);
-
- __real__ retval = __copysign (HUGE_VAL, cosix);
- __imag__ retval = __copysign (HUGE_VAL, sinix);
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = HUGE_VAL;
- __imag__ retval = __nan ("") + __nan ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __real__ retval = __nan ("");
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : __nan ("");
- }
-
- return retval;
-}
-weak_alias (__csinh, csinh)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__csinh, __csinhl)
-weak_alias (__csinh, csinhl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_csinhf.c b/newlib/libc/sys/linux/cmath/s_csinhf.c
deleted file mode 100644
index 5cf80d0f9..000000000
--- a/newlib/libc/sys/linux/cmath/s_csinhf.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/* Complex sine hyperbole function for float.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__csinhf (__complex__ float x)
-{
- __complex__ float retval;
- int negate = signbit (__real__ x);
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- __real__ x = fabsf (__real__ x);
-
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- float sinh_val = __ieee754_sinhf (__real__ x);
- float cosh_val = __ieee754_coshf (__real__ x);
- float sinix, cosix;
-
- __sincosf (__imag__ x, &sinix, &cosix);
-
- __real__ retval = sinh_val * cosix;
- __imag__ retval = cosh_val * sinix;
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- if (rcls == FP_ZERO)
- {
- /* Real part is 0.0. */
- __real__ retval = __copysignf (0.0, negate ? -1.0 : 1.0);
- __imag__ retval = __nanf ("") + __nanf ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ retval = __nanf ("");
- __imag__ retval = __nanf ("");
-
-#ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- }
- else if (rcls == FP_INFINITE)
- {
- /* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = negate ? -HUGE_VALF : HUGE_VALF;
- __imag__ retval = __imag__ x;
- }
- else if (icls > FP_ZERO)
- {
- /* Imaginary part is finite. */
- float sinix, cosix;
-
- __sincosf (__imag__ x, &sinix, &cosix);
-
- __real__ retval = __copysignf (HUGE_VALF, cosix);
- __imag__ retval = __copysignf (HUGE_VALF, sinix);
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = HUGE_VALF;
- __imag__ retval = __nanf ("") + __nanf ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __real__ retval = __nanf ("");
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : __nanf ("");
- }
-
- return retval;
-}
-weak_alias (__csinhf, csinhf)
diff --git a/newlib/libc/sys/linux/cmath/s_csinhl.c b/newlib/libc/sys/linux/cmath/s_csinhl.c
deleted file mode 100644
index 226075634..000000000
--- a/newlib/libc/sys/linux/cmath/s_csinhl.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/* Complex sine hyperbole function for long double.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__csinhl (__complex__ long double x)
-{
- __complex__ long double retval;
- int negate = signbit (__real__ x);
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- __real__ x = fabsl (__real__ x);
-
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- long double sinh_val = __ieee754_sinhl (__real__ x);
- long double cosh_val = __ieee754_coshl (__real__ x);
- long double sinix, cosix;
-
- __sincosl (__imag__ x, &sinix, &cosix);
-
- __real__ retval = sinh_val * cosix;
- __imag__ retval = cosh_val * sinix;
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- if (rcls == FP_ZERO)
- {
- /* Real part is 0.0. */
- __real__ retval = __copysignl (0.0, negate ? -1.0 : 1.0);
- __imag__ retval = __nanl ("") + __nanl ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ retval = __nanl ("");
- __imag__ retval = __nanl ("");
-
-#ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- }
- else if (rcls == FP_INFINITE)
- {
- /* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = negate ? -HUGE_VALL : HUGE_VALL;
- __imag__ retval = __imag__ x;
- }
- else if (icls > FP_ZERO)
- {
- /* Imaginary part is finite. */
- long double sinix, cosix;
-
- __sincosl (__imag__ x, &sinix, &cosix);
-
- __real__ retval = __copysignl (HUGE_VALL, cosix);
- __imag__ retval = __copysignl (HUGE_VALL, sinix);
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = HUGE_VALL;
- __imag__ retval = __nanl ("") + __nanl ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __real__ retval = __nanl ("");
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : __nanl ("");
- }
-
- return retval;
-}
-weak_alias (__csinhl, csinhl)
diff --git a/newlib/libc/sys/linux/cmath/s_csinl.c b/newlib/libc/sys/linux/cmath/s_csinl.c
deleted file mode 100644
index f7a1c4360..000000000
--- a/newlib/libc/sys/linux/cmath/s_csinl.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/* Complex sine function for long double.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__csinl (__complex__ long double x)
-{
- __complex__ long double retval;
- int negate = signbit (__real__ x);
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- __real__ x = fabsl (__real__ x);
-
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- long double sinh_val = __ieee754_sinhl (__imag__ x);
- long double cosh_val = __ieee754_coshl (__imag__ x);
- long double sinix, cosix;
-
- __sincosl (__real__ x, &sinix, &cosix);
-
- __real__ retval = cosh_val * sinix;
- __imag__ retval = sinh_val * cosix;
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = __nanl ("");
- __imag__ retval = __imag__ x;
-
-#ifdef FE_INVALID
- if (rcls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ retval = __nanl ("");
- __imag__ retval = __nanl ("");
-
-#ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- }
- else if (icls == FP_INFINITE)
- {
- /* Imaginary part is infinite. */
- if (rcls == FP_ZERO)
- {
- /* Real part is 0.0. */
- __real__ retval = __copysignl (0.0, negate ? -1.0 : 1.0);
- __imag__ retval = __imag__ x;
- }
- else if (rcls > FP_ZERO)
- {
- /* Real part is finite. */
- long double sinix, cosix;
-
- __sincosl (__real__ x, &sinix, &cosix);
-
- __real__ retval = __copysignl (HUGE_VALL, sinix);
- __imag__ retval = __copysignl (HUGE_VALL, cosix);
-
- if (negate)
- __real__ retval = -__real__ retval;
- if (signbit (__imag__ x))
- __imag__ retval = -__imag__ retval;
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = __nanl ("");
- __imag__ retval = HUGE_VALL;
-
-#ifdef FE_INVALID
- if (rcls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- if (rcls == FP_ZERO)
- __real__ retval = __copysignl (0.0, negate ? -1.0 : 1.0);
- else
- __real__ retval = __nanl ("");
- __imag__ retval = __nanl ("");
- }
-
- return retval;
-}
-weak_alias (__csinl, csinl)
diff --git a/newlib/libc/sys/linux/cmath/s_csqrt.c b/newlib/libc/sys/linux/cmath/s_csqrt.c
deleted file mode 100644
index 0bb6690b1..000000000
--- a/newlib/libc/sys/linux/cmath/s_csqrt.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/* Complex square root of double value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Based on an algorithm by Stephen L. Moshier <moshier@world.std.com>.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__csqrt (__complex__ double x)
-{
- __complex__ double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = HUGE_VAL;
- __imag__ res = __imag__ x;
- }
- else if (rcls == FP_INFINITE)
- {
- if (__real__ x < 0.0)
- {
- __real__ res = icls == FP_NAN ? __nan ("") : 0;
- __imag__ res = __copysign (HUGE_VAL, __imag__ x);
- }
- else
- {
- __real__ res = __real__ x;
- __imag__ res = (icls == FP_NAN
- ? __nan ("") : __copysign (0.0, __imag__ x));
- }
- }
- else
- {
- __real__ res = __nan ("");
- __imag__ res = __nan ("");
- }
- }
- else
- {
- if (icls == FP_ZERO)
- {
- if (__real__ x < 0.0)
- {
- __real__ res = 0.0;
- __imag__ res = __copysign (__ieee754_sqrt (-__real__ x),
- __imag__ x);
- }
- else
- {
- __real__ res = fabs (__ieee754_sqrt (__real__ x));
- __imag__ res = __copysign (0.0, __imag__ x);
- }
- }
- else if (rcls == FP_ZERO)
- {
- double r = __ieee754_sqrt (0.5 * fabs (__imag__ x));
-
- __real__ res = __copysign (r, __imag__ x);
- __imag__ res = r;
- }
- else
- {
- double d, r, s;
-
- d = __ieee754_hypot (__real__ x, __imag__ x);
- /* Use the identity 2 Re res Im res = Im x
- to avoid cancellation error in d +/- Re x. */
- if (__real__ x > 0)
- {
- r = __ieee754_sqrt (0.5 * d + 0.5 * __real__ x);
- s = (0.5 * __imag__ x) / r;
- }
- else
- {
- s = __ieee754_sqrt (0.5 * d - 0.5 * __real__ x);
- r = fabs ((0.5 * __imag__ x) / s);
- }
-
- __real__ res = r;
- __imag__ res = __copysign (s, __imag__ x);
- }
- }
-
- return res;
-}
-weak_alias (__csqrt, csqrt)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__csqrt, __csqrtl)
-weak_alias (__csqrt, csqrtl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_csqrtf.c b/newlib/libc/sys/linux/cmath/s_csqrtf.c
deleted file mode 100644
index f7b18368b..000000000
--- a/newlib/libc/sys/linux/cmath/s_csqrtf.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/* Complex square root of float value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Based on an algorithm by Stephen L. Moshier <moshier@world.std.com>.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__csqrtf (__complex__ float x)
-{
- __complex__ float res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = HUGE_VALF;
- __imag__ res = __imag__ x;
- }
- else if (rcls == FP_INFINITE)
- {
- if (__real__ x < 0.0)
- {
- __real__ res = icls == FP_NAN ? __nanf ("") : 0;
- __imag__ res = __copysignf (HUGE_VALF, __imag__ x);
- }
- else
- {
- __real__ res = __real__ x;
- __imag__ res = (icls == FP_NAN
- ? __nanf ("") : __copysignf (0.0, __imag__ x));
- }
- }
- else
- {
- __real__ res = __nanf ("");
- __imag__ res = __nanf ("");
- }
- }
- else
- {
- if (icls == FP_ZERO)
- {
- if (__real__ x < 0.0)
- {
- __real__ res = 0.0;
- __imag__ res = __copysignf (__ieee754_sqrtf (-__real__ x),
- __imag__ x);
- }
- else
- {
- __real__ res = fabsf (__ieee754_sqrtf (__real__ x));
- __imag__ res = __copysignf (0.0, __imag__ x);
- }
- }
- else if (rcls == FP_ZERO)
- {
- float r = __ieee754_sqrtf (0.5 * fabsf (__imag__ x));
-
- __real__ res = __copysignf (r, __imag__ x);
- __imag__ res = r;
- }
- else
- {
- float d, r, s;
-
- d = __ieee754_hypotf (__real__ x, __imag__ x);
- /* Use the identity 2 Re res Im res = Im x
- to avoid cancellation error in d +/- Re x. */
- if (__real__ x > 0)
- {
- r = __ieee754_sqrtf (0.5f * d + 0.5f * __real__ x);
- s = (0.5f * __imag__ x) / r;
- }
- else
- {
- s = __ieee754_sqrtf (0.5f * d - 0.5f * __real__ x);
- r = fabsf ((0.5f * __imag__ x) / s);
- }
-
- __real__ res = r;
- __imag__ res = __copysignf (s, __imag__ x);
- }
- }
-
- return res;
-}
-weak_alias (__csqrtf, csqrtf)
diff --git a/newlib/libc/sys/linux/cmath/s_csqrtl.c b/newlib/libc/sys/linux/cmath/s_csqrtl.c
deleted file mode 100644
index 8e27750a0..000000000
--- a/newlib/libc/sys/linux/cmath/s_csqrtl.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/* Complex square root of long double value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Based on an algorithm by Stephen L. Moshier <moshier@world.std.com>.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__csqrtl (__complex__ long double x)
-{
- __complex__ long double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = HUGE_VALL;
- __imag__ res = __imag__ x;
- }
- else if (rcls == FP_INFINITE)
- {
- if (__real__ x < 0.0)
- {
- __real__ res = icls == FP_NAN ? __nanl ("") : 0;
- __imag__ res = __copysignl (HUGE_VALL, __imag__ x);
- }
- else
- {
- __real__ res = __real__ x;
- __imag__ res = (icls == FP_NAN
- ? __nanl ("") : __copysignl (0.0, __imag__ x));
- }
- }
- else
- {
- __real__ res = __nanl ("");
- __imag__ res = __nanl ("");
- }
- }
- else
- {
- if (icls == FP_ZERO)
- {
- if (__real__ x < 0.0)
- {
- __real__ res = 0.0;
- __imag__ res = __copysignl (__ieee754_sqrtl (-__real__ x),
- __imag__ x);
- }
- else
- {
- __real__ res = fabsl (__ieee754_sqrtl (__real__ x));
- __imag__ res = __copysignl (0.0, __imag__ x);
- }
- }
- else if (rcls == FP_ZERO)
- {
- long double r = __ieee754_sqrtl (0.5 * fabsl (__imag__ x));
-
- __real__ res = __copysignl (r, __imag__ x);
- __imag__ res = r;
- }
- else
- {
- long double d, r, s;
-
- d = __ieee754_hypotl (__real__ x, __imag__ x);
- /* Use the identity 2 Re res Im res = Im x
- to avoid cancellation error in d +/- Re x. */
- if (__real__ x > 0)
- {
- r = __ieee754_sqrtl (0.5L * d + 0.5L * __real__ x);
- s = (0.5L * __imag__ x) / r;
- }
- else
- {
- s = __ieee754_sqrtl (0.5L * d - 0.5L * __real__ x);
- r = fabsl ((0.5L * __imag__ x) / s);
- }
-
- __real__ res = r;
- __imag__ res = __copysignl (s, __imag__ x);
- }
- }
-
- return res;
-}
-weak_alias (__csqrtl, csqrtl)
diff --git a/newlib/libc/sys/linux/cmath/s_ctan.c b/newlib/libc/sys/linux/cmath/s_ctan.c
deleted file mode 100644
index 6a09fe465..000000000
--- a/newlib/libc/sys/linux/cmath/s_ctan.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Complex tangent function for double.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__ctan (__complex__ double x)
-{
- __complex__ double res;
-
- if (!isfinite (__real__ x) || !isfinite (__imag__ x))
- {
- if (__isinf (__imag__ x))
- {
- __real__ res = __copysign (0.0, __real__ x);
- __imag__ res = __copysign (1.0, __imag__ x);
- }
- else if (__real__ x == 0.0)
- {
- res = x;
- }
- else
- {
- __real__ res = __nan ("");
- __imag__ res = __nan ("");
-
-#ifdef FE_INVALID
- if (__isinf (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- double sin2rx, cos2rx;
- double den;
-
- __sincos (2.0 * __real__ x, &sin2rx, &cos2rx);
-
- den = cos2rx + __ieee754_cosh (2.0 * __imag__ x);
-
- __real__ res = sin2rx / den;
- __imag__ res = __ieee754_sinh (2.0 * __imag__ x) / den;
- }
-
- return res;
-}
-weak_alias (__ctan, ctan)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__ctan, __ctanl)
-weak_alias (__ctan, ctanl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_ctanf.c b/newlib/libc/sys/linux/cmath/s_ctanf.c
deleted file mode 100644
index 89bc84741..000000000
--- a/newlib/libc/sys/linux/cmath/s_ctanf.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Complex tangent function for float.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__ctanf (__complex__ float x)
-{
- __complex__ float res;
-
- if (!isfinite (__real__ x) || !isfinite (__imag__ x))
- {
- if (__isinff (__imag__ x))
- {
- __real__ res = __copysignf (0.0, __real__ x);
- __imag__ res = __copysignf (1.0, __imag__ x);
- }
- else if (__real__ x == 0.0)
- {
- res = x;
- }
- else
- {
- __real__ res = __nanf ("");
- __imag__ res = __nanf ("");
-
-#ifdef FE_INVALID
- if (__isinff (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- float sin2rx, cos2rx;
- float den;
-
- __sincosf (2.0 * __real__ x, &sin2rx, &cos2rx);
-
- den = cos2rx + __ieee754_coshf (2.0 * __imag__ x);
-
- __real__ res = sin2rx / den;
- __imag__ res = __ieee754_sinhf (2.0 * __imag__ x) / den;
- }
-
- return res;
-}
-weak_alias (__ctanf, ctanf)
diff --git a/newlib/libc/sys/linux/cmath/s_ctanh.c b/newlib/libc/sys/linux/cmath/s_ctanh.c
deleted file mode 100644
index 971cd9040..000000000
--- a/newlib/libc/sys/linux/cmath/s_ctanh.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Complex hyperbole tangent for double.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__ctanh (__complex__ double x)
-{
- __complex__ double res;
-
- if (!isfinite (__real__ x) || !isfinite (__imag__ x))
- {
- if (__isinf (__real__ x))
- {
- __real__ res = __copysign (1.0, __real__ x);
- __imag__ res = __copysign (0.0, __imag__ x);
- }
- else if (__imag__ x == 0.0)
- {
- res = x;
- }
- else
- {
- __real__ res = __nan ("");
- __imag__ res = __nan ("");
-
-#ifdef FE_INVALID
- if (__isinf (__imag__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- double sin2ix, cos2ix;
- double den;
-
- __sincos (2.0 * __imag__ x, &sin2ix, &cos2ix);
-
- den = (__ieee754_cosh (2.0 * __real__ x) + cos2ix);
-
- __real__ res = __ieee754_sinh (2.0 * __real__ x) / den;
- __imag__ res = sin2ix / den;
- }
-
- return res;
-}
-weak_alias (__ctanh, ctanh)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__ctanh, __ctanhl)
-weak_alias (__ctanh, ctanhl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_ctanhf.c b/newlib/libc/sys/linux/cmath/s_ctanhf.c
deleted file mode 100644
index b9e3c57fc..000000000
--- a/newlib/libc/sys/linux/cmath/s_ctanhf.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Complex hyperbole tangent for float.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__ctanhf (__complex__ float x)
-{
- __complex__ float res;
-
- if (!isfinite (__real__ x) || !isfinite (__imag__ x))
- {
- if (__isinff (__real__ x))
- {
- __real__ res = __copysignf (1.0, __real__ x);
- __imag__ res = __copysignf (0.0, __imag__ x);
- }
- else if (__imag__ x == 0.0)
- {
- res = x;
- }
- else
- {
- __real__ res = __nanf ("");
- __imag__ res = __nanf ("");
-
-#ifdef FE_INVALID
- if (__isinff (__imag__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- float sin2ix, cos2ix;
- float den;
-
- __sincosf (2.0 * __imag__ x, &sin2ix, &cos2ix);
-
- den = (__ieee754_coshf (2.0 * __real__ x) + cos2ix);
-
- __real__ res = __ieee754_sinhf (2.0 * __real__ x) / den;
- __imag__ res = sin2ix / den;
- }
-
- return res;
-}
-weak_alias (__ctanhf, ctanhf)
diff --git a/newlib/libc/sys/linux/cmath/s_ctanhl.c b/newlib/libc/sys/linux/cmath/s_ctanhl.c
deleted file mode 100644
index 7bf6b3919..000000000
--- a/newlib/libc/sys/linux/cmath/s_ctanhl.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Complex hyperbole tangent for long double.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__ctanhl (__complex__ long double x)
-{
- __complex__ long double res;
-
- if (!isfinite (__real__ x) || !isfinite (__imag__ x))
- {
- if (__isinfl (__real__ x))
- {
- __real__ res = __copysignl (1.0, __real__ x);
- __imag__ res = __copysignl (0.0, __imag__ x);
- }
- else if (__imag__ x == 0.0)
- {
- res = x;
- }
- else
- {
- __real__ res = __nanl ("");
- __imag__ res = __nanl ("");
-
-#ifdef FE_INVALID
- if (__isinfl (__imag__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- long double sin2ix, cos2ix;
- long double den;
-
- __sincosl (2.0 * __imag__ x, &sin2ix, &cos2ix);
-
- den = (__ieee754_coshl (2.0 * __real__ x) + cos2ix);
-
- __real__ res = __ieee754_sinhl (2.0 * __real__ x) / den;
- __imag__ res = sin2ix / den;
- }
-
- return res;
-}
-weak_alias (__ctanhl, ctanhl)
diff --git a/newlib/libc/sys/linux/cmath/s_ctanl.c b/newlib/libc/sys/linux/cmath/s_ctanl.c
deleted file mode 100644
index fa153e9b3..000000000
--- a/newlib/libc/sys/linux/cmath/s_ctanl.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Complex tangent function for long double.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__ctanl (__complex__ long double x)
-{
- __complex__ long double res;
-
- if (!isfinite (__real__ x) || !isfinite (__imag__ x))
- {
- if (__isinfl (__imag__ x))
- {
- __real__ res = __copysignl (0.0, __real__ x);
- __imag__ res = __copysignl (1.0, __imag__ x);
- }
- else if (__real__ x == 0.0)
- {
- res = x;
- }
- else
- {
- __real__ res = __nanl ("");
- __imag__ res = __nanl ("");
-
-#ifdef FE_INVALID
- if (__isinfl (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- long double sin2rx, cos2rx;
- long double den;
-
- __sincosl (2.0 * __real__ x, &sin2rx, &cos2rx);
-
- den = cos2rx + __ieee754_coshl (2.0 * __imag__ x);
-
- __real__ res = sin2rx / den;
- __imag__ res = __ieee754_sinhl (2.0 * __imag__ x) / den;
- }
-
- return res;
-}
-weak_alias (__ctanl, ctanl)