mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-30 15:00:21 +02:00
Clarify feature macro conditionals.
* libguile/numbers.c (scm_log10): Check whether `HAVE_COMPLEX_DOUBLE' and `HAVE_CLOG10' are defined instead of checking whether they are non-zero. (scm_sqrt): Likewise for `HAVE_COMPLEX_DOUBLE' and `HAVE_USABLE_CSQRT'.
This commit is contained in:
parent
2e65b52f8a
commit
f328f86230
1 changed files with 4 additions and 2 deletions
|
@ -6440,7 +6440,8 @@ SCM_DEFINE (scm_log10, "log10", 1, 0, 0,
|
||||||
/* Mingw has clog() but not clog10(). (Maybe it'd be worth using
|
/* Mingw has clog() but not clog10(). (Maybe it'd be worth using
|
||||||
clog() and a multiply by M_LOG10E, rather than the fallback
|
clog() and a multiply by M_LOG10E, rather than the fallback
|
||||||
log10+hypot+atan2.) */
|
log10+hypot+atan2.) */
|
||||||
#if HAVE_COMPLEX_DOUBLE && HAVE_CLOG10 && defined (SCM_COMPLEX_VALUE)
|
#if defined HAVE_COMPLEX_DOUBLE && defined HAVE_CLOG10 \
|
||||||
|
&& defined SCM_COMPLEX_VALUE
|
||||||
return scm_from_complex_double (clog10 (SCM_COMPLEX_VALUE (z)));
|
return scm_from_complex_double (clog10 (SCM_COMPLEX_VALUE (z)));
|
||||||
#else
|
#else
|
||||||
double re = SCM_COMPLEX_REAL (z);
|
double re = SCM_COMPLEX_REAL (z);
|
||||||
|
@ -6506,7 +6507,8 @@ SCM_DEFINE (scm_sqrt, "sqrt", 1, 0, 0,
|
||||||
{
|
{
|
||||||
if (SCM_COMPLEXP (x))
|
if (SCM_COMPLEXP (x))
|
||||||
{
|
{
|
||||||
#if HAVE_COMPLEX_DOUBLE && HAVE_USABLE_CSQRT && defined (SCM_COMPLEX_VALUE)
|
#if defined HAVE_COMPLEX_DOUBLE && defined HAVE_USABLE_CSQRT \
|
||||||
|
&& defined SCM_COMPLEX_VALUE
|
||||||
return scm_from_complex_double (csqrt (SCM_COMPLEX_VALUE (x)));
|
return scm_from_complex_double (csqrt (SCM_COMPLEX_VALUE (x)));
|
||||||
#else
|
#else
|
||||||
double re = SCM_COMPLEX_REAL (x);
|
double re = SCM_COMPLEX_REAL (x);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue