guile-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Improved log/log10, add round-ash


From: Mark H Weaver
Subject: Re: [PATCH] Improved log/log10, add round-ash
Date: Tue, 15 Feb 2011 19:39:33 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

address@hidden (Ludovic Courtès) writes:
> I applied them both.  I’ll revert the latter tomorrow if it breaks on
> some other platform.

I see one potential portability problem with the new patch.
Can you please apply the attached fix?

With this new patch applied, I think it should be portable,
assuming that the mysterious log1p gnulib module works.

    Thanks,
      Mark


>From 873dfab119592658adce812a0fea0d6a688a3637 Mon Sep 17 00:00:00 2001
From: Mark H Weaver <address@hidden>
Date: Tue, 15 Feb 2011 19:29:41 -0500
Subject: [PATCH] Portability fix for new log and log10

* libguile/numbers.c: Define M_LN2 if it's not already defined.
  Fix error in comment.
---
 libguile/numbers.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/libguile/numbers.c b/libguile/numbers.c
index d0aacb7..b8cfa5d 100644
--- a/libguile/numbers.c
+++ b/libguile/numbers.c
@@ -72,6 +72,9 @@
 #ifndef M_LOG10E
 #define M_LOG10E   0.43429448190325182765
 #endif
+#ifndef M_LN2
+#define M_LN2     0.69314718055994530942
+#endif
 #ifndef M_PI
 #define M_PI       3.14159265358979323846
 #endif
@@ -9399,7 +9402,7 @@ log_of_exact_integer_with_size (SCM n, long size)
     return log_of_shifted_double (scm_to_double (n), 0);
 }
 
-/* Returns log(n), for exact integer n of integer-length size */
+/* Returns log(n), for exact integer n */
 static SCM
 log_of_exact_integer (SCM n)
 {
-- 
1.7.1


reply via email to

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