From: Joe Neeman Date: Mon, 1 May 2006 00:49:08 +0000 (+0000) Subject: fix guile 1.6 compatibility in inf? and nan? X-Git-Tag: release/2.9.3~16 X-Git-Url: https://git.donarmstrong.com/lilypond.git?a=commitdiff_plain;h=d23b7eb490035c646066efcd799f09fcc769dfd8;p=lilypond.git fix guile 1.6 compatibility in inf? and nan? --- diff --git a/ChangeLog b/ChangeLog index 4bb107f705..dadea9805f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-05-01 Joe Neeman + + * scm/lily-library.scm: Fix guile 1.6 compatibility in inf? and nan? + 2006-05-01 Han-Wen Nienhuys * scripts/abc2ly.py (dump_score): indent of 4 for python code. diff --git a/scm/lily-library.scm b/scm/lily-library.scm index 8d12c350d7..6b2a8b4259 100644 --- a/scm/lily-library.scm +++ b/scm/lily-library.scm @@ -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