#1220 even / odd functions with matrix args

open
Lisp Core (471)
2
2012-11-18
2007-06-09
No

For a declared even function, I think Maxima uses
mminusp to decide when to apply the even function
rule. This scheme sometimes fails:

(%i8) declare(f,evenfun)$
(%i9) f(matrix([-a])) - f(matrix([a]));
(%o9) f(matrix([-a]))-f(matrix([a])) <-- should be 0.

The trig functions use a different scheme. This method works for matrix arguments

(%i10) cos(matrix([-a]));
(%o10) cos(matrix([a]))

I think Maxima should uniformly use the even / odd
function rule code that is in trigi.lisp.

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks