You can subscribe to this list here.
2001 
_{Jan}

_{Feb}

_{Mar}

_{Apr}

_{May}

_{Jun}

_{Jul}

_{Aug}

_{Sep}

_{Oct}

_{Nov}
(20) 
_{Dec}
(17) 

2002 
_{Jan}
(39) 
_{Feb}
(21) 
_{Mar}
(33) 
_{Apr}
(135) 
_{May}
(53) 
_{Jun}
(88) 
_{Jul}
(47) 
_{Aug}
(59) 
_{Sep}
(207) 
_{Oct}
(40) 
_{Nov}
(7) 
_{Dec}
(26) 
2003 
_{Jan}
(49) 
_{Feb}
(39) 
_{Mar}
(117) 
_{Apr}
(50) 
_{May}
(62) 
_{Jun}
(6) 
_{Jul}
(19) 
_{Aug}
(24) 
_{Sep}
(11) 
_{Oct}
(11) 
_{Nov}
(49) 
_{Dec}
(9) 
2004 
_{Jan}
(29) 
_{Feb}
(123) 
_{Mar}
(32) 
_{Apr}
(53) 
_{May}
(52) 
_{Jun}
(19) 
_{Jul}
(33) 
_{Aug}
(10) 
_{Sep}
(76) 
_{Oct}
(86) 
_{Nov}
(171) 
_{Dec}
(163) 
2005 
_{Jan}
(147) 
_{Feb}
(121) 
_{Mar}
(120) 
_{Apr}
(126) 
_{May}
(120) 
_{Jun}
(213) 
_{Jul}
(76) 
_{Aug}
(79) 
_{Sep}
(140) 
_{Oct}
(83) 
_{Nov}
(156) 
_{Dec}
(202) 
2006 
_{Jan}
(181) 
_{Feb}
(171) 
_{Mar}
(157) 
_{Apr}
(98) 
_{May}
(96) 
_{Jun}
(97) 
_{Jul}
(193) 
_{Aug}
(76) 
_{Sep}
(130) 
_{Oct}
(63) 
_{Nov}
(196) 
_{Dec}
(253) 
2007 
_{Jan}
(256) 
_{Feb}
(293) 
_{Mar}
(276) 
_{Apr}
(258) 
_{May}
(181) 
_{Jun}
(91) 
_{Jul}
(108) 
_{Aug}
(69) 
_{Sep}
(107) 
_{Oct}
(179) 
_{Nov}
(137) 
_{Dec}
(121) 
2008 
_{Jan}
(124) 
_{Feb}
(129) 
_{Mar}
(192) 
_{Apr}
(201) 
_{May}
(90) 
_{Jun}
(86) 
_{Jul}
(115) 
_{Aug}
(142) 
_{Sep}
(49) 
_{Oct}
(91) 
_{Nov}
(95) 
_{Dec}
(218) 
2009 
_{Jan}
(230) 
_{Feb}
(149) 
_{Mar}
(118) 
_{Apr}
(72) 
_{May}
(77) 
_{Jun}
(68) 
_{Jul}
(102) 
_{Aug}
(72) 
_{Sep}
(89) 
_{Oct}
(76) 
_{Nov}
(125) 
_{Dec}
(86) 
2010 
_{Jan}
(75) 
_{Feb}
(90) 
_{Mar}
(89) 
_{Apr}
(121) 
_{May}
(111) 
_{Jun}
(66) 
_{Jul}
(75) 
_{Aug}
(66) 
_{Sep}
(66) 
_{Oct}
(166) 
_{Nov}
(121) 
_{Dec}
(73) 
2011 
_{Jan}
(74) 
_{Feb}

_{Mar}

_{Apr}
(14) 
_{May}
(22) 
_{Jun}
(31) 
_{Jul}
(53) 
_{Aug}
(37) 
_{Sep}
(23) 
_{Oct}
(25) 
_{Nov}
(31) 
_{Dec}
(28) 
2012 
_{Jan}
(18) 
_{Feb}
(11) 
_{Mar}
(32) 
_{Apr}
(17) 
_{May}
(48) 
_{Jun}
(37) 
_{Jul}
(23) 
_{Aug}
(54) 
_{Sep}
(15) 
_{Oct}
(11) 
_{Nov}
(19) 
_{Dec}
(22) 
2013 
_{Jan}
(11) 
_{Feb}
(32) 
_{Mar}
(24) 
_{Apr}
(37) 
_{May}
(31) 
_{Jun}
(14) 
_{Jul}
(26) 
_{Aug}
(33) 
_{Sep}
(40) 
_{Oct}
(21) 
_{Nov}
(36) 
_{Dec}
(84) 
2014 
_{Jan}
(23) 
_{Feb}
(20) 
_{Mar}
(27) 
_{Apr}
(24) 
_{May}
(31) 
_{Jun}
(27) 
_{Jul}
(34) 
_{Aug}
(26) 
_{Sep}
(21) 
_{Oct}
(45) 
_{Nov}
(23) 
_{Dec}
(73) 
2015 
_{Jan}
(33) 
_{Feb}
(8) 
_{Mar}
(24) 
_{Apr}
(45) 
_{May}
(27) 
_{Jun}
(19) 
_{Jul}
(21) 
_{Aug}
(51) 
_{Sep}
(43) 
_{Oct}
(29) 
_{Nov}
(61) 
_{Dec}
(86) 
2016 
_{Jan}
(99) 
_{Feb}
(52) 
_{Mar}
(80) 
_{Apr}
(61) 
_{May}
(24) 
_{Jun}
(23) 
_{Jul}
(36) 
_{Aug}
(30) 
_{Sep}
(41) 
_{Oct}
(43) 
_{Nov}
(27) 
_{Dec}
(46) 
2017 
_{Jan}
(57) 
_{Feb}
(34) 
_{Mar}
(40) 
_{Apr}
(31) 
_{May}
(57) 
_{Jun}

_{Jul}

_{Aug}

_{Sep}

_{Oct}

_{Nov}

_{Dec}

S  M  T  W  T  F  S 



1
(1) 
2
(1) 
3

4

5

6
(1) 
7

8

9

10
(1) 
11
(1) 
12
(1) 
13
(3) 
14

15

16
(1) 
17
(6) 
18

19

20
(2) 
21

22
(2) 
23
(2) 
24

25

26
(1) 
27
(3) 
28
(3) 
29
(4) 
30
(1) 
31



From: Rupert Swarbrick <rswarbrick@us...>  20140729 22:39:49

This is an automated email from the git hooks/postreceive 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 508794f4c6a115bed6bfeee8848256898eda9910 (commit) from a2b80c7e4feda95697f28a3c8479d63aad9c1c1c (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 508794f4c6a115bed6bfeee8848256898eda9910 Author: Rupert Swarbrick <rswarbrick@...> Date: Tue Jul 29 23:36:09 2014 +0100 Teach SP2EXPT to deal with sums in the exponent In bug #2755, when you do powerseries (%e^x, x, 1); you end up calling something like (SP2EXPT '((MEXPT SIMP) $%E ((MPLUS SIMP) 1 #:G242909))) Because 1 + var is not a monomial in var, the previous version of the code gave up. This patch teaches it to do the product if required. Note that powerseries(a^x, x, 1) worked before because the exponent appeared in the form x*log(a) which is a monomial in x. diff git a/src/series.lisp b/src/series.lisp index 0114b84..59d7575 100644  a/src/series.lisp +++ b/src/series.lisp @@ 399,24 +399,41 @@ (m e 1) nil nil)) (defun sp2expt (exp)  (cond ((and (numberp (caddr exp)) (mexptp (cadr exp)))  (sp2expt (m^ (cadr (cadr exp))  (m* (caddr exp) (caddr (cadr exp))))))  ((and (free (caddr exp) var)  (signp g (caddr exp))  (< (caddr exp) $maxposex))  (m*l (dup (sp2expand (cadr exp)) (caddr exp))))  ((free (cadr exp) var)  (sp2sub (subst *index  '*index  (subst (cond ((eq (cadr exp) '$%e) 'sp2var)  (t (list '(mtimes)  (list '(mlog) (cadr exp))  'sp2var)))  'sp2var  (get 'mexpt 'sp2)))  (caddr exp)))  (t (throw 'psex nil)))) + (let ((base (cadr exp)) + (power (caddr exp))) + (cond + ;; Do (a^b)^c = a^(bc) when c is a number + ((and (numberp power) (mexptp base)) + (sp2expt (m^ (cadr base) + (m* power (caddr base))))) + + ;; If a positive power which is free of the expansion variable and less + ;; than the maximum expansion power then expand the base and do the + ;; multiplication explicitly. + ((and (free power var) + (signp g power) + (< power $maxposex)) + (m*l (dup (sp2expand base) power))) + + ;; If the base is free of VAR, rewrite as a^b = e^(b log(a)) if necessary + ;; and then use the tabulated expansion of exp(x). If POWER is a sum then + ;; do the rewrite a^(b+c) = a^b a^c + ((free base var) + (let ((expansion + (subst *index '*index + (if (eq base '$%e) + (get 'mexpt 'sp2) + (subst `((mtimes) ((mlog) ,base) sp2var) 'sp2var + (get 'mexpt 'sp2)))))) + (cond + ((not (mplusp power)) + (sp2sub expansion power)) + + (t + (m*l (mapcar (lambda (summand) (sp2sub expansion summand)) + (cdr power))))))) + + (t (throw 'psex nil))))) (defun dup (x %n) (if (= %n 1) diff git a/tests/rtest16.mac b/tests/rtest16.mac index 7520934..9abd38b 100644  a/tests/rtest16.mac +++ b/tests/rtest16.mac @@ 2047,3 +2047,7 @@ block([inf_exp, minf_exp], /* #2765: powerseries with noninteger order */ powerseries (diff (f(x), x, biggles), x, 0); "Failed to expand"$ + +/* #2755: powerseries of natural exponential */ +niceindices (powerseries (%e^x, x, 1)); +sum (1/i!, i, 0, inf) * sum((x1)^i/i!, i, 0, inf)$  Summary of changes: src/series.lisp  53 +++++++++++++++++++++++++++++++++++ tests/rtest16.mac  4 ++++ 2 files changed, 39 insertions(+), 18 deletions() hooks/postreceive  Maxima CAS 
From: Rupert Swarbrick <rswarbrick@us...>  20140729 22:05:50

This is an automated email from the git hooks/postreceive 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 a2b80c7e4feda95697f28a3c8479d63aad9c1c1c (commit) from da6a1f63543cee935ba9f6c5832c1a5181d29fc8 (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 a2b80c7e4feda95697f28a3c8479d63aad9c1c1c Author: Rupert Swarbrick <rswarbrick@...> Date: Tue Jul 29 23:04:58 2014 +0100 Don't try to expand in SP2DIFF for unknown orders Also, tidy up the code a bit to make it a bit clearer how the function is supposed to work. This patch fixes bug #2765. diff git a/src/series.lisp b/src/series.lisp index a324fbf..0114b84 100644  a/src/series.lisp +++ b/src/series.lisp @@ 424,19 +424,33 @@ (cons x (dup x (1 %n))))) (defun sp2diff (exp l)  (let (indl)  (cond ((free exp var)  (sp3form (sp2expand exp) (cons '(%derivative) l)))  (t (do ((l l (cddr l)) (ll))  ((null l)  (if ll (sp3form exp (cons '(%derivative) (nreverse ll)))  exp))  (cond ((eq (car l) var)  (do ((%i (cadr l) (1 %i)))  ((= %i 0) exp)  (setq indl nil  exp (sp2diff1 (sp2expand exp) nil nil))))  (t (setq ll (list* (cadr l) (car l) ll))))))))) + (cond + ((free exp var) + (sp3form (sp2expand exp) (cons '(%derivative) l))) + (t + ;; If the expression isn't free of VAR, we know how to expand the result if + ;; the orders of differentiation are all explicit nonnegative + ;; integers. Otherwise, give up. + (let ((indl) (remainingderivs)) + (loop + for (y order) on l by #'cddr + do + (cond + ((not (typep order '(integer 0))) + (throw 'psex nil)) + + ((not (eq y var)) + (setf remainingderivs (list* order y remainingderivs))) + + (t + (dotimes (i order) + (setf indl nil) + (setf exp (sp2diff1 (sp2expand exp) nil nil)))))) + + (if remainingderivs + (sp3form exp `((%derivative) + ,@(nreverse remainingderivs))) + exp))))) (defun sp2diff1 (exp ind lol) ;ind is a list of the indices ;lol is a list of the lower limits diff git a/tests/rtest16.mac b/tests/rtest16.mac index 883835c..7520934 100644  a/tests/rtest16.mac +++ b/tests/rtest16.mac @@ 2043,3 +2043,7 @@ block([inf_exp, minf_exp], minf_exp: powerseries (1/(1+x), x, inf), inf_exp  minf_exp); 0$ + +/* #2765: powerseries with noninteger order */ +powerseries (diff (f(x), x, biggles), x, 0); +"Failed to expand"$  Summary of changes: src/series.lisp  40 +++++++++++++++++++++++++++ tests/rtest16.mac  4 ++++ 2 files changed, 31 insertions(+), 13 deletions() hooks/postreceive  Maxima CAS 
From: Rupert Swarbrick <rswarbrick@us...>  20140729 20:30:11

This is an automated email from the git hooks/postreceive 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 da6a1f63543cee935ba9f6c5832c1a5181d29fc8 (commit) from a7ccd8746ee3f5a6a0e4f32ebd6cfce0bd32fc76 (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 da6a1f63543cee935ba9f6c5832c1a5181d29fc8 Author: Rupert Swarbrick <rswarbrick@...> Date: Tue Jul 29 21:29:07 2014 +0100 Teach $powerseries to expand at minf diff git a/src/series.lisp b/src/series.lisp index 89c7188..a324fbf 100644  a/src/series.lisp +++ b/src/series.lisp @@ 28,15 +28,19 @@ ;;psex  for throws on failure to expand ;; (defmfun $powerseries (l var *pt)  (cond ((signp e *pt)  (cond ((symbolp var) (seriesexpand* l))  ((numberp var) (improperargerr var '$powerseries))  (t (sbstpt l 'x (gensym) var var))))  ((eq *pt '$inf)  (sbstpt l (m// 1 'x) (gensym) var (div* 1 var)))  (t (sbstpt l (m+ 'x *pt) (gensym)  var (simplifya (m var *pt) nil))))) +(defmfun $powerseries (expr var pt) + (when (numberp var) + (improperargerr var '$powerseries)) + (cond + ((signp e pt) + (cond ((symbolp var) (seriesexpand* expr)) + (t (sbstpt expr 'x (gensym) var var)))) + ((eq pt '$inf) + (sbstpt expr (m// 1 'x) (gensym) var (div* 1 var))) + ((eq pt '$minf) + (sbstpt expr (m (m// 1 'x)) (gensym) var (m (div* 1 var)))) + (t (sbstpt expr (m+ 'x pt) (gensym) + var (simplifya (m var pt) nil))))) (defun sbstpt (exp sexp var var1 usexp) (setq sexp (subst var 'x sexp)) diff git a/tests/rtest16.mac b/tests/rtest16.mac index d032bb2..883835c 100644  a/tests/rtest16.mac +++ b/tests/rtest16.mac @@ 2029,3 +2029,17 @@ sumcontract(intosum(powerseries(1+ (1x)^(a),x,0)  powerseries((1x)^(a),x,0))) */ (gensumnum : 0, powerseries (log(2x), x, 0)); log(2)  sum (2^(i21)*x^(i2+1)/(i2+1), i2, 0, inf)$ + +/* + #2760: powerseries at minf + + For an analytic function like this, the power series at minf should + match the power series at inf. +*/ +block([inf_exp, minf_exp], + gensumnum : 0, + inf_exp: powerseries (1/(1+x), x, inf), + gensumnum : 0, + minf_exp: powerseries (1/(1+x), x, inf), + inf_exp  minf_exp); +0$  Summary of changes: src/series.lisp  22 +++++++++++++ tests/rtest16.mac  14 ++++++++++++++ 2 files changed, 27 insertions(+), 9 deletions() hooks/postreceive  Maxima CAS 
From: Rupert Swarbrick <rswarbrick@us...>  20140729 19:46:12

This is an automated email from the git hooks/postreceive 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 a7ccd8746ee3f5a6a0e4f32ebd6cfce0bd32fc76 (commit) via 417c1b7fba7e3c690677cdb7ad4e24f8b6a6d439 (commit) via f008c59cbb580bcb4b1e9b4744096a9420bd994d (commit) from 6db8907fce2cff0e9ef01fe660d3a6d647ade567 (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 a7ccd8746ee3f5a6a0e4f32ebd6cfce0bd32fc76 Author: Rupert Swarbrick <rswarbrick@...> Date: Tue Jul 29 20:45:34 2014 +0100 Correctly expand definite integrals in SP2INTEG2 The nontrivial code in SP2INTEG2 is for the case when we are trying to expand integrate (f(u), u, a(x), b(x)) in x. The previous code was just incorrect, as far as I can tell. The new version expands a(x) and b(x) in x. If the results are not monomials in x then we give up rather than trying to substitute arbitrary stuff into a power series. If they are monomials, we then expand the integrand (around zero: not sure about that bit). If that works, integrating should be easy, since it's just a power series. Next, substitute in the end points and subtract the results. Rather than adding another test, this fixes the test I added yesterday. Oops... diff git a/src/series.lisp b/src/series.lisp index 9643f79..89c7188 100644  a/src/series.lisp +++ b/src/series.lisp @@ 515,15 +515,58 @@ (t (sinint exp var)))) (t (sinint exp var))))) +;; Expand a definite integral, integrate(exp, v, lo, hi). (defun sp2integ2 (exp v lo hi)  (if (eq v var) (setq v (gensym) exp (subst v var exp)))  (cond ((and (free lo var) (free hi var))  (cond ((free exp var)  (list '(%integrate) (subst var v exp) var lo hi))  (t (sp3form (sp2expand exp)  (list '(%integrate) v lo hi)))))  (t (m+ (sp2sub (setq exp (sp2expand (subst var v exp))) hi)  (m* 1 (sp2sub exp lo)))))) + ;; Deal with the case where the integration variable is also the expansion + ;; variable. Something's a bit odd if we're doing this, but we assume that the + ;; aliasing was accidental and that the (bound) integration variable should be + ;; called something else. + (when (eq v var) + (setq v (gensym) + exp (subst v var exp))) + + (when (boundp '*sp2integrecursionguard*) + (throw 'psex + (list 'err '(mtext) + "Recursion when trying to expand the definite integral " + (outof (symbolvalue '*sp2integrecursionguard*))))) + + (cond + ((not (and (free lo var) (free hi var))) + ;; Suppose one or both of the endpoints involves VAR. We'll give up unless + ;; they are monomials in VAR (because substituting a nonmonomial into a + ;; power series is more difficult). If they *are* monomials in VAR, then we + ;; try to expand the integral as a power series and find an antiderivative. + (let ((loexp (sp2expand lo)) + (hiexp (sp2expand hi)) + (*sp2integrecursionguard* exp)) + (declare (special *sp2integrecursionguard*)) + + (unless (and (smono loexp var) (smono hiexp var)) + (throw 'psex + (list 'err '(mtext) + "Endpoints of definite integral " (outof exp) + " are not monomials in the expansion variable."))) + + ;; Since this is a formal powerseries calculation, we needn't concern + ;; ourselves with radii of convergence here. Just expand the integrand + ;; about zero. (Is there something cleverer we could do?) + (let ((antiderivative (sinint ($powerseries exp v 0) v))) + ;; If the expansion had failed, we'd have thrown an error to toplevel, + ;; so we can assume that ANTIDERIVATIVE is a sum of monomials in + ;; V. Substituting in LOEXP and HIEXP, we'll get two sums of + ;; monomials in VAR. The difference of the two expressions isn't quite + ;; of the right form, but hopefully it's close enough for any other + ;; code that uses it. + (m (maximasubstitute hiexp v antiderivative) + (maximasubstitute loexp v antiderivative))))) + + ((free exp var) + (list '(%integrate) (subst var v exp) var lo hi)) + + (t + (sp3form (sp2expand exp) + (list '(%integrate) v lo hi))))) ;;************************************************************************************ ;; phase three miscellaneous garbage and final simplification diff git a/tests/rtest16.mac b/tests/rtest16.mac index 224c4ac..d032bb2 100644  a/tests/rtest16.mac +++ b/tests/rtest16.mac @@ 2024,6 +2024,8 @@ sumcontract(intosum(powerseries(1+ (1x)^(a),x,0)  powerseries((1x)^(a),x,0))) /* #2775: Don't expand a powerseries with log(ab)=log(a)+log(b) if a is negative + + (and also #2767) */ (gensumnum : 0, powerseries (log(2x), x, 0)); sum(2^(i11)*x^(i1+1)/(i1+1), i1, 0, inf)$ +log(2)  sum (2^(i21)*x^(i2+1)/(i2+1), i2, 0, inf)$ commit 417c1b7fba7e3c690677cdb7ad4e24f8b6a6d439 Author: Rupert Swarbrick <rswarbrick@...> Date: Tue Jul 29 20:39:06 2014 +0100 Modify SP1LOG2 to generate a definite integral The previous code wrongly assumed that integrate(f'(x)/f(x), x) = log(f(x)) which is, of course, missing a constant of integration. Instead of generating an indefinite integral to be expanded, generate a definite integral. It turns out that SP2INTEG2, which is responsible for expanding definite integrals, is also broken, but that will be addressed in the next patch. diff git a/src/trgred.lisp b/src/trgred.lisp index db261ed..81e3f8d 100644  a/src/trgred.lisp +++ b/src/trgred.lisp @@ 510,24 +510,35 @@ ;; tries again after expressing E as integrate(diff(e)/e). ((sp1log2 e)))) +;; We didn't manage to expand the expression, so make use of the fact that +;; diff(log(f(x)), x) = f'(x)/f(x) and return integrate(f'(x)/f(x), x), hoping +;; that a later stage will be able to do something useful with it. +;; +;; We have to be a little bit careful because an indefinite integral might have +;; the wrong constant term. Instead, rewrite as +;; +;; log(f(x0+h)) = log(f(x0+h))  log(f(x0)) + log(f(x0)) +;; = integrate(diff(log(f(x0+k)), k), k, 0, h) + log(f(x0)) +;; = integrate(diff(f(x0+k))/f(x0+k), k, 0, h) + log(f(x0)) +;; +;; The "x0" about which we expand is always zero (see the code in $powerseries) (defun sp1log2 (e)  (and $verbose  (prog2  (mtell (intl:gettext "trigreduce: failed to expand.~%~%"))  (showexp (list '(%log) e))  (mtell (intl:gettext "trigreduce: try again after applying rule:~2%~M~%~%")  (list '(mlabel) nil  (outof  (list '(mequal)  (list '(%log) e)  (list '(%integrate)  (list '(mquotient)  (list '(%derivative) e var 1)  e)  var)))))))  (list '(%integrate)  (sp1 ($ratsimp (list '(mtimes) (sdiff e var) (list '(mexpt) e 1))))  var)) + (when $verbose + (mtell (intl:gettext "trigreduce: failed to expand.~%~%")) + (showexp (list '(%log) e)) + (mtell (intl:gettext "trigreduce: try again after applying rule:~2%~M~%~%") + (list '(mlabel) nil + (outof + `((mequal) + ((%log) ,e) + ((%integrate) + ((mquotient) ((%derivative) ,e ,var 1) ,e) ,var)))))) + (let* ((dummysym ($gensym))) + (m+ (list '(%log) ($limit e var 0)) + (list '(%integrate) + (maximasubstitute dummysym var + (sp1 (m// (sdiff e var) e))) + dummysym 0 var)))) (defun sp1trig (e) (cond ((atom (cadr e)) (simplify e)) commit f008c59cbb580bcb4b1e9b4744096a9420bd994d Author: Rupert Swarbrick <rswarbrick@...> Date: Mon Jul 28 23:54:05 2014 +0100 Tidy up expansions in EXPANDTRIGOFSUM It seemed a bit ugly having all the m+, m and m* written out four times, so I factored it out. Compiled code size goes from 2774 > 1108 bytes with x86_64 SBCL, so this might even be a tiny performance win but that wasn't really why I did it... diff git a/src/trgred.lisp b/src/trgred.lisp index b847f5e..db261ed 100644  a/src/trgred.lisp +++ b/src/trgred.lisp @@ 541,27 +541,15 @@ ;; Return the expansion of ((trigfun) ((mplus) a b)). For example sin(a+b) = ;; sin(a)cos(b) + cos(a)sin(b). (defun expandtrigofsum (trigfun a b)  (ecase trigfun  (%sin  (m+ (m* (sp1trig (list '(%sin) a))  (sp1trig (list '(%cos) b)))  (m* (sp1trig (list '(%cos) a))  (sp1trig (list '(%sin) b)))))  (%cos  (m (m* (sp1trig (list '(%cos) a))  (sp1trig (list '(%cos) b)))  (m* (sp1trig (list '(%sin) a))  (sp1trig (list '(%sin) b)))))  (%sinh  (m+ (m* (sp1trig (list '(%sinh) a))  (sp1trig (list '(%cosh) b)))  (m* (sp1trig (list '(%cosh) a))  (sp1trig (list '(%sinh) b)))))  (%cosh  (m+ (m* (sp1trig (list '(%cosh) a))  (sp1trig (list '(%cosh) b)))  (m* (sp1trig (list '(%sinh) a))  (sp1trig (list '(%sinh) b))))))) + (flet ((expandit (op f1 f2 f3 f4) + (funcall op + (m* (sp1trig (list f1 a)) (sp1trig (list f2 b))) + (m* (sp1trig (list f3 a)) (sp1trig (list f4 b)))))) + (ecase trigfun + (%sin (expandit #'add2* '(%sin) '(%cos) '(%cos) '(%sin))) + (%cos (expandit #'sub* '(%cos) '(%cos) '(%sin) '(%sin))) + (%sinh (expandit #'add2* '(%sinh) '(%cosh) '(%cosh) '(%sinh))) + (%cosh (expandit #'sub* '(%cosh) '(%cosh) '(%sinh) '(%sinh)))))) ;; Try to expand f(a+b) where f is sin, cos, sinh or cosh. (defun sp1trigex (e)  Summary of changes: src/series.lisp  59 ++++++++++++++++++++++++++++++++++++ src/trgred.lisp  75 ++++++++++++++++++++++++++ tests/rtest16.mac  4 ++ 3 files changed, 91 insertions(+), 47 deletions() hooks/postreceive  Maxima CAS 