← Back to team overview

ufl team mailing list archive

Re: [HG UFL] ad test

 

>> UFL doesn't do any simplifications and rewriting at all, by design.
>> Rewriting rules are not reversible in general, but can always be
>> applied later. The exception is that obvious zeros are removed in
>> some key places, e.g. 0*f -> 0, 0+f -> f, and during AD.
>>
>> The same applies for the flattening of expressions like (f*f)*f ->
>> (f*f*f)
>> which is implemented as a function. We may collapse (f*f*f) to 3*f
>> in that routine as well, but in general the problem of deciding which
>> simplifications it is a good idea to do does not have a unique solution.
>>
>
> ok, but I guess the simple solution in this example is to implement
> a pow function in a similar fashion as cos, etc.
> If you think it is a good idea, I can implement it. (It would be good for
> me to
> try to implement something. )

Of course, you have already implemented this...

Kent



References