guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, master, updated. release_1-9-11-24-ga4


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-11-24-ga4082ab
Date: Mon, 07 Jun 2010 21:25:47 +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=a4082ab57e81c1826906c1a8601593e8dea5078c

The branch, master has been updated
       via  a4082ab57e81c1826906c1a8601593e8dea5078c (commit)
      from  78f79f18e2dd7de64a43b3dc195db2c5485cde17 (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 a4082ab57e81c1826906c1a8601593e8dea5078c
Author: Andy Wingo <address@hidden>
Date:   Mon Jun 7 23:27:55 2010 +0200

    fix (expt #t 0)
    
    * libguile/numbers.c (scm_expt): Fix check regarding when to dispatch to
      integer-expt.
    
    * test-suite/tests/numbers.test ("expt"): Add test.

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

Summary of changes:
 libguile/numbers.c            |    2 +-
 test-suite/tests/numbers.test |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/libguile/numbers.c b/libguile/numbers.c
index b1c918f..ca4330b 100644
--- a/libguile/numbers.c
+++ b/libguile/numbers.c
@@ -5466,7 +5466,7 @@ SCM_DEFINE (scm_expt, "expt", 2, 0, 0,
            "Return @var{x} raised to the power of @var{y}.") 
 #define FUNC_NAME s_scm_expt
 {
-  if (!SCM_INEXACTP (y) && scm_is_integer (y))
+  if ((SCM_I_INUMP (x) || SCM_BIGP (x)) && scm_is_integer (y))
     return scm_integer_expt (x, y);
   else if (scm_is_real (x) && scm_is_real (y) && scm_to_double (x) >= 0.0)
     {
diff --git a/test-suite/tests/numbers.test b/test-suite/tests/numbers.test
index 3f26712..fae86e4 100644
--- a/test-suite/tests/numbers.test
+++ b/test-suite/tests/numbers.test
@@ -2875,6 +2875,8 @@
 ;;;
 
 (with-test-prefix "expt"
+  (pass-if-exception "non-numeric base" exception:wrong-type-arg
+                     (expt #t 0))
   (pass-if "(= 1 (expt 0 0))" (= 1 (expt 0 0)))
   (pass-if "(= 1 (expt 0 0.0))" (= 1 (expt 0 0.0)))
   (pass-if "(= 1 (expt 0.0 0))" (= 1 (expt 0.0 0)))


hooks/post-receive
-- 
GNU Guile



reply via email to

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