guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.6-9-gecbded7


From: Mark H Weaver
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.6-9-gecbded7
Date: Wed, 01 Aug 2012 03:02:35 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=ecbded71bb423a6055c541d6272796aefd1486f9

The branch, stable-2.0 has been updated
       via  ecbded71bb423a6055c541d6272796aefd1486f9 (commit)
      from  cc26b9de1d3c21cb4be49cc61c4b5872b8f607c5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ecbded71bb423a6055c541d6272796aefd1486f9
Author: Mark H Weaver <address@hidden>
Date:   Tue Jul 31 22:52:17 2012 -0400

    Avoid cexp, whose C standard definition is mathematically incorrect
    
    * libguile/numbers.c (scm_exp): Do not use cexp.

-----------------------------------------------------------------------

Summary of changes:
 libguile/numbers.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libguile/numbers.c b/libguile/numbers.c
index 52e227f..3ea88ea 100644
--- a/libguile/numbers.c
+++ b/libguile/numbers.c
@@ -9593,13 +9593,13 @@ SCM_PRIMITIVE_GENERIC (scm_exp, "exp", 1, 0, 0,
 {
   if (SCM_COMPLEXP (z))
     {
-#if defined HAVE_COMPLEX_DOUBLE && defined HAVE_CEXP \
-  && defined (SCM_COMPLEX_VALUE)
-      return scm_from_complex_double (cexp (SCM_COMPLEX_VALUE (z)));
-#else
+      /* Unfortunately we cannot use cexp() here, because both C99 and
+         C11 specify behavior for cexp() that is mathematically
+         incorrect.  In particular, they specify in annex G.6.3.1
+         that cexp(+inf.0+inf.0i) and cexp(+inf.0+nan.0i) return
+         +inf.0+nan.0i or -inf.0+nan.0i. */
       return scm_c_make_polar (exp (SCM_COMPLEX_REAL (z)),
                                SCM_COMPLEX_IMAG (z));
-#endif
     }
   else if (SCM_NUMBERP (z))
     {


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]