[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.6-11-g639fd0
From: |
Mark H Weaver |
Subject: |
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.6-11-g639fd0a |
Date: |
Tue, 07 Aug 2012 22:14:57 +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=639fd0a44265ba9223793eea9b5ae4d3c4da5237
The branch, stable-2.0 has been updated
via 639fd0a44265ba9223793eea9b5ae4d3c4da5237 (commit)
via 93723f3d1d4ed211a7a0d1ec547dfeb005424490 (commit)
from ecbded71bb423a6055c541d6272796aefd1486f9 (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 639fd0a44265ba9223793eea9b5ae4d3c4da5237
Author: Mark H Weaver <address@hidden>
Date: Tue Aug 7 18:14:32 2012 -0400
Revert "Add tests for 'exp' and 'expt' that should produce complex NaNs"
This reverts commit cc26b9de1d3c21cb4be49cc61c4b5872b8f607c5.
commit 93723f3d1d4ed211a7a0d1ec547dfeb005424490
Author: Mark H Weaver <address@hidden>
Date: Tue Aug 7 18:13:48 2012 -0400
Revert "Avoid cexp, whose C standard definition is mathematically incorrect"
This reverts commit ecbded71bb423a6055c541d6272796aefd1486f9.
-----------------------------------------------------------------------
Summary of changes:
libguile/numbers.c | 10 +++++-----
test-suite/tests/numbers.test | 12 +-----------
2 files changed, 6 insertions(+), 16 deletions(-)
diff --git a/libguile/numbers.c b/libguile/numbers.c
index 3ea88ea..52e227f 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))
{
- /* 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. */
+#if defined HAVE_COMPLEX_DOUBLE && defined HAVE_CEXP \
+ && defined (SCM_COMPLEX_VALUE)
+ return scm_from_complex_double (cexp (SCM_COMPLEX_VALUE (z)));
+#else
return scm_c_make_polar (exp (SCM_COMPLEX_REAL (z)),
SCM_COMPLEX_IMAG (z));
+#endif
}
else if (SCM_NUMBERP (z))
{
diff --git a/test-suite/tests/numbers.test b/test-suite/tests/numbers.test
index 35fe707..a6697c9 100644
--- a/test-suite/tests/numbers.test
+++ b/test-suite/tests/numbers.test
@@ -332,16 +332,7 @@
(eqv-loosely? 1.0 (exp 0+6.28318i)))
(pass-if "exp(2-pi*i) = -e^2"
- (eqv-loosely? (- const-e^2) (exp 2.0-3.14159i)))
-
- (pass-if "exp(+inf.0i) = nan.0+nan.0i"
- (complex-nan? (exp +inf.0i)))
- (pass-if "exp(+nan.0i) = nan.0+nan.0i"
- (complex-nan? (exp +nan.0i)))
- (pass-if "exp(inf.0+inf.0i) = nan.0+nan.0i"
- (complex-nan? (exp +inf.0+inf.0i)))
- (pass-if "exp(inf.0-inf.0i) = nan.0+nan.0i"
- (complex-nan? (exp +inf.0-inf.0i))))
+ (eqv-loosely? (- const-e^2) (exp 2.0-3.14159i))))
;;;
;;; odd?
@@ -4030,7 +4021,6 @@
(pass-if (real-nan? (expt 0 -1.0)))
(pass-if (real-nan? (expt 0.0 -1)))
(pass-if (real-nan? (expt 0.0 -1.0)))
- (pass-if (complex-nan? (expt 0.0 -1.0+1.0i)))
(pass-if (eqv? 0 (expt 0 3)))
(pass-if (= 0 (expt 0 4.0)))
(pass-if (eqv? 0.0 (expt 0.0 5)))
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.6-11-g639fd0a,
Mark H Weaver <=