c99_protos.h: Add prototypes for C99 complex functions.

* c99_protos.h: Add prototypes for C99 complex functions.
	* libgfortran.h: Include complex.h before c99_protos.h.
	* intrinsics/c99_functions.c: Define HAVE_ macros for the
	fallback functions we provide.
	(cabsf, cabs, cabsl, cargf, carg, cargl, cexpf, cexp, cexpl,
	clogf, clog, clogl, clog10f, clog10, clog10l, cpowf, cpow, cpowl,
	cqsrtf, csqrt, csqrtl, csinhf, csinh, csinhl, ccoshf, ccosh,
	ccoshl, ctanhf, ctanh, ctanhl, csinf, csin, csinl, ccosf, ccos,
	ccosl, ctanf, ctan, ctanl): New fallback functions.
	* Makefile.am (gfor_math_trig_c, gfor_math_trig_obj,
	gfor_specific_c, gfor_cmath_src, gfor_cmath_obj): Remove.
	* Makefile.in: Regenerate.
	* configure.ac: Remove checks for csin. Add checks for all C99
	complex functions.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* aclocal.m4: Regenerate.

From-SVN: r104626
This commit is contained in:
Francois-Xavier Coudert 2005-09-25 23:39:58 +02:00 committed by François-Xavier Coudert
parent 86ab632081
commit 1409cd0b8e
19 changed files with 9382 additions and 1704 deletions

View File

@ -1,3 +1,23 @@
2005-09-25 Francois-Xavier Coudert <coudert@clipper.ens.fr>
* c99_protos.h: Add prototypes for C99 complex functions.
* libgfortran.h: Include complex.h before c99_protos.h.
* intrinsics/c99_functions.c: Define HAVE_ macros for the
fallback functions we provide.
(cabsf, cabs, cabsl, cargf, carg, cargl, cexpf, cexp, cexpl,
clogf, clog, clogl, clog10f, clog10, clog10l, cpowf, cpow, cpowl,
cqsrtf, csqrt, csqrtl, csinhf, csinh, csinhl, ccoshf, ccosh,
ccoshl, ctanhf, ctanh, ctanhl, csinf, csin, csinl, ccosf, ccos,
ccosl, ctanf, ctan, ctanl): New fallback functions.
* Makefile.am (gfor_math_trig_c, gfor_math_trig_obj,
gfor_specific_c, gfor_cmath_src, gfor_cmath_obj): Remove.
* Makefile.in: Regenerate.
* configure.ac: Remove checks for csin. Add checks for all C99
complex functions.
* config.h.in: Regenerate.
* configure: Regenerate.
* aclocal.m4: Regenerate.
2005-09-25 Francois-Xavier Coudert <coudert@clipper.ens.fr>
Danny Smith <dannysmith@users.sourceforge.net>

View File

@ -302,28 +302,6 @@ gfor_built_src= $(i_all_c) $(i_any_c) $(i_count_c) $(i_maxloc0_c) \
$(i_pow_c) \
selected_int_kind.inc selected_real_kind.inc kinds.h
# We only use these if libm doesn't contain complex math functions.
gfor_math_trig_c= \
generated/trig_c4.c \
generated/trig_c8.c
gfor_math_exp_c= \
generated/exp_c4.c \
generated/exp_c8.c
gfor_math_hyp_c= \
generated/hyp_c4.c \
generated/hyp_c8.c
gfor_math_trig_obj= \
trig_c4.lo \
trig_c8.lo
gfor_math_exp_obj= \
exp_c4.lo \
exp_c8.lo
gfor_math_hyp_obj= \
hyp_c4.lo \
hyp_c8.lo
# Machine generated specifics
gfor_built_specific_src= \
generated/_abs_c4.f90 \
@ -390,11 +368,6 @@ generated/_mod_i4.f90 \
generated/_mod_i8.f90 \
generated/_mod_r4.f90 \
generated/_mod_r8.f90
#specific intrinsics requiring manal code
#gfor_specific_c= \
intrinsics/_aimag.c \
intrinsics/_cabs.c \
foo
gfor_specific_src= \
$(gfor_built_specific_src) \
@ -402,20 +375,11 @@ $(gfor_built_specific2_src) \
intrinsics/dprod_r8.f90 \
intrinsics/f2c_specifics.F90
gfor_cmath_src= $(gfor_math_trig_c) $(gfor_math_exp_c) $(gfor_math_hyp_c)
gfor_cmath_obj= $(gfor_math_trig_obj) $(gfor_math_exp_obj) \
$(gfor_math_hyp_obj)
BUILT_SOURCES=$(gfor_built_src) $(gfor_cmath_src) $(gfor_built_specific_src) \
BUILT_SOURCES=$(gfor_built_src) $(gfor_built_specific_src) \
$(gfor_built_specific2_src)
libgfortran_la_SOURCES = $(gfor_src) $(gfor_built_src) $(gfor_io_src) \
$(gfor_helper_src) $(gfor_io_headers) $(gfor_specific_src)
EXTRA_libgfortran_la_SOURCES = $(gfor_cmath_src)
libgfortran_la_LIBADD = @MATH_OBJ@
libgfortran_la_DEPENDENCIES = @MATH_OBJ@
I_M4_DEPS=m4/iparm.m4
I_M4_DEPS0=$(I_M4_DEPS) m4/iforeach.m4
I_M4_DEPS1=$(I_M4_DEPS) m4/ifunction.m4
@ -520,15 +484,6 @@ $(i_set_exponent_c): m4/set_exponent.m4 m4/mtype.m4
$(i_pow_c): m4/pow.m4 $(I_M4_DEPS)
m4 -Dfile=$@ -I$(srcdir)/m4 pow.m4 > $(srcdir)/$@
$(gfor_math_trig_c): m4/ctrig.m4 m4/mtype.m4
m4 -Dfile=$@ -I$(srcdir)/m4 ctrig.m4 > $(srcdir)/$@
$(gfor_math_exp_c): m4/cexp.m4 m4/mtype.m4
m4 -Dfile=$@ -I$(srcdir)/m4 cexp.m4 > $(srcdir)/$@
$(gfor_math_hyp_c): m4/chyp.m4 m4/mtype.m4
m4 -Dfile=$@ -I$(srcdir)/m4 chyp.m4 > $(srcdir)/$@
$(gfor_built_specific_src): m4/specific.m4 m4/head.m4
m4 -Dfile=$@ -I$(srcdir)/m4 specific.m4 > $(srcdir)/$@

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# 2003, 2004, 2005 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.
@ -14,8 +14,6 @@
@SET_MAKE@
SOURCES = $(libgfortran_la_SOURCES) $(EXTRA_libgfortran_la_SOURCES) $(libgfortranbegin_la_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@ -67,6 +65,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(toolexeclibdir)"
toolexeclibLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
libgfortran_la_LIBADD =
am__objects_1 = compile_options.lo environ.lo error.lo main.lo \
memory.lo pause.lo stop.lo string.lo select.lo
am__objects_2 = all_l4.lo all_l8.lo
@ -174,7 +173,7 @@ LTPPFCCOMPILE = $(LIBTOOL) --mode=compile $(FC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_FCFLAGS) $(FCFLAGS)
FCLD = $(FC)
FCLINK = $(LIBTOOL) --mode=link $(FCLD) $(AM_FFLAGS) $(FCFLAGS) \
FCLINK = $(LIBTOOL) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@ -186,10 +185,9 @@ LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS)
LTFCCOMPILE = $(LIBTOOL) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS)
SOURCES = $(libgfortran_la_SOURCES) $(EXTRA_libgfortran_la_SOURCES) \
$(libgfortranbegin_la_SOURCES)
SOURCES = $(libgfortran_la_SOURCES) $(libgfortranbegin_la_SOURCES)
DIST_SOURCES = $(libgfortran_la_SOURCES) \
$(EXTRA_libgfortran_la_SOURCES) $(libgfortranbegin_la_SOURCES)
$(libgfortranbegin_la_SOURCES)
MULTISRCTOP =
MULTIBUILDTOP =
MULTIDIRS =
@ -245,7 +243,6 @@ MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MATH_OBJ = @MATH_OBJ@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@ -597,32 +594,6 @@ gfor_built_src = $(i_all_c) $(i_any_c) $(i_count_c) $(i_maxloc0_c) \
selected_int_kind.inc selected_real_kind.inc kinds.h
# We only use these if libm doesn't contain complex math functions.
gfor_math_trig_c = \
generated/trig_c4.c \
generated/trig_c8.c
gfor_math_exp_c = \
generated/exp_c4.c \
generated/exp_c8.c
gfor_math_hyp_c = \
generated/hyp_c4.c \
generated/hyp_c8.c
gfor_math_trig_obj = \
trig_c4.lo \
trig_c8.lo
gfor_math_exp_obj = \
exp_c4.lo \
exp_c8.lo
gfor_math_hyp_obj = \
hyp_c4.lo \
hyp_c8.lo
# Machine generated specifics
gfor_built_specific_src = \
generated/_abs_c4.f90 \
@ -690,30 +661,18 @@ generated/_mod_i8.f90 \
generated/_mod_r4.f90 \
generated/_mod_r8.f90
#specific intrinsics requiring manal code
#gfor_specific_c= \
#intrinsics/_aimag.c \
#intrinsics/_cabs.c \
#foo
gfor_specific_src = \
$(gfor_built_specific_src) \
$(gfor_built_specific2_src) \
intrinsics/dprod_r8.f90 \
intrinsics/f2c_specifics.F90
gfor_cmath_src = $(gfor_math_trig_c) $(gfor_math_exp_c) $(gfor_math_hyp_c)
gfor_cmath_obj = $(gfor_math_trig_obj) $(gfor_math_exp_obj) \
$(gfor_math_hyp_obj)
BUILT_SOURCES = $(gfor_built_src) $(gfor_cmath_src) $(gfor_built_specific_src) \
BUILT_SOURCES = $(gfor_built_src) $(gfor_built_specific_src) \
$(gfor_built_specific2_src)
libgfortran_la_SOURCES = $(gfor_src) $(gfor_built_src) $(gfor_io_src) \
$(gfor_helper_src) $(gfor_io_headers) $(gfor_specific_src)
EXTRA_libgfortran_la_SOURCES = $(gfor_cmath_src)
libgfortran_la_LIBADD = @MATH_OBJ@
libgfortran_la_DEPENDENCIES = @MATH_OBJ@
I_M4_DEPS = m4/iparm.m4
I_M4_DEPS0 = $(I_M4_DEPS) m4/iforeach.m4
I_M4_DEPS1 = $(I_M4_DEPS) m4/ifunction.m4
@ -1411,24 +1370,6 @@ in_unpack_generic.lo: runtime/in_unpack_generic.c
normalize.lo: runtime/normalize.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o normalize.lo `test -f 'runtime/normalize.c' || echo '$(srcdir)/'`runtime/normalize.c
trig_c4.lo: generated/trig_c4.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o trig_c4.lo `test -f 'generated/trig_c4.c' || echo '$(srcdir)/'`generated/trig_c4.c
trig_c8.lo: generated/trig_c8.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o trig_c8.lo `test -f 'generated/trig_c8.c' || echo '$(srcdir)/'`generated/trig_c8.c
exp_c4.lo: generated/exp_c4.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o exp_c4.lo `test -f 'generated/exp_c4.c' || echo '$(srcdir)/'`generated/exp_c4.c
exp_c8.lo: generated/exp_c8.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o exp_c8.lo `test -f 'generated/exp_c8.c' || echo '$(srcdir)/'`generated/exp_c8.c
hyp_c4.lo: generated/hyp_c4.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hyp_c4.lo `test -f 'generated/hyp_c4.c' || echo '$(srcdir)/'`generated/hyp_c4.c
hyp_c8.lo: generated/hyp_c8.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hyp_c8.lo `test -f 'generated/hyp_c8.c' || echo '$(srcdir)/'`generated/hyp_c8.c
.f90.o:
$(FCCOMPILE) -c -o $@ $<
@ -2035,15 +1976,6 @@ selected_real_kind.inc: $(srcdir)/mk-srk-inc.sh
@MAINTAINER_MODE_TRUE@$(i_pow_c): m4/pow.m4 $(I_M4_DEPS)
@MAINTAINER_MODE_TRUE@ m4 -Dfile=$@ -I$(srcdir)/m4 pow.m4 > $(srcdir)/$@
@MAINTAINER_MODE_TRUE@$(gfor_math_trig_c): m4/ctrig.m4 m4/mtype.m4
@MAINTAINER_MODE_TRUE@ m4 -Dfile=$@ -I$(srcdir)/m4 ctrig.m4 > $(srcdir)/$@
@MAINTAINER_MODE_TRUE@$(gfor_math_exp_c): m4/cexp.m4 m4/mtype.m4
@MAINTAINER_MODE_TRUE@ m4 -Dfile=$@ -I$(srcdir)/m4 cexp.m4 > $(srcdir)/$@
@MAINTAINER_MODE_TRUE@$(gfor_math_hyp_c): m4/chyp.m4 m4/mtype.m4
@MAINTAINER_MODE_TRUE@ m4 -Dfile=$@ -I$(srcdir)/m4 chyp.m4 > $(srcdir)/$@
@MAINTAINER_MODE_TRUE@$(gfor_built_specific_src): m4/specific.m4 m4/head.m4
@MAINTAINER_MODE_TRUE@ m4 -Dfile=$@ -I$(srcdir)/m4 specific.m4 > $(srcdir)/$@

334
libgfortran/aclocal.m4 vendored
View File

@ -1,7 +1,7 @@
# generated automatically by aclocal 1.9.4 -*- Autoconf -*-
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005 Free Software Foundation, Inc.
# This file 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.
@ -11,23 +11,11 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
# -*- Autoconf -*-
# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
# Generated from amversion.in; do not edit by hand.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program 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 General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file 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.
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
@ -40,26 +28,15 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.9.4])])
[AM_AUTOMAKE_VERSION([1.9.6])])
# AM_AUX_DIR_EXPAND
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program 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 General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file 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.
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
@ -106,26 +83,16 @@ AC_PREREQ([2.50])dnl
am_aux_dir=`cd $ac_aux_dir && pwd`
])
# AM_CONDITIONAL -*- Autoconf -*-
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file 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 free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program 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 General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 6
# serial 7
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
@ -149,30 +116,19 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
# Do all the work for Automake. -*- Autoconf -*-
# Do all the work for Automake. -*- Autoconf -*-
# This macro actually does too much some checks are only needed if
# your package does certain things. But this isn't really a big deal.
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file 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 free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# serial 12
# This program 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 General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 11
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
@ -274,54 +230,31 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file 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.
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program 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 General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
# Add --enable-maintainer-mode option to configure.
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file 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 free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program 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 General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 3
# serial 4
AC_DEFUN([AM_MAINTAINER_MODE],
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
@ -340,27 +273,16 @@ AC_DEFUN([AM_MAINTAINER_MODE],
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
# -*- Autoconf -*-
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
# Free Software Foundation, Inc.
#
# This file 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.
# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program 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 General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 3
# serial 4
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
@ -386,27 +308,16 @@ else
fi
])
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
#
# This file 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.
# AM_PROG_MKDIR_P
# ---------------
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program 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 General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
#
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
# created by `make install' are always world readable, even if the
# installer happens to have an overly restrictive umask (e.g. 077).
@ -460,25 +371,14 @@ else
fi
AC_SUBST([mkdir_p])])
# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004
# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file 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 free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program 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 General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 4
# serial 5
# AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
# ---------------------------------------------------
@ -529,26 +429,15 @@ multi_basedir="$multi_basedir"
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
CC="$CC"])])dnl
# Helper functions for option handling. -*- Autoconf -*-
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file 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 free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program 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 General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 2
# serial 3
# _AM_MANGLE_OPTION(NAME)
# -----------------------
@ -573,28 +462,16 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
# Free Software Foundation, Inc.
#
# Check to make sure that the build environment is sane.
#
# This file 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.
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program 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 General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 3
# serial 4
# AM_SANITY_CHECK
# ---------------
@ -637,25 +514,14 @@ Check your system clock])
fi
AC_MSG_RESULT(yes)])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file 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.
# AM_PROG_INSTALL_STRIP
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program 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 General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# ---------------------
# One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
@ -678,25 +544,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program 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 General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 1
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
#
# This file 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.
# serial 2
# _AM_PROG_TAR(FORMAT)
# --------------------

View File

@ -29,6 +29,7 @@ Boston, MA 02110-1301, USA. */
#ifndef C99_PROTOS_H
#define C99_PROTOS_H
/* float variants of libm functions */
#ifndef HAVE_ACOSF
extern float acosf(float);
#endif
@ -130,11 +131,11 @@ extern float tanhf(float);
#endif
#ifndef HAVE_TRUNC
extern double trunc(double x);
extern double trunc(double);
#endif
#ifndef HAVE_TRUNCF
extern float truncf(float x);
extern float truncf(float);
#endif
#ifndef HAVE_NEXTAFTERF
@ -153,9 +154,223 @@ extern double round(double);
extern float roundf(float);
#endif
/* log10l is needed on all platforms for decimal I/O */
#ifndef HAVE_LOG10L
#define HAVE_LOG10L
extern long double log10l(long double);
#endif
/* complex math functions */
#if !defined(HAVE_CABSF)
#define HAVE_CABSF
extern float cabsf (float complex);
#endif
#if !defined(HAVE_CABS)
#define HAVE_CABS
extern double cabs (double complex);
#endif
#if !defined(HAVE_CABSL) && defined(HAVE_HYPOTL)
#define HAVE_CABSL
extern long double cabsl (long double complex);
#endif
#if !defined(HAVE_CARGF)
#define HAVE_CARGF
extern float cargf (float complex);
#endif
#if !defined(HAVE_CARG)
#define HAVE_CARG
extern double carg (double complex);
#endif
#if !defined(HAVE_CARGL) && defined(HAVE_ATAN2L)
#define HAVE_CARGL
extern long double cargl (long double complex);
#endif
#if !defined(HAVE_CEXPF)
#define HAVE_CEXPF
extern float complex cexpf (float complex);
#endif
#if !defined(HAVE_CEXP)
#define HAVE_CEXP
extern double complex cexp (double complex);
#endif
#if !defined(HAVE_CEXPL) && defined(HAVE_COSL) && defined(HAVE_SINL) && defined(EXPL)
#define HAVE_CEXPL
extern long double complex cexpl (long double complex);
#endif
#if !defined(HAVE_CLOGF)
#define HAVE_CLOGF
extern float complex clogf (float complex);
#endif
#if !defined(HAVE_CLOG)
#define HAVE_CLOG
extern double complex clog (double complex);
#endif
#if !defined(HAVE_CLOGL) && defined(HAVE_LOGL) && defined(HAVE_CABSL) && defined(HAVE_CARGL)
#define HAVE_CLOGL
extern long double complex clogl (long double complex);
#endif
#if !defined(HAVE_CLOG10F)
#define HAVE_CLOG10F
extern float complex clog10f (float complex);
#endif
#if !defined(HAVE_CLOG10)
#define HAVE_CLOG10
extern double complex clog10 (double complex);
#endif
#if !defined(HAVE_CLOG10L) && defined(HAVE_LOG10L) && defined(HAVE_CABSL) && defined(HAVE_CARGL)
#define HAVE_CLOG10L
extern long double complex clog10l (long double complex);
#endif
#if !defined(HAVE_CPOWF)
#define HAVE_CPOWF
extern float complex cpowf (float complex, float complex);
#endif
#if !defined(HAVE_CPOW)
#define HAVE_CPOW
extern double complex cpow (double complex, double complex);
#endif
#if !defined(HAVE_CPOWL) && defined(HAVE_CEXPL) && defined(HAVE_CLOGL)
#define HAVE_CPOWL
extern long double complex cpowl (long double complex, long double complex);
#endif
#if !defined(HAVE_CSQRTF)
#define HAVE_CSQRTF
extern float complex csqrtf (float complex);
#endif
#if !defined(HAVE_CSQRT)
#define HAVE_CSQRT
extern double complex csqrt (double complex);
#endif
#if !defined(HAVE_CSQRTL) && defined(HAVE_COPYSIGNL) && defined(HAVE_SQRTL) && defined(HAVE_FABSL) && defined(HAVE_HYPOTL)
#define HAVE_CSQRTL
extern long double complex csqrtl (long double complex);
#endif
#if !defined(HAVE_CSINHF)
#define HAVE_CSINHF
extern float complex csinhf (float complex);
#endif
#if !defined(HAVE_CSINH)
#define HAVE_CSINH
extern double complex csinh (double complex);
#endif
#if !defined(HAVE_CSINHL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
#define HAVE_CSINHL
extern long double complex csinhl (long double complex);
#endif
#if !defined(HAVE_CCOSHF)
#define HAVE_CCOSHF
extern float complex ccoshf (float complex);
#endif
#if !defined(HAVE_CCOSH)
#define HAVE_CCOSH
extern double complex ccosh (double complex);
#endif
#if !defined(HAVE_CCOSHL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
#define HAVE_CCOSHL
extern long double complex ccoshl (long double complex);
#endif
#if !defined(HAVE_CTANHF)
#define HAVE_CTANHF
extern float complex ctanhf (float complex);
#endif
#if !defined(HAVE_CTANH)
#define HAVE_CTANH
extern double complex ctanh (double complex);
#endif
#if !defined(HAVE_CTANHL) && defined(HAVE_TANL) && defined(HAVE_TANHL)
#define HAVE_CTANHL
extern long double complex ctanhl (long double complex);
#endif
#if !defined(HAVE_CSINF)
#define HAVE_CSINF
extern float complex csinf (float complex);
#endif
#if !defined(HAVE_CSIN)
#define HAVE_CSIN
extern double complex csin (double complex);
#endif
#if !defined(HAVE_CSINL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
#define HAVE_CSINL
extern long double complex csinl (long double complex);
#endif
#if !defined(HAVE_CCOSF)
#define HAVE_CCOSF
extern float complex ccosf (float complex);
#endif
#if !defined(HAVE_CCOS)
#define HAVE_CCOS
extern double complex ccos (double complex);
#endif
#if !defined(HAVE_CCOSL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
#define HAVE_CCOSL
extern long double complex ccosl (long double complex);
#endif
#if !defined(HAVE_CTANF)
#define HAVE_CTANF
extern float complex ctanf (float complex);
#endif
#if !defined(HAVE_CTAN)
#define HAVE_CTAN
extern double complex ctan (double complex);
#endif
#if !defined(HAVE_CTANL) && defined(HAVE_TANL) && defined(HAVE_TANHL)
#define HAVE_CTANL
extern long double complex ctanl (long double complex);
#endif
#endif /* C99_PROTOS_H */

View File

@ -3,27 +3,69 @@
/* Does gettimeofday take a single argument */
#undef GETTIMEOFDAY_ONE_ARGUMENT
/* libm includes acos */
#undef HAVE_ACOS
/* libm includes acosf */
#undef HAVE_ACOSF
/* libm includes acosh */
#undef HAVE_ACOSH
/* libm includes acoshf */
#undef HAVE_ACOSHF
/* libm includes acoshl */
#undef HAVE_ACOSHL
/* libm includes acosl */
#undef HAVE_ACOSL
/* libm includes asin */
#undef HAVE_ASIN
/* libm includes asinf */
#undef HAVE_ASINF
/* libm includes asinh */
#undef HAVE_ASINH
/* libm includes asinhf */
#undef HAVE_ASINHF
/* libm includes asinhl */
#undef HAVE_ASINHL
/* libm includes asinl */
#undef HAVE_ASINL
/* libm includes atan */
#undef HAVE_ATAN
/* libm includes atan2 */
#undef HAVE_ATAN2
/* libm includes atan2f */
#undef HAVE_ATAN2F
/* libm includes atan2l */
#undef HAVE_ATAN2L
/* libm includes atanf */
#undef HAVE_ATANF
/* libm includes atanh */
#undef HAVE_ATANH
/* libm includes atanhf */
#undef HAVE_ATANHF
/* libm includes atanhl */
#undef HAVE_ATANHL
/* libm includes atanl */
#undef HAVE_ATANL
/* Define to 1 if the target supports __attribute__((alias(...))). */
#undef HAVE_ATTRIBUTE_ALIAS
@ -33,30 +75,171 @@
/* Define to 1 if the target supports __attribute__((visibility(...))). */
#undef HAVE_ATTRIBUTE_VISIBILITY
/* libm includes cabs */
#undef HAVE_CABS
/* libm includes cabsf */
#undef HAVE_CABSF
/* libm includes cabsl */
#undef HAVE_CABSL
/* libm includes carg */
#undef HAVE_CARG
/* libm includes cargf */
#undef HAVE_CARGF
/* libm includes cargl */
#undef HAVE_CARGL
/* libm includes ccos */
#undef HAVE_CCOS
/* libm includes ccosf */
#undef HAVE_CCOSF
/* libm includes ccosh */
#undef HAVE_CCOSH
/* libm includes ccoshf */
#undef HAVE_CCOSHF
/* libm includes ccoshl */
#undef HAVE_CCOSHL
/* libm includes ccosl */
#undef HAVE_CCOSL
/* libm includes ceil */
#undef HAVE_CEIL
/* libm includes ceilf */
#undef HAVE_CEILF
/* libm includes ceill */
#undef HAVE_CEILL
/* libm includes cexp */
#undef HAVE_CEXP
/* libm includes cexpf */
#undef HAVE_CEXPF
/* libm includes cexpl */
#undef HAVE_CEXPL
/* Define to 1 if you have the `chdir' function. */
#undef HAVE_CHDIR
/* Define to 1 if you have the `chsize' function. */
#undef HAVE_CHSIZE
/* libm includes clog */
#undef HAVE_CLOG
/* libm includes clog10 */
#undef HAVE_CLOG10
/* libm includes clog10f */
#undef HAVE_CLOG10F
/* libm includes clog10l */
#undef HAVE_CLOG10L
/* libm includes clogf */
#undef HAVE_CLOGF
/* libm includes clogl */
#undef HAVE_CLOGL
/* complex.h exists */
#undef HAVE_COMPLEX_H
/* libm includes copysign */
#undef HAVE_COPYSIGN
/* libm includes copysignf */
#undef HAVE_COPYSIGNF
/* libm includes copysignl */
#undef HAVE_COPYSIGNL
/* libm includes cos */
#undef HAVE_COS
/* libm includes cosf */
#undef HAVE_COSF
/* libm includes cosh */
#undef HAVE_COSH
/* libm includes coshf */
#undef HAVE_COSHF
/* libm includes coshl */
#undef HAVE_COSHL
/* libm includes cosl */
#undef HAVE_COSL
/* libm includes cpow */
#undef HAVE_CPOW
/* libm includes cpowf */
#undef HAVE_CPOWF
/* libm includes cpowl */
#undef HAVE_CPOWL
/* Define if CRLF is line terminator. */
#undef HAVE_CRLF
/* libm includes csin */
#undef HAVE_CSIN
/* libm includes csinf */
#undef HAVE_CSINF
/* libm includes csinh */
#undef HAVE_CSINH
/* libm includes csinhf */
#undef HAVE_CSINHF
/* libm includes csinhl */
#undef HAVE_CSINHL
/* libm includes csinl */
#undef HAVE_CSINL
/* libm includes csqrt */
#undef HAVE_CSQRT
/* libm includes csqrtf */
#undef HAVE_CSQRTF
/* libm includes csqrtl */
#undef HAVE_CSQRTL
/* libm includes ctan */
#undef HAVE_CTAN
/* libm includes ctanf */
#undef HAVE_CTANF
/* libm includes ctanh */
#undef HAVE_CTANH
/* libm includes ctanhf */
#undef HAVE_CTANHF
/* libm includes ctanhl */
#undef HAVE_CTANHL
/* libm includes ctanl */
#undef HAVE_CTANL
/* libm includes erf */
#undef HAVE_ERF
@ -66,24 +249,54 @@
/* libm includes erfcf */
#undef HAVE_ERFCF
/* libm includes erfcl */
#undef HAVE_ERFCL
/* libm includes erff */
#undef HAVE_ERFF
/* libm includes erfl */
#undef HAVE_ERFL
/* libm includes exp */
#undef HAVE_EXP
/* libm includes expf */
#undef HAVE_EXPF
/* libm includes expl */
#undef HAVE_EXPL
/* libm includes fabs */
#undef HAVE_FABS
/* libm includes fabsf */
#undef HAVE_FABSF
/* libm includes fabsl */
#undef HAVE_FABSL
/* libm includes finite */
#undef HAVE_FINITE
/* libm includes floor */
#undef HAVE_FLOOR
/* libm includes floorf */
#undef HAVE_FLOORF
/* libm includes floorl */
#undef HAVE_FLOORL
/* libm includes frexp */
#undef HAVE_FREXP
/* libm includes frexpf */
#undef HAVE_FREXPF
/* libm includes frexpl */
#undef HAVE_FREXPL
/* Define to 1 if you have the `ftruncate' function. */
#undef HAVE_FTRUNCATE
@ -111,9 +324,15 @@
/* libc includes getuid */
#undef HAVE_GETUID
/* libm includes hypot */
#undef HAVE_HYPOT
/* libm includes hypotf */
#undef HAVE_HYPOTF
/* libm includes hypotl */
#undef HAVE_HYPOTL
/* Define to 1 if you have the <ieeefp.h> header file. */
#undef HAVE_IEEEFP_H
@ -126,24 +345,39 @@
/* libm includes j0f */
#undef HAVE_J0F
/* libm includes j0l */
#undef HAVE_J0L
/* libm includes j1 */
#undef HAVE_J1
/* libm includes j1f */
#undef HAVE_J1F
/* libm includes j1l */
#undef HAVE_J1L
/* libm includes jn */
#undef HAVE_JN
/* libm includes jnf */
#undef HAVE_JNF
/* libm includes jnl */
#undef HAVE_JNL
/* Define to 1 if you have the `kill' function. */
#undef HAVE_KILL
/* Define to 1 if you have the `link' function. */
#undef HAVE_LINK
/* libm includes log */
#undef HAVE_LOG
/* libm includes log10 */
#undef HAVE_LOG10
/* libm includes log10f */
#undef HAVE_LOG10F
@ -153,6 +387,9 @@
/* libm includes logf */
#undef HAVE_LOGF
/* libm includes logl */
#undef HAVE_LOGL
/* Define to 1 if you have the <math.h> header file. */
#undef HAVE_MATH_H
@ -171,42 +408,75 @@
/* libm includes nextafterf */
#undef HAVE_NEXTAFTERF
/* libm includes nextafterl */
#undef HAVE_NEXTAFTERL
/* Define to 1 if you have the `perror' function. */
#undef HAVE_PERROR
/* libm includes pow */
#undef HAVE_POW
/* libm includes powf */
#undef HAVE_POWF
/* libm includes powl */
#undef HAVE_POWL
/* libm includes round */
#undef HAVE_ROUND
/* libm includes roundf */
#undef HAVE_ROUNDF
/* libm includes roundl */
#undef HAVE_ROUNDL
/* libm includes scalbn */
#undef HAVE_SCALBN
/* libm includes scalbnf */
#undef HAVE_SCALBNF
/* libm includes scalbnl */
#undef HAVE_SCALBNL
/* Define to 1 if you have the <signal.h> header file. */
#undef HAVE_SIGNAL_H
/* libm includes sin */
#undef HAVE_SIN
/* libm includes sinf */
#undef HAVE_SINF
/* libm includes sinh */
#undef HAVE_SINH
/* libm includes sinhf */
#undef HAVE_SINHF
/* libm includes sinhl */
#undef HAVE_SINHL
/* libm includes sinl */
#undef HAVE_SINL
/* Define to 1 if you have the `sleep' function. */
#undef HAVE_SLEEP
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
/* libm includes sqrt */
#undef HAVE_SQRT
/* libm includes sqrtf */
#undef HAVE_SQRTF
/* libm includes sqrtl */
#undef HAVE_SQRTL
/* Define to 1 if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
@ -267,12 +537,24 @@
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* libm includes tan */
#undef HAVE_TAN
/* libm includes tanf */
#undef HAVE_TANF
/* libm includes tanh */
#undef HAVE_TANH
/* libm includes tanhf */
#undef HAVE_TANHF
/* libm includes tanhl */
#undef HAVE_TANHL
/* libm includes tanl */
#undef HAVE_TANL
/* Define to 1 if you have the `time' function. */
#undef HAVE_TIME
@ -291,6 +573,9 @@
/* libm includes truncf */
#undef HAVE_TRUNCF
/* libm includes truncl */
#undef HAVE_TRUNCL
/* Define to 1 if you have the `ttyname' function. */
#undef HAVE_TTYNAME
@ -306,18 +591,27 @@
/* libm includes y0f */
#undef HAVE_Y0F
/* libm includes y0l */
#undef HAVE_Y0L
/* libm includes y1 */
#undef HAVE_Y1
/* libm includes y1f */
#undef HAVE_Y1F
/* libm includes y1l */
#undef HAVE_Y1L
/* libm includes yn */
#undef HAVE_YN
/* libm includes ynf */
#undef HAVE_YNF
/* libm includes ynl */
#undef HAVE_YNL
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT

8335
libgfortran/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -165,9 +165,6 @@ AC_CHECK_MEMBERS([struct stat.st_blksize])
AC_CHECK_MEMBERS([struct stat.st_blocks])
AC_CHECK_MEMBERS([struct stat.st_rdev])
# Check for complex math functions
AC_CHECK_LIB([m],[csin],[need_math="no"],[need_math="yes"])
# Check for library functions.
AC_CHECK_FUNCS(getrusage times mkstemp strtof strtold snprintf ftruncate chsize)
AC_CHECK_FUNCS(chdir strerror getlogin gethostname kill link symlink perror)
@ -181,69 +178,156 @@ AC_CHECK_LIB([c],[getuid],[AC_DEFINE([HAVE_GETUID],[1],[libc includes getuid])])
# Check for C99 (and other IEEE) math functions
# ??? This list seems awful long. Is there a better way to test for these?
AC_CHECK_LIB([m],[acosf],[AC_DEFINE([HAVE_ACOSF],[1],[libm includes acosf])])
AC_CHECK_LIB([m],[acos],[AC_DEFINE([HAVE_ACOS],[1],[libm includes acos])])
AC_CHECK_LIB([m],[acosl],[AC_DEFINE([HAVE_ACOSL],[1],[libm includes acosl])])
AC_CHECK_LIB([m],[acoshf],[AC_DEFINE([HAVE_ACOSHF],[1],[libm includes acoshf])])
AC_CHECK_LIB([m],[acosh],[AC_DEFINE([HAVE_ACOSH],[1],[libm includes acosh])])
AC_CHECK_LIB([m],[acoshl],[AC_DEFINE([HAVE_ACOSHL],[1],[libm includes acoshl])])
AC_CHECK_LIB([m],[asinf],[AC_DEFINE([HAVE_ASINF],[1],[libm includes asinf])])
AC_CHECK_LIB([m],[asin],[AC_DEFINE([HAVE_ASIN],[1],[libm includes asin])])
AC_CHECK_LIB([m],[asinl],[AC_DEFINE([HAVE_ASINL],[1],[libm includes asinl])])
AC_CHECK_LIB([m],[asinhf],[AC_DEFINE([HAVE_ASINHF],[1],[libm includes asinhf])])
AC_CHECK_LIB([m],[asinh],[AC_DEFINE([HAVE_ASINH],[1],[libm includes asinh])])
AC_CHECK_LIB([m],[asinhl],[AC_DEFINE([HAVE_ASINHL],[1],[libm includes asinhl])])
AC_CHECK_LIB([m],[atan2f],[AC_DEFINE([HAVE_ATAN2F],[1],[libm includes atan2f])])
AC_CHECK_LIB([m],[atan2],[AC_DEFINE([HAVE_ATAN2],[1],[libm includes atan2])])
AC_CHECK_LIB([m],[atan2l],[AC_DEFINE([HAVE_ATAN2L],[1],[libm includes atan2l])])
AC_CHECK_LIB([m],[atanf],[AC_DEFINE([HAVE_ATANF],[1],[libm includes atanf])])
AC_CHECK_LIB([m],[atan],[AC_DEFINE([HAVE_ATAN],[1],[libm includes atan])])
AC_CHECK_LIB([m],[atanl],[AC_DEFINE([HAVE_ATANL],[1],[libm includes atanl])])
AC_CHECK_LIB([m],[atanhf],[AC_DEFINE([HAVE_ATANHF],[1],[libm includes atanhf])])
AC_CHECK_LIB([m],[atanh],[AC_DEFINE([HAVE_ATANH],[1],[libm includes atanh])])
AC_CHECK_LIB([m],[atanhl],[AC_DEFINE([HAVE_ATANHL],[1],[libm includes atanhl])])
AC_CHECK_LIB([m],[cargf],[AC_DEFINE([HAVE_CARGF],[1],[libm includes cargf])])
AC_CHECK_LIB([m],[carg],[AC_DEFINE([HAVE_CARG],[1],[libm includes carg])])
AC_CHECK_LIB([m],[cargl],[AC_DEFINE([HAVE_CARGL],[1],[libm includes cargl])])
AC_CHECK_LIB([m],[ceilf],[AC_DEFINE([HAVE_CEILF],[1],[libm includes ceilf])])
AC_CHECK_LIB([m],[ceil],[AC_DEFINE([HAVE_CEIL],[1],[libm includes ceil])])
AC_CHECK_LIB([m],[ceill],[AC_DEFINE([HAVE_CEILL],[1],[libm includes ceill])])
AC_CHECK_LIB([m],[copysignf],[AC_DEFINE([HAVE_COPYSIGNF],[1],[libm includes copysignf])])
AC_CHECK_LIB([m],[copysign],[AC_DEFINE([HAVE_COPYSIGN],[1],[libm includes copysign])])
AC_CHECK_LIB([m],[copysignl],[AC_DEFINE([HAVE_COPYSIGNL],[1],[libm includes copysignl])])
AC_CHECK_LIB([m],[cosf],[AC_DEFINE([HAVE_COSF],[1],[libm includes cosf])])
AC_CHECK_LIB([m],[cos],[AC_DEFINE([HAVE_COS],[1],[libm includes cos])])
AC_CHECK_LIB([m],[cosl],[AC_DEFINE([HAVE_COSL],[1],[libm includes cosl])])
AC_CHECK_LIB([m],[ccosf],[AC_DEFINE([HAVE_CCOSF],[1],[libm includes ccosf])])
AC_CHECK_LIB([m],[ccos],[AC_DEFINE([HAVE_CCOS],[1],[libm includes ccos])])
AC_CHECK_LIB([m],[ccosl],[AC_DEFINE([HAVE_CCOSL],[1],[libm includes ccosl])])
AC_CHECK_LIB([m],[coshf],[AC_DEFINE([HAVE_COSHF],[1],[libm includes coshf])])
AC_CHECK_LIB([m],[cosh],[AC_DEFINE([HAVE_COSH],[1],[libm includes cosh])])
AC_CHECK_LIB([m],[coshl],[AC_DEFINE([HAVE_COSHL],[1],[libm includes coshl])])
AC_CHECK_LIB([m],[ccoshf],[AC_DEFINE([HAVE_CCOSHF],[1],[libm includes ccoshf])])
AC_CHECK_LIB([m],[ccosh],[AC_DEFINE([HAVE_CCOSH],[1],[libm includes ccosh])])
AC_CHECK_LIB([m],[ccoshl],[AC_DEFINE([HAVE_CCOSHL],[1],[libm includes ccoshl])])
AC_CHECK_LIB([m],[expf],[AC_DEFINE([HAVE_EXPF],[1],[libm includes expf])])
AC_CHECK_LIB([m],[exp],[AC_DEFINE([HAVE_EXP],[1],[libm includes exp])])
AC_CHECK_LIB([m],[expl],[AC_DEFINE([HAVE_EXPL],[1],[libm includes expl])])
AC_CHECK_LIB([m],[cexpf],[AC_DEFINE([HAVE_CEXPF],[1],[libm includes cexpf])])
AC_CHECK_LIB([m],[cexp],[AC_DEFINE([HAVE_CEXP],[1],[libm includes cexp])])
AC_CHECK_LIB([m],[cexpl],[AC_DEFINE([HAVE_CEXPL],[1],[libm includes cexpl])])
AC_CHECK_LIB([m],[fabsf],[AC_DEFINE([HAVE_FABSF],[1],[libm includes fabsf])])
AC_CHECK_LIB([m],[fabs],[AC_DEFINE([HAVE_FABS],[1],[libm includes fabs])])
AC_CHECK_LIB([m],[fabsl],[AC_DEFINE([HAVE_FABSL],[1],[libm includes fabsl])])
AC_CHECK_LIB([m],[cabsf],[AC_DEFINE([HAVE_CABSF],[1],[libm includes cabsf])])
AC_CHECK_LIB([m],[cabs],[AC_DEFINE([HAVE_CABS],[1],[libm includes cabs])])
AC_CHECK_LIB([m],[cabsl],[AC_DEFINE([HAVE_CABSL],[1],[libm includes cabsl])])
AC_CHECK_LIB([m],[floorf],[AC_DEFINE([HAVE_FLOORF],[1],[libm includes floorf])])
AC_CHECK_LIB([m],[floor],[AC_DEFINE([HAVE_FLOOR],[1],[libm includes floor])])
AC_CHECK_LIB([m],[floorl],[AC_DEFINE([HAVE_FLOORL],[1],[libm includes floorl])])
AC_CHECK_LIB([m],[frexpf],[AC_DEFINE([HAVE_FREXPF],[1],[libm includes frexpf])])
AC_CHECK_LIB([m],[frexp],[AC_DEFINE([HAVE_FREXP],[1],[libm includes frexp])])
AC_CHECK_LIB([m],[frexpl],[AC_DEFINE([HAVE_FREXPL],[1],[libm includes frexpl])])
AC_CHECK_LIB([m],[hypotf],[AC_DEFINE([HAVE_HYPOTF],[1],[libm includes hypotf])])
AC_CHECK_LIB([m],[hypot],[AC_DEFINE([HAVE_HYPOT],[1],[libm includes hypot])])
AC_CHECK_LIB([m],[hypotl],[AC_DEFINE([HAVE_HYPOTL],[1],[libm includes hypotl])])
AC_CHECK_LIB([m],[logf],[AC_DEFINE([HAVE_LOGF],[1],[libm includes logf])])
AC_CHECK_LIB([m],[log],[AC_DEFINE([HAVE_LOG],[1],[libm includes log])])
AC_CHECK_LIB([m],[logl],[AC_DEFINE([HAVE_LOGL],[1],[libm includes logl])])
AC_CHECK_LIB([m],[clogf],[AC_DEFINE([HAVE_CLOGF],[1],[libm includes clogf])])
AC_CHECK_LIB([m],[clog],[AC_DEFINE([HAVE_CLOG],[1],[libm includes clog])])
AC_CHECK_LIB([m],[clogl],[AC_DEFINE([HAVE_CLOGL],[1],[libm includes clogl])])
AC_CHECK_LIB([m],[log10f],[AC_DEFINE([HAVE_LOG10F],[1],[libm includes log10f])])
AC_CHECK_LIB([m],[log10],[AC_DEFINE([HAVE_LOG10],[1],[libm includes log10])])
AC_CHECK_LIB([m],[log10l],[AC_DEFINE([HAVE_LOG10L],[1],[libm includes log10l])])
AC_CHECK_LIB([m],[nextafter],[AC_DEFINE([HAVE_NEXTAFTER],[1],[libm includes nextafter])])
AC_CHECK_LIB([m],[clog10f],[AC_DEFINE([HAVE_CLOG10F],[1],[libm includes clog10f])])
AC_CHECK_LIB([m],[clog10],[AC_DEFINE([HAVE_CLOG10],[1],[libm includes clog10])])
AC_CHECK_LIB([m],[clog10l],[AC_DEFINE([HAVE_CLOG10L],[1],[libm includes clog10l])])
AC_CHECK_LIB([m],[nextafterf],[AC_DEFINE([HAVE_NEXTAFTERF],[1],[libm includes nextafterf])])
AC_CHECK_LIB([m],[nextafter],[AC_DEFINE([HAVE_NEXTAFTER],[1],[libm includes nextafter])])
AC_CHECK_LIB([m],[nextafterl],[AC_DEFINE([HAVE_NEXTAFTERL],[1],[libm includes nextafterl])])
AC_CHECK_LIB([m],[powf],[AC_DEFINE([HAVE_POWF],[1],[libm includes powf])])
AC_CHECK_LIB([m],[round],[AC_DEFINE([HAVE_ROUND],[1],[libm includes round])])
AC_CHECK_LIB([m],[pow],[AC_DEFINE([HAVE_POW],[1],[libm includes pow])])
AC_CHECK_LIB([m],[powl],[AC_DEFINE([HAVE_POWL],[1],[libm includes powl])])
AC_CHECK_LIB([m],[cpowf],[AC_DEFINE([HAVE_CPOWF],[1],[libm includes cpowf])])
AC_CHECK_LIB([m],[cpow],[AC_DEFINE([HAVE_CPOW],[1],[libm includes cpow])])
AC_CHECK_LIB([m],[cpowl],[AC_DEFINE([HAVE_CPOWL],[1],[libm includes cpowl])])
AC_CHECK_LIB([m],[roundf],[AC_DEFINE([HAVE_ROUNDF],[1],[libm includes roundf])])
AC_CHECK_LIB([m],[round],[AC_DEFINE([HAVE_ROUND],[1],[libm includes round])])
AC_CHECK_LIB([m],[roundl],[AC_DEFINE([HAVE_ROUNDL],[1],[libm includes roundl])])
AC_CHECK_LIB([m],[scalbnf],[AC_DEFINE([HAVE_SCALBNF],[1],[libm includes scalbnf])])
AC_CHECK_LIB([m],[scalbn],[AC_DEFINE([HAVE_SCALBN],[1],[libm includes scalbn])])
AC_CHECK_LIB([m],[scalbnl],[AC_DEFINE([HAVE_SCALBNL],[1],[libm includes scalbnl])])
AC_CHECK_LIB([m],[sinf],[AC_DEFINE([HAVE_SINF],[1],[libm includes sinf])])
AC_CHECK_LIB([m],[sin],[AC_DEFINE([HAVE_SIN],[1],[libm includes sin])])
AC_CHECK_LIB([m],[sinl],[AC_DEFINE([HAVE_SINL],[1],[libm includes sinl])])
AC_CHECK_LIB([m],[csinf],[AC_DEFINE([HAVE_CSINF],[1],[libm includes csinf])])
AC_CHECK_LIB([m],[csin],[AC_DEFINE([HAVE_CSIN],[1],[libm includes csin])])
AC_CHECK_LIB([m],[csinl],[AC_DEFINE([HAVE_CSINL],[1],[libm includes csinl])])
AC_CHECK_LIB([m],[sinhf],[AC_DEFINE([HAVE_SINHF],[1],[libm includes sinhf])])
AC_CHECK_LIB([m],[sinh],[AC_DEFINE([HAVE_SINH],[1],[libm includes sinh])])
AC_CHECK_LIB([m],[sinhl],[AC_DEFINE([HAVE_SINHL],[1],[libm includes sinhl])])
AC_CHECK_LIB([m],[csinhf],[AC_DEFINE([HAVE_CSINHF],[1],[libm includes csinhf])])
AC_CHECK_LIB([m],[csinh],[AC_DEFINE([HAVE_CSINH],[1],[libm includes csinh])])
AC_CHECK_LIB([m],[csinhl],[AC_DEFINE([HAVE_CSINHL],[1],[libm includes csinhl])])
AC_CHECK_LIB([m],[sqrtf],[AC_DEFINE([HAVE_SQRTF],[1],[libm includes sqrtf])])
AC_CHECK_LIB([m],[sqrt],[AC_DEFINE([HAVE_SQRT],[1],[libm includes sqrt])])
AC_CHECK_LIB([m],[sqrtl],[AC_DEFINE([HAVE_SQRTL],[1],[libm includes sqrtl])])
AC_CHECK_LIB([m],[csqrtf],[AC_DEFINE([HAVE_CSQRTF],[1],[libm includes csqrtf])])
AC_CHECK_LIB([m],[csqrt],[AC_DEFINE([HAVE_CSQRT],[1],[libm includes csqrt])])
AC_CHECK_LIB([m],[csqrtl],[AC_DEFINE([HAVE_CSQRTL],[1],[libm includes csqrtl])])
AC_CHECK_LIB([m],[tanf],[AC_DEFINE([HAVE_TANF],[1],[libm includes tanf])])
AC_CHECK_LIB([m],[tan],[AC_DEFINE([HAVE_TAN],[1],[libm includes tan])])
AC_CHECK_LIB([m],[tanl],[AC_DEFINE([HAVE_TANL],[1],[libm includes tanl])])
AC_CHECK_LIB([m],[ctanf],[AC_DEFINE([HAVE_CTANF],[1],[libm includes ctanf])])
AC_CHECK_LIB([m],[ctan],[AC_DEFINE([HAVE_CTAN],[1],[libm includes ctan])])
AC_CHECK_LIB([m],[ctanl],[AC_DEFINE([HAVE_CTANL],[1],[libm includes ctanl])])
AC_CHECK_LIB([m],[tanhf],[AC_DEFINE([HAVE_TANHF],[1],[libm includes tanhf])])
AC_CHECK_LIB([m],[trunc],[AC_DEFINE([HAVE_TRUNC],[1],[libm includes trunc])])
AC_CHECK_LIB([m],[tanh],[AC_DEFINE([HAVE_TANH],[1],[libm includes tanh])])
AC_CHECK_LIB([m],[tanhl],[AC_DEFINE([HAVE_TANHL],[1],[libm includes tanhl])])
AC_CHECK_LIB([m],[ctanhf],[AC_DEFINE([HAVE_CTANHF],[1],[libm includes ctanhf])])
AC_CHECK_LIB([m],[ctanh],[AC_DEFINE([HAVE_CTANH],[1],[libm includes ctanh])])
AC_CHECK_LIB([m],[ctanhl],[AC_DEFINE([HAVE_CTANHL],[1],[libm includes ctanhl])])
AC_CHECK_LIB([m],[truncf],[AC_DEFINE([HAVE_TRUNCF],[1],[libm includes truncf])])
AC_CHECK_LIB([m],[erf],[AC_DEFINE([HAVE_ERF],[1],[libm includes erf])])
AC_CHECK_LIB([m],[erfc],[AC_DEFINE([HAVE_ERFC],[1],[libm includes erfc])])
AC_CHECK_LIB([m],[erfcf],[AC_DEFINE([HAVE_ERFCF],[1],[libm includes erfcf])])
AC_CHECK_LIB([m],[trunc],[AC_DEFINE([HAVE_TRUNC],[1],[libm includes trunc])])
AC_CHECK_LIB([m],[truncl],[AC_DEFINE([HAVE_TRUNCL],[1],[libm includes truncl])])
AC_CHECK_LIB([m],[erff],[AC_DEFINE([HAVE_ERFF],[1],[libm includes erff])])
AC_CHECK_LIB([m],[j0],[AC_DEFINE([HAVE_J0],[1],[libm includes j0])])
AC_CHECK_LIB([m],[erf],[AC_DEFINE([HAVE_ERF],[1],[libm includes erf])])
AC_CHECK_LIB([m],[erfl],[AC_DEFINE([HAVE_ERFL],[1],[libm includes erfl])])
AC_CHECK_LIB([m],[erfcf],[AC_DEFINE([HAVE_ERFCF],[1],[libm includes erfcf])])
AC_CHECK_LIB([m],[erfc],[AC_DEFINE([HAVE_ERFC],[1],[libm includes erfc])])
AC_CHECK_LIB([m],[erfcl],[AC_DEFINE([HAVE_ERFCL],[1],[libm includes erfcl])])
AC_CHECK_LIB([m],[j0f],[AC_DEFINE([HAVE_J0F],[1],[libm includes j0f])])
AC_CHECK_LIB([m],[j1],[AC_DEFINE([HAVE_J1],[1],[libm includes j1])])
AC_CHECK_LIB([m],[j0],[AC_DEFINE([HAVE_J0],[1],[libm includes j0])])
AC_CHECK_LIB([m],[j0l],[AC_DEFINE([HAVE_J0L],[1],[libm includes j0l])])
AC_CHECK_LIB([m],[j1f],[AC_DEFINE([HAVE_J1F],[1],[libm includes j1f])])
AC_CHECK_LIB([m],[jn],[AC_DEFINE([HAVE_JN],[1],[libm includes jn])])
AC_CHECK_LIB([m],[j1],[AC_DEFINE([HAVE_J1],[1],[libm includes j1])])
AC_CHECK_LIB([m],[j1l],[AC_DEFINE([HAVE_J1L],[1],[libm includes j1l])])
AC_CHECK_LIB([m],[jnf],[AC_DEFINE([HAVE_JNF],[1],[libm includes jnf])])
AC_CHECK_LIB([m],[y0],[AC_DEFINE([HAVE_Y0],[1],[libm includes y0])])
AC_CHECK_LIB([m],[jn],[AC_DEFINE([HAVE_JN],[1],[libm includes jn])])
AC_CHECK_LIB([m],[jnl],[AC_DEFINE([HAVE_JNL],[1],[libm includes jnl])])
AC_CHECK_LIB([m],[y0f],[AC_DEFINE([HAVE_Y0F],[1],[libm includes y0f])])
AC_CHECK_LIB([m],[y1],[AC_DEFINE([HAVE_Y1],[1],[libm includes y1])])
AC_CHECK_LIB([m],[y0],[AC_DEFINE([HAVE_Y0],[1],[libm includes y0])])
AC_CHECK_LIB([m],[y0l],[AC_DEFINE([HAVE_Y0L],[1],[libm includes y0l])])
AC_CHECK_LIB([m],[y1f],[AC_DEFINE([HAVE_Y1F],[1],[libm includes y1f])])
AC_CHECK_LIB([m],[yn],[AC_DEFINE([HAVE_YN],[1],[libm includes yn])])
AC_CHECK_LIB([m],[y1],[AC_DEFINE([HAVE_Y1],[1],[libm includes y1])])
AC_CHECK_LIB([m],[y1l],[AC_DEFINE([HAVE_Y1L],[1],[libm includes y1l])])
AC_CHECK_LIB([m],[ynf],[AC_DEFINE([HAVE_YNF],[1],[libm includes ynf])])
AC_CHECK_LIB([m],[yn],[AC_DEFINE([HAVE_YN],[1],[libm includes yn])])
AC_CHECK_LIB([m],[ynl],[AC_DEFINE([HAVE_YNL],[1],[libm includes ynl])])
# Fallback in case isfinite is not available.
AC_CHECK_LIB([m],[finite],[AC_DEFINE([HAVE_FINITE],[1],[libm includes finite])])
# Let the user override this
AC_ARG_ENABLE(cmath,
AC_HELP_STRING([--enable-cmath],[Include complex math functions]),
[need_math=$enableval])
if test "$need_math" = "yes"; then
AC_MSG_NOTICE([Including complex math functions in libgfor]);
extra_math_obj='$(gfor_cmath_obj)'
fi
AC_SUBST([MATH_OBJ],["$extra_math_obj"])
# The standard autoconf HAVE_STRUCT_TIMEZONE doesn't actually check
# for struct timezone, as you might think. We also need to check how
# to call gettimeofday if we have it.

View File

@ -1,145 +0,0 @@
/* Complex exponential functions
Copyright 2002, 2004 Free Software Foundation, Inc.
Contributed by Paul Brook <paul@nowt.org>
This file is part of the GNU Fortran 95 runtime library (libgfortran).
Libgfortran is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
In addition to the permissions in the GNU General Public License, the
Free Software Foundation gives you unlimited permission to link the
compiled version of this file into combinations with other programs,
and to distribute those combinations without any restriction coming
from the use of this file. (The General Public License restrictions
do apply in other respects; for example, they cover modification of
the file, and distribution when not linked into a combine
executable.)
Libgfortran 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 General Public License for more details.
You should have received a copy of the GNU General Public
License along with libgfortran; see the file COPYING. If not,
write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
#include <math.h>
#include "libgfortran.h"
/* z = a + ib */
/* Absolute value. */
GFC_REAL_4
cabsf (GFC_COMPLEX_4 z)
{
return hypotf (REALPART (z), IMAGPART (z));
}
/* Complex argument. The angle made with the +ve real axis.
Range -pi-pi. */
GFC_REAL_4
cargf (GFC_COMPLEX_4 z)
{
GFC_REAL_4 arg;
return atan2f (IMAGPART (z), REALPART (z));
}
/* exp(z) = exp(a)*(cos(b) + isin(b)) */
GFC_COMPLEX_4
cexpf (GFC_COMPLEX_4 z)
{
GFC_REAL_4 a;
GFC_REAL_4 b;
GFC_COMPLEX_4 v;
a = REALPART (z);
b = IMAGPART (z);
COMPLEX_ASSIGN (v, cosf (b), sinf (b));
return expf (a) * v;
}
/* log(z) = log (cabs(z)) + i*carg(z) */
GFC_COMPLEX_4
clogf (GFC_COMPLEX_4 z)
{
GFC_COMPLEX_4 v;
COMPLEX_ASSIGN (v, logf (cabsf (z)), cargf (z));
return v;
}
/* log10(z) = log10 (cabs(z)) + i*carg(z) */
GFC_COMPLEX_4
clog10f (GFC_COMPLEX_4 z)
{
GFC_COMPLEX_4 v;
COMPLEX_ASSIGN (v, log10f (cabsf (z)), cargf (z));
return v;
}
/* pow(base, power) = cexp (power * clog (base)) */
GFC_COMPLEX_4
cpowf (GFC_COMPLEX_4 base, GFC_COMPLEX_4 power)
{
return cexpf (power * clogf (base));
}
/* sqrt(z). Algorithm pulled from glibc. */
GFC_COMPLEX_4
csqrtf (GFC_COMPLEX_4 z)
{
GFC_REAL_4 re;
GFC_REAL_4 im;
GFC_COMPLEX_4 v;
re = REALPART (z);
im = IMAGPART (z);
if (im == 0.0)
{
if (re < 0.0)
{
COMPLEX_ASSIGN (v, 0.0, copysignf (sqrtf (-re), im));
}
else
{
COMPLEX_ASSIGN (v, fabsf (sqrtf (re)),
copysignf (0.0, im));
}
}
else if (re == 0.0)
{
GFC_REAL_4 r;
r = sqrtf (0.5 * fabsf (im));
COMPLEX_ASSIGN (v, copysignf (r, im), r);
}
else
{
GFC_REAL_4 d, r, s;
d = hypotf (re, im);
/* Use the identity 2 Re res Im res = Im x
to avoid cancellation error in d +/- Re x. */
if (re > 0)
{
r = sqrtf (0.5 * d + 0.5 * re);
s = (0.5 * im) / r;
}
else
{
s = sqrtf (0.5 * d - 0.5 * re);
r = fabsf ((0.5 * im) / s);
}
COMPLEX_ASSIGN (v, r, copysignf (s, im));
}
return v;
}

View File

@ -1,145 +0,0 @@
/* Complex exponential functions
Copyright 2002, 2004 Free Software Foundation, Inc.
Contributed by Paul Brook <paul@nowt.org>
This file is part of the GNU Fortran 95 runtime library (libgfortran).
Libgfortran is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
In addition to the permissions in the GNU General Public License, the
Free Software Foundation gives you unlimited permission to link the
compiled version of this file into combinations with other programs,
and to distribute those combinations without any restriction coming
from the use of this file. (The General Public License restrictions
do apply in other respects; for example, they cover modification of
the file, and distribution when not linked into a combine
executable.)
Libgfortran 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 General Public License for more details.
You should have received a copy of the GNU General Public
License along with libgfortran; see the file COPYING. If not,
write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
#include <math.h>
#include "libgfortran.h"
/* z = a + ib */
/* Absolute value. */
GFC_REAL_8
cabs (GFC_COMPLEX_8 z)
{
return hypot (REALPART (z), IMAGPART (z));
}
/* Complex argument. The angle made with the +ve real axis.
Range -pi-pi. */
GFC_REAL_8
carg (GFC_COMPLEX_8 z)
{
GFC_REAL_8 arg;
return atan2 (IMAGPART (z), REALPART (z));
}
/* exp(z) = exp(a)*(cos(b) + isin(b)) */
GFC_COMPLEX_8
cexp (GFC_COMPLEX_8 z)
{
GFC_REAL_8 a;
GFC_REAL_8 b;
GFC_COMPLEX_8 v;
a = REALPART (z);
b = IMAGPART (z);
COMPLEX_ASSIGN (v, cos (b), sin (b));
return exp (a) * v;
}
/* log(z) = log (cabs(z)) + i*carg(z) */
GFC_COMPLEX_8
clog (GFC_COMPLEX_8 z)
{
GFC_COMPLEX_8 v;
COMPLEX_ASSIGN (v, log (cabs (z)), carg (z));
return v;
}
/* log10(z) = log10 (cabs(z)) + i*carg(z) */
GFC_COMPLEX_8
clog10 (GFC_COMPLEX_8 z)
{
GFC_COMPLEX_8 v;
COMPLEX_ASSIGN (v, log10 (cabs (z)), carg (z));
return v;
}
/* pow(base, power) = cexp (power * clog (base)) */
GFC_COMPLEX_8
cpow (GFC_COMPLEX_8 base, GFC_COMPLEX_8 power)
{
return cexp (power * clog (base));
}
/* sqrt(z). Algorithm pulled from glibc. */
GFC_COMPLEX_8
csqrt (GFC_COMPLEX_8 z)
{
GFC_REAL_8 re;
GFC_REAL_8 im;
GFC_COMPLEX_8 v;
re = REALPART (z);
im = IMAGPART (z);
if (im == 0.0)
{
if (re < 0.0)
{
COMPLEX_ASSIGN (v, 0.0, copysign (sqrt (-re), im));
}
else
{
COMPLEX_ASSIGN (v, fabs (sqrt (re)),
copysign (0.0, im));
}
}
else if (re == 0.0)
{
GFC_REAL_8 r;
r = sqrt (0.5 * fabs (im));
COMPLEX_ASSIGN (v, copysign (r, im), r);
}
else
{
GFC_REAL_8 d, r, s;
d = hypot (re, im);
/* Use the identity 2 Re res Im res = Im x
to avoid cancellation error in d +/- Re x. */
if (re > 0)
{
r = sqrt (0.5 * d + 0.5 * re);
s = (0.5 * im) / r;
}
else
{
s = sqrt (0.5 * d - 0.5 * re);
r = fabs ((0.5 * im) / s);
}
COMPLEX_ASSIGN (v, r, copysign (s, im));
}
return v;
}

View File

@ -1,80 +0,0 @@
/* Complex hyperbolic functions
Copyright 2002 Free Software Foundation, Inc.
Contributed by Paul Brook <paul@nowt.org>
This file is part of the GNU Fortran 95 runtime library (libgfortran).
Libgfortran is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
In addition to the permissions in the GNU General Public License, the
Free Software Foundation gives you unlimited permission to link the
compiled version of this file into combinations with other programs,
and to distribute those combinations without any restriction coming
from the use of this file. (The General Public License restrictions
do apply in other respects; for example, they cover modification of
the file, and distribution when not linked into a combine
executable.)
Libgfortran 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 General Public License for more details.
You should have received a copy of the GNU General Public
License along with libgfortran; see the file COPYING. If not,
write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
#include <math.h>
#include "libgfortran.h"
/* Complex number z = a + ib. */
/* sinh(z) = sinh(a)cos(b) + icosh(a)sin(b) */
GFC_COMPLEX_4
csinhf (GFC_COMPLEX_4 a)
{
GFC_REAL_4 r;
GFC_REAL_4 i;
GFC_COMPLEX_4 v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, sinhf (r) * cosf (i), coshf (r) * sinf (i));
return v;
}
/* cosh(z) = cosh(a)cos(b) - isinh(a)sin(b) */
GFC_COMPLEX_4
ccoshf (GFC_COMPLEX_4 a)
{
GFC_REAL_4 r;
GFC_REAL_4 i;
GFC_COMPLEX_4 v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, coshf (r) * cosf (i), - (sinhf (r) * sinf (i)));
return v;
}
/* tanh(z) = (tanh(a) + itan(b)) / (1 - itanh(a)tan(b)) */
GFC_COMPLEX_4
ctanhf (GFC_COMPLEX_4 a)
{
GFC_REAL_4 rt;
GFC_REAL_4 it;
GFC_COMPLEX_4 n;
GFC_COMPLEX_4 d;
rt = tanhf (REALPART (a));
it = tanf (IMAGPART (a));
COMPLEX_ASSIGN (n, rt, it);
COMPLEX_ASSIGN (d, 1, - (rt * it));
return n / d;
}

View File

@ -1,80 +0,0 @@
/* Complex hyperbolic functions
Copyright 2002 Free Software Foundation, Inc.
Contributed by Paul Brook <paul@nowt.org>
This file is part of the GNU Fortran 95 runtime library (libgfortran).
Libgfortran is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
In addition to the permissions in the GNU General Public License, the
Free Software Foundation gives you unlimited permission to link the
compiled version of this file into combinations with other programs,
and to distribute those combinations without any restriction coming
from the use of this file. (The General Public License restrictions
do apply in other respects; for example, they cover modification of
the file, and distribution when not linked into a combine
executable.)
Libgfortran 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 General Public License for more details.
You should have received a copy of the GNU General Public
License along with libgfortran; see the file COPYING. If not,
write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
#include <math.h>
#include "libgfortran.h"
/* Complex number z = a + ib. */
/* sinh(z) = sinh(a)cos(b) + icosh(a)sin(b) */
GFC_COMPLEX_8
csinh (GFC_COMPLEX_8 a)
{
GFC_REAL_8 r;
GFC_REAL_8 i;
GFC_COMPLEX_8 v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, sinh (r) * cos (i), cosh (r) * sin (i));
return v;
}
/* cosh(z) = cosh(a)cos(b) - isinh(a)sin(b) */
GFC_COMPLEX_8
ccosh (GFC_COMPLEX_8 a)
{
GFC_REAL_8 r;
GFC_REAL_8 i;
GFC_COMPLEX_8 v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, cosh (r) * cos (i), - (sinh (r) * sin (i)));
return v;
}
/* tanh(z) = (tanh(a) + itan(b)) / (1 - itanh(a)tan(b)) */
GFC_COMPLEX_8
ctanh (GFC_COMPLEX_8 a)
{
GFC_REAL_8 rt;
GFC_REAL_8 it;
GFC_COMPLEX_8 n;
GFC_COMPLEX_8 d;
rt = tanh (REALPART (a));
it = tan (IMAGPART (a));
COMPLEX_ASSIGN (n, rt, it);
COMPLEX_ASSIGN (d, 1, - (rt * it));
return n / d;
}

View File

@ -1,80 +0,0 @@
/* Complex trig functions
Copyright 2002 Free Software Foundation, Inc.
Contributed by Paul Brook <paul@nowt.org>
This file is part of the GNU Fortran 95 runtime library (libgfortran).
Libgfortran is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
In addition to the permissions in the GNU General Public License, the
Free Software Foundation gives you unlimited permission to link the
compiled version of this file into combinations with other programs,
and to distribute those combinations without any restriction coming
from the use of this file. (The General Public License restrictions
do apply in other respects; for example, they cover modification of
the file, and distribution when not linked into a combine
executable.)
Libgfortran 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 General Public License for more details.
You should have received a copy of the GNU General Public
License along with libgfortran; see the file COPYING. If not,
write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
#include <math.h>
#include "libgfortran.h"
/* Complex number z = a + ib. */
/* sin(z) = sin(a)cosh(b) + icos(a)sinh(b) */
GFC_COMPLEX_4
csinf (GFC_COMPLEX_4 a)
{
GFC_REAL_4 r;
GFC_REAL_4 i;
GFC_COMPLEX_4 v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, sinf (r) * coshf (i), cosf (r) * sinhf (i));
return v;
}
/* cos(z) = cos(a)cosh(b) - isin(a)sinh(b) */
GFC_COMPLEX_4
ccosf (GFC_COMPLEX_4 a)
{
GFC_REAL_4 r;
GFC_REAL_4 i;
GFC_COMPLEX_4 v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, cosf (r) * coshf (i), - (sinf (r) * sinhf (i)));
return v;
}
/* tan(z) = (tan(a) + itanh(b)) / (1 - itan(a)tanh(b)) */
GFC_COMPLEX_4
ctanf (GFC_COMPLEX_4 a)
{
GFC_REAL_4 rt;
GFC_REAL_4 it;
GFC_COMPLEX_4 n;
GFC_COMPLEX_4 d;
rt = tanf (REALPART (a));
it = tanhf (IMAGPART (a));
COMPLEX_ASSIGN (n, rt, it);
COMPLEX_ASSIGN (d , 1, - (rt * it));
return n / d;
}

View File

@ -1,80 +0,0 @@
/* Complex trig functions
Copyright 2002 Free Software Foundation, Inc.
Contributed by Paul Brook <paul@nowt.org>
This file is part of the GNU Fortran 95 runtime library (libgfortran).
Libgfortran is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
In addition to the permissions in the GNU General Public License, the
Free Software Foundation gives you unlimited permission to link the
compiled version of this file into combinations with other programs,
and to distribute those combinations without any restriction coming
from the use of this file. (The General Public License restrictions
do apply in other respects; for example, they cover modification of
the file, and distribution when not linked into a combine
executable.)
Libgfortran 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 General Public License for more details.
You should have received a copy of the GNU General Public
License along with libgfortran; see the file COPYING. If not,
write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
#include <math.h>
#include "libgfortran.h"
/* Complex number z = a + ib. */
/* sin(z) = sin(a)cosh(b) + icos(a)sinh(b) */
GFC_COMPLEX_8
csin (GFC_COMPLEX_8 a)
{
GFC_REAL_8 r;
GFC_REAL_8 i;
GFC_COMPLEX_8 v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, sin (r) * cosh (i), cos (r) * sinh (i));
return v;
}
/* cos(z) = cos(a)cosh(b) - isin(a)sinh(b) */
GFC_COMPLEX_8
ccos (GFC_COMPLEX_8 a)
{
GFC_REAL_8 r;
GFC_REAL_8 i;
GFC_COMPLEX_8 v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, cos (r) * cosh (i), - (sin (r) * sinh (i)));
return v;
}
/* tan(z) = (tan(a) + itanh(b)) / (1 - itan(a)tanh(b)) */
GFC_COMPLEX_8
ctan (GFC_COMPLEX_8 a)
{
GFC_REAL_8 rt;
GFC_REAL_8 it;
GFC_COMPLEX_8 n;
GFC_COMPLEX_8 d;
rt = tan (REALPART (a));
it = tanh (IMAGPART (a));
COMPLEX_ASSIGN (n, rt, it);
COMPLEX_ASSIGN (d , 1, - (rt * it));
return n / d;
}

View File

@ -31,10 +31,13 @@ Boston, MA 02110-1301, USA. */
#include <sys/types.h>
#include <float.h>
#include <math.h>
#define C99_PROTOS_H WE_DONT_WANT_PROTOS_NOW
#include "libgfortran.h"
#ifndef HAVE_ACOSF
#define HAVE_ACOSF
float
acosf(float x)
{
@ -43,6 +46,7 @@ acosf(float x)
#endif
#ifndef HAVE_ASINF
#define HAVE_ASINF
float
asinf(float x)
{
@ -51,6 +55,7 @@ asinf(float x)
#endif
#ifndef HAVE_ATAN2F
#define HAVE_ATAN2F
float
atan2f(float y, float x)
{
@ -59,6 +64,7 @@ atan2f(float y, float x)
#endif
#ifndef HAVE_ATANF
#define HAVE_ATANF
float
atanf(float x)
{
@ -67,6 +73,7 @@ atanf(float x)
#endif
#ifndef HAVE_CEILF
#define HAVE_CEILF
float
ceilf(float x)
{
@ -75,6 +82,7 @@ ceilf(float x)
#endif
#ifndef HAVE_COPYSIGNF
#define HAVE_COPYSIGNF
float
copysignf(float x, float y)
{
@ -83,6 +91,7 @@ copysignf(float x, float y)
#endif
#ifndef HAVE_COSF
#define HAVE_COSF
float
cosf(float x)
{
@ -91,6 +100,7 @@ cosf(float x)
#endif
#ifndef HAVE_COSHF
#define HAVE_COSHF
float
coshf(float x)
{
@ -99,6 +109,7 @@ coshf(float x)
#endif
#ifndef HAVE_EXPF
#define HAVE_EXPF
float
expf(float x)
{
@ -107,6 +118,7 @@ expf(float x)
#endif
#ifndef HAVE_FABSF
#define HAVE_FABSF
float
fabsf(float x)
{
@ -115,6 +127,7 @@ fabsf(float x)
#endif
#ifndef HAVE_FLOORF
#define HAVE_FLOORF
float
floorf(float x)
{
@ -123,6 +136,7 @@ floorf(float x)
#endif
#ifndef HAVE_FREXPF
#define HAVE_FREXPF
float
frexpf(float x, int *exp)
{
@ -131,6 +145,7 @@ frexpf(float x, int *exp)
#endif
#ifndef HAVE_HYPOTF
#define HAVE_HYPOTF
float
hypotf(float x, float y)
{
@ -139,6 +154,7 @@ hypotf(float x, float y)
#endif
#ifndef HAVE_LOGF
#define HAVE_LOGF
float
logf(float x)
{
@ -147,6 +163,7 @@ logf(float x)
#endif
#ifndef HAVE_LOG10F
#define HAVE_LOG10F
float
log10f(float x)
{
@ -155,6 +172,7 @@ log10f(float x)
#endif
#ifndef HAVE_SCALBN
#define HAVE_SCALBN
double
scalbn(double x, int y)
{
@ -163,6 +181,7 @@ scalbn(double x, int y)
#endif
#ifndef HAVE_SCALBNF
#define HAVE_SCALBNF
float
scalbnf(float x, int y)
{
@ -171,6 +190,7 @@ scalbnf(float x, int y)
#endif
#ifndef HAVE_SINF
#define HAVE_SINF
float
sinf(float x)
{
@ -179,6 +199,7 @@ sinf(float x)
#endif
#ifndef HAVE_SINHF
#define HAVE_SINHF
float
sinhf(float x)
{
@ -187,6 +208,7 @@ sinhf(float x)
#endif
#ifndef HAVE_SQRTF
#define HAVE_SQRTF
float
sqrtf(float x)
{
@ -195,6 +217,7 @@ sqrtf(float x)
#endif
#ifndef HAVE_TANF
#define HAVE_TANF
float
tanf(float x)
{
@ -203,6 +226,7 @@ tanf(float x)
#endif
#ifndef HAVE_TANHF
#define HAVE_TANHF
float
tanhf(float x)
{
@ -211,6 +235,7 @@ tanhf(float x)
#endif
#ifndef HAVE_TRUNC
#define HAVE_TRUNC
double
trunc(double x)
{
@ -225,6 +250,7 @@ trunc(double x)
#endif
#ifndef HAVE_TRUNCF
#define HAVE_TRUNCF
float
truncf(float x)
{
@ -233,6 +259,7 @@ truncf(float x)
#endif
#ifndef HAVE_NEXTAFTERF
#define HAVE_NEXTAFTERF
/* This is a portable implementation of nextafterf that is intended to be
independent of the floating point format or its in memory representation.
This implementation works correctly with denormalized values. */
@ -296,6 +323,7 @@ nextafterf(float x, float y)
#ifndef HAVE_POWF
#define HAVE_POWF
float
powf(float x, float y)
{
@ -308,6 +336,7 @@ powf(float x, float y)
/* Algorithm by Steven G. Kargl. */
#ifndef HAVE_ROUND
#define HAVE_ROUND
/* Round to nearest integral value. If the argument is halfway between two
integral values then round away from zero. */
@ -340,6 +369,7 @@ round(double x)
#endif
#ifndef HAVE_ROUNDF
#define HAVE_ROUNDF
/* Round to nearest integral value. If the argument is halfway between two
integral values then round away from zero. */
@ -373,6 +403,7 @@ roundf(float x)
#endif
#ifndef HAVE_LOG10L
#define HAVE_LOG10L
/* log10 function for long double variables. The version provided here
reduces the argument until it fits into a double, then use log10. */
long double
@ -409,3 +440,667 @@ log10l(long double x)
return log10 (x);
}
#endif
#if !defined(HAVE_CABSF)
#define HAVE_CABSF
float
cabsf (float complex z)
{
return hypotf (REALPART (z), IMAGPART (z));
}
#endif
#if !defined(HAVE_CABS)
#define HAVE_CABS
double
cabs (double complex z)
{
return hypot (REALPART (z), IMAGPART (z));
}
#endif
#if !defined(HAVE_CABSL) && defined(HAVE_HYPOTL)
#define HAVE_CABSL
long double
cabsl (long double complex z)
{
return hypotl (REALPART (z), IMAGPART (z));
}
#endif
#if !defined(HAVE_CARGF)
#define HAVE_CARGF
float
cargf (float complex z)
{
return atan2f (IMAGPART (z), REALPART (z));
}
#endif
#if !defined(HAVE_CARG)
#define HAVE_CARG
double
carg (double complex z)
{
return atan2 (IMAGPART (z), REALPART (z));
}
#endif
#if !defined(HAVE_CARGL) && defined(HAVE_ATAN2L)
#define HAVE_CARGL
long double
cargl (long double complex z)
{
return atan2l (IMAGPART (z), REALPART (z));
}
#endif
/* exp(z) = exp(a)*(cos(b) + i sin(b)) */
#if !defined(HAVE_CEXPF)
#define HAVE_CEXPF
float complex
cexpf (float complex z)
{
float a, b;
float complex v;
a = REALPART (z);
b = IMAGPART (z);
COMPLEX_ASSIGN (v, cosf (b), sinf (b));
return expf (a) * v;
}
#endif
#if !defined(HAVE_CEXP)
#define HAVE_CEXP
double complex
cexp (double complex z)
{
double a, b;
double complex v;
a = REALPART (z);
b = IMAGPART (z);
COMPLEX_ASSIGN (v, cos (b), sin (b));
return exp (a) * v;
}
#endif
#if !defined(HAVE_CEXPL) && defined(HAVE_COSL) && defined(HAVE_SINL) && defined(EXPL)
#define HAVE_CEXPL
long double complex
cexpl (long double complex z)
{
long double a, b;
long double complex v;
a = REALPART (z);
b = IMAGPART (z);
COMPLEX_ASSIGN (v, cosl (b), sinl (b));
return expl (a) * v;
}
#endif
/* log(z) = log (cabs(z)) + i*carg(z) */
#if !defined(HAVE_CLOGF)
#define HAVE_CLOGF
float complex
clogf (float complex z)
{
float complex v;
COMPLEX_ASSIGN (v, logf (cabsf (z)), cargf (z));
return v;
}
#endif
#if !defined(HAVE_CLOG)
#define HAVE_CLOG
double complex
clog (double complex z)
{
double complex v;
COMPLEX_ASSIGN (v, log (cabs (z)), carg (z));
return v;
}
#endif
#if !defined(HAVE_CLOGL) && defined(HAVE_LOGL) && defined(HAVE_CABSL) && defined(HAVE_CARGL)
#define HAVE_CLOGL
long double complex
clogl (long double complex z)
{
long double complex v;
COMPLEX_ASSIGN (v, logl (cabsl (z)), cargl (z));
return v;
}
#endif
/* log10(z) = log10 (cabs(z)) + i*carg(z) */
#if !defined(HAVE_CLOG10F)
#define HAVE_CLOG10F
float complex
clog10f (float complex z)
{
float complex v;
COMPLEX_ASSIGN (v, log10f (cabsf (z)), cargf (z));
return v;
}
#endif
#if !defined(HAVE_CLOG10)
#define HAVE_CLOG10
double complex
clog10 (double complex z)
{
double complex v;
COMPLEX_ASSIGN (v, log10 (cabs (z)), carg (z));
return v;
}
#endif
#if !defined(HAVE_CLOG10L) && defined(HAVE_LOG10L) && defined(HAVE_CABSL) && defined(HAVE_CARGL)
#define HAVE_CLOG10L
long double complex
clog10l (long double complex z)
{
long double complex v;
COMPLEX_ASSIGN (v, log10l (cabsl (z)), cargl (z));
return v;
}
#endif
/* pow(base, power) = cexp (power * clog (base)) */
#if !defined(HAVE_CPOWF)
#define HAVE_CPOWF
float complex
cpowf (float complex base, float complex power)
{
return cexpf (power * clogf (base));
}
#endif
#if !defined(HAVE_CPOW)
#define HAVE_CPOW
double complex
cpow (double complex base, double complex power)
{
return cexp (power * clog (base));
}
#endif
#if !defined(HAVE_CPOWL) && defined(HAVE_CEXPL) && defined(HAVE_CLOGL)
#define HAVE_CPOWL
long double complex
cpowl (long double complex base, long double complex power)
{
return cexpl (power * clogl (base));
}
#endif
/* sqrt(z). Algorithm pulled from glibc. */
#if !defined(HAVE_CSQRTF)
#define HAVE_CSQRTF
float complex
csqrtf (float complex z)
{
float re, im;
float complex v;
re = REALPART (z);
im = IMAGPART (z);
if (im == 0)
{
if (re < 0)
{
COMPLEX_ASSIGN (v, 0, copysignf (sqrtf (-re), im));
}
else
{
COMPLEX_ASSIGN (v, fabsf (sqrtf (re)), copysignf (0, im));
}
}
else if (re == 0)
{
float r;
r = sqrtf (0.5 * fabsf (im));
COMPLEX_ASSIGN (v, copysignf (r, im), r);
}
else
{
float d, r, s;
d = hypotf (re, im);
/* Use the identity 2 Re res Im res = Im x
to avoid cancellation error in d +/- Re x. */
if (re > 0)
{
r = sqrtf (0.5 * d + 0.5 * re);
s = (0.5 * im) / r;
}
else
{
s = sqrtf (0.5 * d - 0.5 * re);
r = fabsf ((0.5 * im) / s);
}
COMPLEX_ASSIGN (v, r, copysignf (s, im));
}
return v;
}
#endif
#if !defined(HAVE_CSQRT)
#define HAVE_CSQRT
double complex
csqrt (double complex z)
{
double re, im;
double complex v;
re = REALPART (z);
im = IMAGPART (z);
if (im == 0)
{
if (re < 0)
{
COMPLEX_ASSIGN (v, 0, copysign (sqrt (-re), im));
}
else
{
COMPLEX_ASSIGN (v, fabs (sqrt (re)), copysign (0, im));
}
}
else if (re == 0)
{
double r;
r = sqrt (0.5 * fabs (im));
COMPLEX_ASSIGN (v, copysign (r, im), r);
}
else
{
double d, r, s;
d = hypot (re, im);
/* Use the identity 2 Re res Im res = Im x
to avoid cancellation error in d +/- Re x. */
if (re > 0)
{
r = sqrt (0.5 * d + 0.5 * re);
s = (0.5 * im) / r;
}
else
{
s = sqrt (0.5 * d - 0.5 * re);
r = fabs ((0.5 * im) / s);
}
COMPLEX_ASSIGN (v, r, copysign (s, im));
}
return v;
}
#endif
#if !defined(HAVE_CSQRTL) && defined(HAVE_COPYSIGNL) && defined(HAVE_SQRTL) && defined(HAVE_FABSL) && defined(HAVE_HYPOTL)
#define HAVE_CSQRTL
long double complex
csqrtl (long double complex z)
{
long double re, im;
long double complex v;
re = REALPART (z);
im = IMAGPART (z);
if (im == 0)
{
if (re < 0)
{
COMPLEX_ASSIGN (v, 0, copysignl (sqrtl (-re), im));
}
else
{
COMPLEX_ASSIGN (v, fabsl (sqrtl (re)), copysignl (0, im));
}
}
else if (re == 0)
{
long double r;
r = sqrtl (0.5 * fabsl (im));
COMPLEX_ASSIGN (v, copysignl (r, im), r);
}
else
{
long double d, r, s;
d = hypotl (re, im);
/* Use the identity 2 Re res Im res = Im x
to avoid cancellation error in d +/- Re x. */
if (re > 0)
{
r = sqrtl (0.5 * d + 0.5 * re);
s = (0.5 * im) / r;
}
else
{
s = sqrtl (0.5 * d - 0.5 * re);
r = fabsl ((0.5 * im) / s);
}
COMPLEX_ASSIGN (v, r, copysignl (s, im));
}
return v;
}
#endif
/* sinh(a + i b) = sinh(a) cos(b) + i cosh(a) sin(b) */
#if !defined(HAVE_CSINHF)
#define HAVE_CSINHF
float complex
csinhf (float complex a)
{
float r, i;
float complex v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, sinhf (r) * cosf (i), coshf (r) * sinf (i));
return v;
}
#endif
#if !defined(HAVE_CSINH)
#define HAVE_CSINH
double complex
csinh (double complex a)
{
double r, i;
double complex v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, sinh (r) * cos (i), cosh (r) * sin (i));
return v;
}
#endif
#if !defined(HAVE_CSINHL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
#define HAVE_CSINHL
long double complex
csinhl (long double complex a)
{
long double r, i;
long double complex v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, sinhl (r) * cosl (i), coshl (r) * sinl (i));
return v;
}
#endif
/* cosh(a + i b) = cosh(a) cos(b) - i sinh(a) sin(b) */
#if !defined(HAVE_CCOSHF)
#define HAVE_CCOSHF
float complex
ccoshf (float complex a)
{
float r, i;
float complex v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, coshf (r) * cosf (i), - (sinhf (r) * sinf (i)));
return v;
}
#endif
#if !defined(HAVE_CCOSH)
#define HAVE_CCOSH
double complex
ccosh (double complex a)
{
double r, i;
double complex v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, cosh (r) * cos (i), - (sinh (r) * sin (i)));
return v;
}
#endif
#if !defined(HAVE_CCOSHL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
#define HAVE_CCOSHL
long double complex
ccoshl (long double complex a)
{
long double r, i;
long double complex v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, coshl (r) * cosl (i), - (sinhl (r) * sinl (i)));
return v;
}
#endif
/* tanh(a + i b) = (tanh(a) + i tan(b)) / (1 - i tanh(a) tan(b)) */
#if !defined(HAVE_CTANHF)
#define HAVE_CTANHF
float complex
ctanhf (float complex a)
{
float rt, it;
float complex n, d;
rt = tanhf (REALPART (a));
it = tanf (IMAGPART (a));
COMPLEX_ASSIGN (n, rt, it);
COMPLEX_ASSIGN (d, 1, - (rt * it));
return n / d;
}
#endif
#if !defined(HAVE_CTANH)
#define HAVE_CTANH
double complex
ctanh (double complex a)
{
double rt, it;
double complex n, d;
rt = tanh (REALPART (a));
it = tan (IMAGPART (a));
COMPLEX_ASSIGN (n, rt, it);
COMPLEX_ASSIGN (d, 1, - (rt * it));
return n / d;
}
#endif
#if !defined(HAVE_CTANHL) && defined(HAVE_TANL) && defined(HAVE_TANHL)
#define HAVE_CTANHL
long double complex
ctanhl (long double complex a)
{
long double rt, it;
long double complex n, d;
rt = tanhl (REALPART (a));
it = tanl (IMAGPART (a));
COMPLEX_ASSIGN (n, rt, it);
COMPLEX_ASSIGN (d, 1, - (rt * it));
return n / d;
}
#endif
/* sin(a + i b) = sin(a) cosh(b) + i cos(a) sinh(b) */
#if !defined(HAVE_CSINF)
#define HAVE_CSINF
float complex
csinf (float complex a)
{
float r, i;
float complex v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, sinf (r) * coshf (i), cosf (r) * sinhf (i));
return v;
}
#endif
#if !defined(HAVE_CSIN)
#define HAVE_CSIN
double complex
csin (double complex a)
{
double r, i;
double complex v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, sin (r) * cosh (i), cos (r) * sinh (i));
return v;
}
#endif
#if !defined(HAVE_CSINL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
#define HAVE_CSINL
long double complex
csinl (long double complex a)
{
long double r, i;
long double complex v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, sinl (r) * coshl (i), cosl (r) * sinhl (i));
return v;
}
#endif
/* cos(a + i b) = cos(a) cosh(b) - i sin(a) sinh(b) */
#if !defined(HAVE_CCOSF)
#define HAVE_CCOSF
float complex
ccosf (float complex a)
{
float r, i;
float complex v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, cosf (r) * coshf (i), - (sinf (r) * sinhf (i)));
return v;
}
#endif
#if !defined(HAVE_CCOS)
#define HAVE_CCOS
double complex
ccos (double complex a)
{
double r, i;
double complex v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, cos (r) * cosh (i), - (sin (r) * sinh (i)));
return v;
}
#endif
#if !defined(HAVE_CCOSL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
#define HAVE_CCOSL
long double complex
ccosl (long double complex a)
{
long double r, i;
long double complex v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, cosl (r) * coshl (i), - (sinl (r) * sinhl (i)));
return v;
}
#endif
/* tan(a + i b) = (tan(a) + i tanh(b)) / (1 - i tan(a) tanh(b)) */
#if !defined(HAVE_CTANF)
#define HAVE_CTANF
float complex
ctanf (float complex a)
{
float rt, it;
float complex n, d;
rt = tanf (REALPART (a));
it = tanhf (IMAGPART (a));
COMPLEX_ASSIGN (n, rt, it);
COMPLEX_ASSIGN (d, 1, - (rt * it));
return n / d;
}
#endif
#if !defined(HAVE_CTAN)
#define HAVE_CTAN
double complex
ctan (double complex a)
{
double rt, it;
double complex n, d;
rt = tan (REALPART (a));
it = tanh (IMAGPART (a));
COMPLEX_ASSIGN (n, rt, it);
COMPLEX_ASSIGN (d, 1, - (rt * it));
return n / d;
}
#endif
#if !defined(HAVE_CTANL) && defined(HAVE_TANL) && defined(HAVE_TANHL)
#define HAVE_CTANL
long double complex
ctanl (long double complex a)
{
long double rt, it;
long double complex n, d;
rt = tanl (REALPART (a));
it = tanhl (IMAGPART (a));
COMPLEX_ASSIGN (n, rt, it);
COMPLEX_ASSIGN (d, 1, - (rt * it));
return n / d;
}
#endif

View File

@ -38,15 +38,15 @@ Boston, MA 02110-1301, USA. */
#define M_PI 3.14159265358979323846264338327
#endif
#include "config.h"
#include "c99_protos.h"
#if HAVE_COMPLEX_H
# include <complex.h>
#else
#define complex __complex__
#endif
#include "config.h"
#include "c99_protos.h"
#if HAVE_IEEEFP_H
#include <ieeefp.h>
#endif

View File

@ -1,146 +0,0 @@
`/* Complex exponential functions
Copyright 2002, 2004 Free Software Foundation, Inc.
Contributed by Paul Brook <paul@nowt.org>
This file is part of the GNU Fortran 95 runtime library (libgfortran).
Libgfortran is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
In addition to the permissions in the GNU General Public License, the
Free Software Foundation gives you unlimited permission to link the
compiled version of this file into combinations with other programs,
and to distribute those combinations without any restriction coming
from the use of this file. (The General Public License restrictions
do apply in other respects; for example, they cover modification of
the file, and distribution when not linked into a combine
executable.)
Libgfortran 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 General Public License for more details.
You should have received a copy of the GNU General Public
License along with libgfortran; see the file COPYING. If not,
write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
#include <math.h>
#include "libgfortran.h"'
include(`mtype.m4')dnl
/* z = a + ib */
/* Absolute value. */
real_type
cabs`'q (complex_type z)
{
return hypot`'q (REALPART (z), IMAGPART (z));
}
/* Complex argument. The angle made with the +ve real axis.
Range -pi-pi. */
real_type
carg`'q (complex_type z)
{
real_type arg;
return atan2`'q (IMAGPART (z), REALPART (z));
}
/* exp(z) = exp(a)*(cos(b) + isin(b)) */
complex_type
cexp`'q (complex_type z)
{
real_type a;
real_type b;
complex_type v;
a = REALPART (z);
b = IMAGPART (z);
COMPLEX_ASSIGN (v, cos`'q (b), sin`'q (b));
return exp`'q (a) * v;
}
/* log(z) = log (cabs(z)) + i*carg(z) */
complex_type
clog`'q (complex_type z)
{
complex_type v;
COMPLEX_ASSIGN (v, log`'q (cabs`'q (z)), carg`'q (z));
return v;
}
/* log10(z) = log10 (cabs(z)) + i*carg(z) */
complex_type
clog10`'q (complex_type z)
{
complex_type v;
COMPLEX_ASSIGN (v, log10`'q (cabs`'q (z)), carg`'q (z));
return v;
}
/* pow(base, power) = cexp (power * clog (base)) */
complex_type
cpow`'q (complex_type base, complex_type power)
{
return cexp`'q (power * clog`'q (base));
}
/* sqrt(z). Algorithm pulled from glibc. */
complex_type
csqrt`'q (complex_type z)
{
real_type re;
real_type im;
complex_type v;
re = REALPART (z);
im = IMAGPART (z);
if (im == 0.0)
{
if (re < 0.0)
{
COMPLEX_ASSIGN (v, 0.0, copysign`'q (sqrt`'q (-re), im));
}
else
{
COMPLEX_ASSIGN (v, fabs`'q (sqrt`'q (re)),
copysign`'q (0.0, im));
}
}
else if (re == 0.0)
{
real_type r;
r = sqrt`'q (0.5 * fabs`'q (im));
COMPLEX_ASSIGN (v, copysign`'q (r, im), r);
}
else
{
real_type d, r, s;
d = hypot`'q (re, im);
/* Use the identity 2 Re res Im res = Im x
to avoid cancellation error in d +/- Re x. */
if (re > 0)
{
r = sqrt`'q (0.5 * d + 0.5 * re);
s = (0.5 * im) / r;
}
else
{
s = sqrt`'q (0.5 * d - 0.5 * re);
r = fabs`'q ((0.5 * im) / s);
}
COMPLEX_ASSIGN (v, r, copysign`'q (s, im));
}
return v;
}

View File

@ -1,81 +0,0 @@
`/* Complex hyperbolic functions
Copyright 2002 Free Software Foundation, Inc.
Contributed by Paul Brook <paul@nowt.org>
This file is part of the GNU Fortran 95 runtime library (libgfortran).
Libgfortran is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
In addition to the permissions in the GNU General Public License, the
Free Software Foundation gives you unlimited permission to link the
compiled version of this file into combinations with other programs,
and to distribute those combinations without any restriction coming
from the use of this file. (The General Public License restrictions
do apply in other respects; for example, they cover modification of
the file, and distribution when not linked into a combine
executable.)
Libgfortran 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 General Public License for more details.
You should have received a copy of the GNU General Public
License along with libgfortran; see the file COPYING. If not,
write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
#include <math.h>
#include "libgfortran.h"'
include(`mtype.m4')dnl
/* Complex number z = a + ib. */
/* sinh(z) = sinh(a)cos(b) + icosh(a)sin(b) */
complex_type
csinh`'q (complex_type a)
{
real_type r;
real_type i;
complex_type v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, sinh`'q (r) * cos`'q (i), cosh`'q (r) * sin`'q (i));
return v;
}
/* cosh(z) = cosh(a)cos(b) - isinh(a)sin(b) */
complex_type
ccosh`'q (complex_type a)
{
real_type r;
real_type i;
complex_type v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, cosh`'q (r) * cos`'q (i), - (sinh`'q (r) * sin`'q (i)));
return v;
}
/* tanh(z) = (tanh(a) + itan(b)) / (1 - itanh(a)tan(b)) */
complex_type
ctanh`'q (complex_type a)
{
real_type rt;
real_type it;
complex_type n;
complex_type d;
rt = tanh`'q (REALPART (a));
it = tan`'q (IMAGPART (a));
COMPLEX_ASSIGN (n, rt, it);
COMPLEX_ASSIGN (d, 1, - (rt * it));
return n / d;
}

View File

@ -1,81 +0,0 @@
`/* Complex trig functions
Copyright 2002 Free Software Foundation, Inc.
Contributed by Paul Brook <paul@nowt.org>
This file is part of the GNU Fortran 95 runtime library (libgfortran).
Libgfortran is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
In addition to the permissions in the GNU General Public License, the
Free Software Foundation gives you unlimited permission to link the
compiled version of this file into combinations with other programs,
and to distribute those combinations without any restriction coming
from the use of this file. (The General Public License restrictions
do apply in other respects; for example, they cover modification of
the file, and distribution when not linked into a combine
executable.)
Libgfortran 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 General Public License for more details.
You should have received a copy of the GNU General Public
License along with libgfortran; see the file COPYING. If not,
write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
#include <math.h>
#include "libgfortran.h"'
include(`mtype.m4')dnl
/* Complex number z = a + ib. */
/* sin(z) = sin(a)cosh(b) + icos(a)sinh(b) */
complex_type
csin`'q (complex_type a)
{
real_type r;
real_type i;
complex_type v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, sin`'q (r) * cosh`'q (i), cos`'q (r) * sinh`'q (i));
return v;
}
/* cos(z) = cos(a)cosh(b) - isin(a)sinh(b) */
complex_type
ccos`'q (complex_type a)
{
real_type r;
real_type i;
complex_type v;
r = REALPART (a);
i = IMAGPART (a);
COMPLEX_ASSIGN (v, cos`'q (r) * cosh`'q (i), - (sin`'q (r) * sinh`'q (i)));
return v;
}
/* tan(z) = (tan(a) + itanh(b)) / (1 - itan(a)tanh(b)) */
complex_type
ctan`'q (complex_type a)
{
real_type rt;
real_type it;
complex_type n;
complex_type d;
rt = tan`'q (REALPART (a));
it = tanh`'q (IMAGPART (a));
COMPLEX_ASSIGN (n, rt, it);
COMPLEX_ASSIGN (d , 1, - (rt * it));
return n / d;
}