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.9-35-g1f4f2a


From: Mark H Weaver
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.9-35-g1f4f2a1
Date: Tue, 16 Jul 2013 16:20:23 +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=1f4f2a12d093fe4f156ef25ebc4a25d05185e5f9

The branch, stable-2.0 has been updated
       via  1f4f2a12d093fe4f156ef25ebc4a25d05185e5f9 (commit)
       via  a1c9ecf0a46fb3b09a268030f790aa487d38a433 (commit)
      from  3bbca1f7237c0e9d9419eaea8f274c9cd7314f04 (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 1f4f2a12d093fe4f156ef25ebc4a25d05185e5f9
Author: Mark H Weaver <address@hidden>
Date:   Tue Jul 16 12:12:25 2013 -0400

    Update copyright dates of recently-changed R6RS bitwise/flonums files.
    
    * module/rnrs/arithmetic/bitwise.scm:
      module/rnrs/arithmetic/flonums.scm:
      test-suite/tests/r6rs-arithmetic-bitwise.test:
      test-suite/tests/r6rs-arithmetic-flonums.test: Add 2013 to the
      copyright dates.

commit a1c9ecf0a46fb3b09a268030f790aa487d38a433
Author: Mark H Weaver <address@hidden>
Date:   Tue Jul 16 12:06:45 2013 -0400

    Fix 'fxbit-count' for negative arguments.
    
    Reported by Göran Weinholt <address@hidden>.
    
    * module/rnrs/arithmetic/fixnums.scm (fxbit-count): If the argument is
      negative, return the 'bitwise-not' of the result of 'logcount', as per
      R6RS.  Previously, 'fxbit-count' was identical to 'logcount'.
    
    * test-suite/tests/r6rs-arithmetic-fixnums.test (fxbit-count): Add test.

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

Summary of changes:
 module/rnrs/arithmetic/bitwise.scm            |    2 +-
 module/rnrs/arithmetic/fixnums.scm            |    9 +++++++--
 module/rnrs/arithmetic/flonums.scm            |    2 +-
 test-suite/tests/r6rs-arithmetic-bitwise.test |    2 +-
 test-suite/tests/r6rs-arithmetic-fixnums.test |    6 ++++--
 test-suite/tests/r6rs-arithmetic-flonums.test |    2 +-
 6 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/module/rnrs/arithmetic/bitwise.scm 
b/module/rnrs/arithmetic/bitwise.scm
index ac870ff..0acbc8c 100644
--- a/module/rnrs/arithmetic/bitwise.scm
+++ b/module/rnrs/arithmetic/bitwise.scm
@@ -1,6 +1,6 @@
 ;;; bitwise.scm --- The R6RS bitwise arithmetic operations library
 
-;;      Copyright (C) 2010 Free Software Foundation, Inc.
+;;      Copyright (C) 2010, 2013 Free Software Foundation, Inc.
 ;;
 ;; This library is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU Lesser General Public
diff --git a/module/rnrs/arithmetic/fixnums.scm 
b/module/rnrs/arithmetic/fixnums.scm
index e626199..dbf9ee7 100644
--- a/module/rnrs/arithmetic/fixnums.scm
+++ b/module/rnrs/arithmetic/fixnums.scm
@@ -1,6 +1,6 @@
 ;;; fixnums.scm --- The R6RS fixnums arithmetic library
 
-;;      Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+;;      Copyright (C) 2010, 2011, 2013 Free Software Foundation, Inc.
 ;;
 ;; This library is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU Lesser General Public
@@ -227,7 +227,12 @@
     (assert-fixnum fx1 fx2 fx3) 
     (bitwise-if fx1 fx2 fx3))
 
-  (define (fxbit-count fx) (assert-fixnum fx) (logcount fx))
+  (define (fxbit-count fx)
+    (assert-fixnum fx)
+    (if (negative? fx)
+        (bitwise-not (logcount fx))
+        (logcount fx)))
+
   (define (fxlength fx) (assert-fixnum fx) (bitwise-length fx))
   (define (fxfirst-bit-set fx) (assert-fixnum fx) (bitwise-first-bit-set fx))
   (define (fxbit-set? fx1 fx2) (assert-fixnum fx1 fx2) (logbit? fx2 fx1))
diff --git a/module/rnrs/arithmetic/flonums.scm 
b/module/rnrs/arithmetic/flonums.scm
index fd04a4a..1c4b94c 100644
--- a/module/rnrs/arithmetic/flonums.scm
+++ b/module/rnrs/arithmetic/flonums.scm
@@ -1,6 +1,6 @@
 ;;; flonums.scm --- The R6RS flonums arithmetic library
 
-;;      Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+;;      Copyright (C) 2010, 2011, 2013 Free Software Foundation, Inc.
 ;;
 ;; This library is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU Lesser General Public
diff --git a/test-suite/tests/r6rs-arithmetic-bitwise.test 
b/test-suite/tests/r6rs-arithmetic-bitwise.test
index c864f3b..3b35846 100644
--- a/test-suite/tests/r6rs-arithmetic-bitwise.test
+++ b/test-suite/tests/r6rs-arithmetic-bitwise.test
@@ -1,6 +1,6 @@
 ;;; arithmetic-bitwise.test --- Test suite for R6RS (rnrs arithmetic bitwise)
 
-;;      Copyright (C) 2010 Free Software Foundation, Inc.
+;;      Copyright (C) 2010, 2013 Free Software Foundation, Inc.
 ;;
 ;; This library is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU Lesser General Public
diff --git a/test-suite/tests/r6rs-arithmetic-fixnums.test 
b/test-suite/tests/r6rs-arithmetic-fixnums.test
index d39d544..01a7a89 100644
--- a/test-suite/tests/r6rs-arithmetic-fixnums.test
+++ b/test-suite/tests/r6rs-arithmetic-fixnums.test
@@ -1,6 +1,6 @@
 ;;; arithmetic-fixnums.test --- Test suite for R6RS (rnrs arithmetic bitwise)
 
-;;      Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+;;      Copyright (C) 2010, 2011, 2013 Free Software Foundation, Inc.
 ;;
 ;; This library is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU Lesser General Public
@@ -157,7 +157,9 @@
 
 (with-test-prefix "fxif" (pass-if "simple" (fx=? (fxif 5 3 4) 1)))
 
-(with-test-prefix "fxbit-count" (pass-if "simple" (fx=? (fxbit-count 5) 2)))
+(with-test-prefix "fxbit-count"
+  (pass-if "simple" (fx=? (fxbit-count 5) 2))
+  (pass-if "negative" (fx=? (fxbit-count -5) -2)))
 
 (with-test-prefix "fxlength" (pass-if "simple" (fx=? (fxlength 5) 3)))
 
diff --git a/test-suite/tests/r6rs-arithmetic-flonums.test 
b/test-suite/tests/r6rs-arithmetic-flonums.test
index 3df00b2..ea425e3 100644
--- a/test-suite/tests/r6rs-arithmetic-flonums.test
+++ b/test-suite/tests/r6rs-arithmetic-flonums.test
@@ -1,6 +1,6 @@
 ;;; arithmetic-flonums.test --- Test suite for R6RS (rnrs arithmetic flonums)
 
-;;      Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+;;      Copyright (C) 2010, 2011, 2013 Free Software Foundation, Inc.
 ;;
 ;; This library is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU Lesser General Public


hooks/post-receive
-- 
GNU Guile



reply via email to

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