]> git.donarmstrong.com Git - lilypond.git/commitdiff
fix guile 1.6 compatibility in inf? and nan?
authorJoe Neeman <joeneeman@gmail.com>
Mon, 1 May 2006 00:49:08 +0000 (00:49 +0000)
committerJoe Neeman <joeneeman@gmail.com>
Mon, 1 May 2006 00:49:08 +0000 (00:49 +0000)
ChangeLog
scm/lily-library.scm

index 4bb107f705a31b576ef4b06976aa223ecbf59af6..dadea9805f80f4490012babb3672bbbd1d5d0f49 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-05-01  Joe Neeman  <joeneeman@gmail.com>
+
+       * scm/lily-library.scm: Fix guile 1.6 compatibility in inf? and nan?
+
 2006-05-01  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
        * scripts/abc2ly.py (dump_score): indent of 4 for python code. 
index 8d12c350d796505eb9d9927bd7e6dcc7fbad1f4d..6b2a8b425971c33f87acbdbb1fb0f35ae1994d69 100644 (file)
@@ -320,10 +320,12 @@ found."
 ;; numbers
 
 (if (not (defined? 'nan?)) ;; guile 1.6 compat
-    (define-public (nan? x) #f))
+    (define-public (nan? x) (not (or (< 0.0 x)
+                                    (> 0.0 x)
+                                    (= 0.0 x)))))
 
 (if (not (defined? 'inf?))
-    (define-public (inf? x) #f))
+    (define-public (inf? x) (= (/ 1.0 x) 0.0)))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; intervals