On Dec 10, 2007 4:32 AM, Adi Shavit <adish at eyetech.jp> wrote:
> augcoefmatrix seems to do a good job. Just what I needed.
> However, when I try to optimize the code I get `optimize' has met up with a special form - answer may be wrong.
> Although sometimes it does work and sometime not....
> Is it possible that optimize doesn't know what to do with matrices?
> and if so how come it works with R1?
There are no common subexpressions that optimize recognizes in R0, so
it actually works in both cases, despite the warning message.
You can see that it doesn't recognize the common subexpressions in R0
by trying optimize(args(R0)). I don't know why it considers "matrix"
a special form; I'd think it could treat it like any other
uninterpreted function.
-s