summaryrefslogtreecommitdiff
path: root/math/maxima/files/extra-patch-src_hayat.lisp
diff options
context:
space:
mode:
authorNiclas Zeising <zeising@FreeBSD.org>2020-07-04 17:29:59 +0000
committerNiclas Zeising <zeising@FreeBSD.org>2020-07-04 17:29:59 +0000
commit7c4016b6d806d2dc564ff46f337f66dc83af2366 (patch)
tree6e02e6749959266d58a77fc811eec188e572bbe8 /math/maxima/files/extra-patch-src_hayat.lisp
parentlang/ecl: Update to 20.4.24 (diff)
math/maxima: Update to 5.44.0
Update math/maxima to 5.44.0 Chase the update of lang/ecl Submitted by: salvadore Reviewed by: thierry Differential Revision: https://reviews.freebsd.org/D25303
Diffstat (limited to 'math/maxima/files/extra-patch-src_hayat.lisp')
-rw-r--r--math/maxima/files/extra-patch-src_hayat.lisp39
1 files changed, 2 insertions, 37 deletions
diff --git a/math/maxima/files/extra-patch-src_hayat.lisp b/math/maxima/files/extra-patch-src_hayat.lisp
index f521215661a3..9939aa0f6ab6 100644
--- a/math/maxima/files/extra-patch-src_hayat.lisp
+++ b/math/maxima/files/extra-patch-src_hayat.lisp
@@ -1,4 +1,4 @@
---- src/hayat.lisp.orig 2019-10-21 03:38:59 UTC
+--- src/hayat.lisp.orig 2020-05-21 06:20:25 UTC
+++ src/hayat.lisp
@@ -2205,6 +2205,25 @@
(or (alike1 (exp-pt (get-datum (datum-var (car l)))) (exp-pt (car l)))
@@ -26,42 +26,7 @@
(defun taylor2 (e)
(let ((last-exp e)) ;; lexp-non0 should be bound here when needed
(cond ((assolike e tlist) (var-expand e 1 () ))
-@@ -2248,9 +2267,32 @@
- ((null l) t)
- (or (free e (car l)) (return ()))))
- (newsym e))
-- (t (let ((exact-poly () )) ; Taylor series aren't exact
-- (taylor2 (diff-expand e tlist)))))))
-+ (t
-+ ;; When all else fails, call diff-expand to try to expand e around the
-+ ;; point as a Taylor series by taking repeated derivatives. This might
-+ ;; fail, unfortunately: If a required derivative doesn't exist, then
-+ ;; DIFF-EXPAND will return a form of the form "f'(x)" with the
-+ ;; variable, rather than the expansion point in it.
-+ ;;
-+ ;; Sometimes this works - in particular, if there is a genuine pole at
-+ ;; the point, we end up passing a sum of terms like x^(-k) to a
-+ ;; recursive invocation and all is good. Unfortunately, it can also
-+ ;; fail. For example, if e is abs(sin(x)) and we try to expand to first
-+ ;; order, the expression "1/1*(cos(x)*sin(x)/abs(sin(x)))*x^1+0" is
-+ ;; returned. If we call taylor2 on that, we will end up recursing and
-+ ;; blowing the stack. To avoid doing so, error out if EXPANSION
-+ ;; contains E as a subtree. However, don't error if it occurs as an
-+ ;; argument to %DERIVATIVE (in which case, we might well be fine). This
-+ ;; happens from things like taylor(log(f(x)), x, x0, 1).
-
-+ (let* ((exact-poly nil) ; (Taylor series aren't exact)
-+ (expansion (diff-expand e tlist)))
-+ (when (find-if (lambda (subtree)
-+ (not (eq ($op subtree) '%derivative)))
-+ (subtree-search e expansion))
-+ (exp-pt-err))
-+ (taylor2 expansion))))))
-+
- (defun compatvarlist (a b c d)
- (cond ((null a) t)
- ((or (null b) (null c) (null d)) () )
-@@ -3024,7 +3066,21 @@
+@@ -3032,7 +3051,21 @@
(and (or (member '$inf pt-list :test #'eq) (member '$minf pt-list :test #'eq))
(unfam-sing-err)))