[oct-scm] [oct-git]OCT: A portable Lisp implementation for quad-double precision floats branch master updated. 08d254374188f97026d114451bba5d839dbdad11

Raymond Toy rtoy at common-lisp.net
Tue Mar 29 03:47:14 UTC 2011


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 "OCT:  A portable Lisp implementation for quad-double precision floats".

The branch, master has been updated
       via  08d254374188f97026d114451bba5d839dbdad11 (commit)
      from  c31b1cdd112f26334b7762014d3afb781917ebda (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 08d254374188f97026d114451bba5d839dbdad11
Author: Raymond Toy <toy.raymond at gmail.com>
Date:   Mon Mar 28 22:54:32 2011 -0400

    Make INCOMPLETE-GAMMA-TAIL more accurate.
    
    o Use the new continued fraction for the incomplete-gamma when the
      argument z is close enough to the negative real axis.

diff --git a/qd-gamma.lisp b/qd-gamma.lisp
index e020a91..7048b80 100644
--- a/qd-gamma.lisp
+++ b/qd-gamma.lisp
@@ -372,8 +372,15 @@
 	(if (and (> (abs z) (abs (- a 1)))
 		(not (minusp (realpart z))))
 	    (cf-incomplete-gamma-tail a z)
-	    (- (gamma a) (incomplete-gamma a z)))
-	(cf-incomplete-gamma-tail a z))))
+	    (- (gamma a) (cf-incomplete-gamma a z)))
+	;; If the argument is close enough to the negative real axis,
+	;; the continued fraction for the tail is not very accurate.
+	;; Use the incomplete gamma function to evaluate in this
+	;; region.  (Arbitrarily selected the region to be a sector.
+	;; But what is the correct size of this sector?)
+	(if (<= (phase z) 3.1)
+	    (cf-incomplete-gamma-tail a z)
+	    (- (gamma a) (cf-incomplete-gamma a z))))))
 
 (defun incomplete-gamma (a z)
   "Incomplete gamma function defined by:

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

Summary of changes:
 qd-gamma.lisp |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
OCT:  A portable Lisp implementation for quad-double precision floats




More information about the oct-cvs mailing list