Dieter Kaiser wrote:
>
>
> The simplification for an mplus expression is invoked in simplus:
>
> (defmfun simplus (x w z) ; W must be 1
> (prog (res check eqnflag matrixflag sumflag)
> (if (null (cdr x)) (return 0))
> (setq check x)
> --> (if (intersection '($inf $minf $infinity $ind $und) x)
> (return (simp-infinities x)))
> ...
>
> The code will slow down because we have to check if one of the arguments
> to the "+"-operator is one of the infinities or indeterminates. Similar
> checks are implemented for the operator "*" in simptimes and for the
> operator "^" in simpexpt.
>
> One advantage of this approach is, that the simplification of infinities
> is completely separated from the current simplifier. This allows to
> separate possible problems too. Furthermore, I think this is the reason,
> why the code works so well with the testsuite.
>
> The disadvantage is, that we have to check every time we enter the
> simplifying routine like simplus for infinities.
>
Maybe it will not work if inf is embedded, e.g.
0 * (3+inf).
since (intersection '($inf ...) '(0 ((mplus) 3 $inf)) is nit..