|
From: dgildea <dg...@us...> - 2026-05-08 00:46:24
|
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 "Maxima CAS".
The branch, master has been updated
via 06f26693d2a59da6bae8c4c701c9532ec1884360 (commit)
from a839c242178862f67880683b18ad0725de6fe2d3 (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 06f26693d2a59da6bae8c4c701c9532ec1884360
Author: Dan Gildea <dgildea>
Date: Thu May 7 20:45:26 2026 -0400
powerseries for expintegral_ei(x) near zero
Fixes #4730 ei-asymptotic-expansion
diff --git a/src/expintegral.lisp b/src/expintegral.lisp
index aae55b342..4bd55fae6 100644
--- a/src/expintegral.lisp
+++ b/src/expintegral.lisp
@@ -831,6 +831,15 @@
(m* `((mfactorial) ,k)
(m^ z (m- k)))))))
+;; computes first pw terms of powerseries expansion of expintegral_ei(z)
+;; DLMF 6.6.1 for limits as z -> 0
+(defun ei-powerseries (pw z)
+ (m+ '$%gamma
+ (take '(%log) z)
+ (m+l (loop for k from 1 to pw collect
+ (m// (m^ z k)
+ (m* k `((mfactorial) ,k)))))))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/src/limit.lisp b/src/limit.lisp
index eee165e00..2527d8cd2 100644
--- a/src/limit.lisp
+++ b/src/limit.lisp
@@ -1246,10 +1246,13 @@ ignoring dummy variables and array indices."
(li-asymptotic-expansion (m- (car (subfunsubs e)) 1)
(car (subfunsubs e))
(car (subfunargs e))))
- ((and (eq (caar e) '%expintegral_ei)
- (let ((arglim (limit (cadr e) var val 'think)))
- (eq arglim '$inf)))
- (ei-asymptotic-expansion $lhospitallim (cadr e)))
+ ((eq (caar e) '%expintegral_ei)
+ (let ((arglim (limit (cadr e) var val 'think)))
+ (cond ((eq arglim '$inf)
+ (ei-asymptotic-expansion $lhospitallim (cadr e)))
+ ((zerop2 arglim)
+ (ei-powerseries $lhospitallim (cadr e)))
+ (t e))))
((eq (caar e) '%gamma_incomplete) (gamma-incomplete-asymptotic e var val $lhospitallim))
(t e)))
diff --git a/src/testsuite.lisp b/src/testsuite.lisp
index d4102c990..4c4200b20 100644
--- a/src/testsuite.lisp
+++ b/src/testsuite.lisp
@@ -143,7 +143,7 @@
262 267 268 269 270 272
281 282 357 358))
((mlist simp) "rtest_limit_gruntz"
- ((mlist simp) 20 25 28 29 30 37 39 86 96))
+ ((mlist simp) 20 25 28 29 30 37 39 86))
((mlist simp) "rtest_limit_wester"
((mlist simp) 12 13))
-----------------------------------------------------------------------
Summary of changes:
src/expintegral.lisp | 9 +++++++++
src/limit.lisp | 11 +++++++----
src/testsuite.lisp | 2 +-
3 files changed, 17 insertions(+), 5 deletions(-)
hooks/post-receive
--
Maxima CAS
|