1 /* Remove terms that involve a given symbol or expression. For example...
3 filter(x^2 + x + 1, x) => 1
5 filter(x^2 + x + 1, x^2) => x + 1
47 if (car(p1
) == symbol(ADD
))
49 else if (istensor(p1
))
51 else if (find(p1
, p2
))
75 n
= p1
->u
.tensor
->nelem
;
77 p3
->u
.tensor
->ndim
= p1
->u
.tensor
->ndim
;
78 for (i
= 0; i
< p1
->u
.tensor
->ndim
; i
++)
79 p3
->u
.tensor
->dim
[i
] = p1
->u
.tensor
->dim
[i
];
80 for (i
= 0; i
< n
; i
++) {
81 push(p1
->u
.tensor
->elem
[i
]);
84 p3
->u
.tensor
->elem
[i
] = pop();