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-15-119-gc


From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-15-119-gc15fe49
Date: Tue, 15 Feb 2011 13:44:13 +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=c15fe4999aaeb63eb90c70d1af26e086c8c43362

The branch, master has been updated
       via  c15fe4999aaeb63eb90c70d1af26e086c8c43362 (commit)
      from  14d2ee311642338381e356ff0baa559e9a91bb8c (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 c15fe4999aaeb63eb90c70d1af26e086c8c43362
Author: Mark H Weaver <address@hidden>
Date:   Tue Feb 15 06:10:06 2011 -0500

    Use trunc in scm_i_inexact_truncate_divide
    
    * libguile/numbers.c (scm_i_inexact_truncate_divide): Use trunc instead
      of floor and ceil.  Important for consistency with
      scm_truncate_quotient and scm_truncate_remainder.
    
    Signed-off-by: Ludovic Courtès <address@hidden>

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

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

diff --git a/libguile/numbers.c b/libguile/numbers.c
index 59d8e74..7c4ea1b 100644
--- a/libguile/numbers.c
+++ b/libguile/numbers.c
@@ -2450,11 +2450,8 @@ scm_i_inexact_truncate_divide (double x, double y, SCM 
*qp, SCM *rp)
     scm_num_overflow (s_scm_truncate_divide);  /* or return a NaN? */
   else
     {
-      double q, r, q1;
-      /* FIXME: Use trunc, after it has been imported from gnulib */
-      q1 = x / y;
-      q = (q1 >= 0) ? floor (q1) : ceil (q1);
-      r = x - q * y;
+      double q = trunc (x / y);
+      double r = x - q * y;
       *qp = scm_from_double (q);
       *rp = scm_from_double (r);
     }


hooks/post-receive
-- 
GNU Guile



reply via email to

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