mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-28 16:00:22 +02:00
* configure.in (HAVE_CRYPT): check for cexp, clog, carg
* numbers.c (carg): provide carg, cexp, clog in case they are missing.
This commit is contained in:
parent
afb49959b0
commit
1d8ce4c04d
4 changed files with 41 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2007-04-09 Han-Wen Nienhuys <hanwen@lilypond.org>
|
||||||
|
|
||||||
|
* configure.in (HAVE_CRYPT): check for cexp, clog, carg
|
||||||
|
|
||||||
2007-02-24 Neil Jerram <neil@ossau.uklinux.net>
|
2007-02-24 Neil Jerram <neil@ossau.uklinux.net>
|
||||||
|
|
||||||
* autogen.sh: Announce versions of autoconf, automake, libtool and
|
* autogen.sh: Announce versions of autoconf, automake, libtool and
|
||||||
|
|
|
@ -675,6 +675,8 @@ AC_SEARCH_LIBS(crypt, crypt,
|
||||||
# for the principal root.
|
# for the principal root.
|
||||||
#
|
#
|
||||||
if test "$ac_cv_type_complex_double" = yes; then
|
if test "$ac_cv_type_complex_double" = yes; then
|
||||||
|
|
||||||
|
AC_CHECK_FUNCS(cexp clog carg)
|
||||||
AC_CACHE_CHECK([whether csqrt is usable],
|
AC_CACHE_CHECK([whether csqrt is usable],
|
||||||
guile_cv_use_csqrt,
|
guile_cv_use_csqrt,
|
||||||
[AC_TRY_RUN([
|
[AC_TRY_RUN([
|
||||||
|
@ -1232,7 +1234,7 @@ if test "$cross_compiling" = "yes"; then
|
||||||
AC_MSG_CHECKING(guile for build)
|
AC_MSG_CHECKING(guile for build)
|
||||||
GUILE_FOR_BUILD="${GUILE_FOR_BUILD-guile}"
|
GUILE_FOR_BUILD="${GUILE_FOR_BUILD-guile}"
|
||||||
else
|
else
|
||||||
GUILE_FOR_BUILD='$(preinstguile)'
|
GUILE_FOR_BUILD='$(top_builddir_absolute)/$(preinstguile)'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## AC_MSG_CHECKING("if we are cross compiling")
|
## AC_MSG_CHECKING("if we are cross compiling")
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2007-04-09 Han-Wen Nienhuys <hanwen@lilypond.org>
|
||||||
|
|
||||||
|
* numbers.c (carg): provide carg, cexp, clog in case they are
|
||||||
|
missing.
|
||||||
|
|
||||||
2007-03-12 Ludovic Courtès <ludovic.courtes@laas.fr>
|
2007-03-12 Ludovic Courtès <ludovic.courtes@laas.fr>
|
||||||
|
|
||||||
* i18n.c (scm_nl_langinfo): `#ifdef'd uses of `GROUPING',
|
* i18n.c (scm_nl_langinfo): `#ifdef'd uses of `GROUPING',
|
||||||
|
|
|
@ -5997,6 +5997,35 @@ scm_is_number (SCM z)
|
||||||
return scm_is_true (scm_number_p (z));
|
return scm_is_true (scm_number_p (z));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if HAVE_COMPLEX_DOUBLE
|
||||||
|
#if !HAVE_CLOG
|
||||||
|
complex double clog (complex double z);
|
||||||
|
complex double
|
||||||
|
clog (complex double z)
|
||||||
|
{
|
||||||
|
return log(cabs(z))+I*carg(z);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !HAVE_CEXP
|
||||||
|
complex double cexp (complex double z);
|
||||||
|
complex double
|
||||||
|
cexp (complex double z)
|
||||||
|
{
|
||||||
|
return exp (cabs (z)) * cos(carg (z) + I*sin(carg (z)));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !HAVE_CARG
|
||||||
|
double carg (complex double z);
|
||||||
|
double
|
||||||
|
carg (complex double z)
|
||||||
|
{
|
||||||
|
return atan2 (cimag(z), creal(z));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif HAVE_COMPLEX_DOUBLE
|
||||||
|
|
||||||
|
|
||||||
/* In the following functions we dispatch to the real-arg funcs like log()
|
/* In the following functions we dispatch to the real-arg funcs like log()
|
||||||
when we know the arg is real, instead of just handing everything to
|
when we know the arg is real, instead of just handing everything to
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue