Last year I wrote:
> 
> Currently FriCAS has very poor performance on some algebraic
> integrals (computations may easily take more than a month on some
> simlply-looking exmaples).  I have tracked the reason for this: there
> is enormous growth of size of intermediate expressions.  FriCAS
> always tries to simplify expressions by canceling common factors
> between numerator and denominator.  But this does not work
> for algebraic quantities: FriCAS computes GCD without taking
> into account algebraic relations and to find simplifiaction
> one must use the relations.
> 
> I have now code which mostly avoids this problem: it moves
> all algebraics into numerator and then normal GCD is enough
> to remove common factors.  But approach has its own problems:
> many expression get bigger after moving algebraics into
> numerator and moving algebraics into numerator may be quite
> time consuming too.  The effect is that with new code FriCAS
> can do in few seconds the nasty examples that would otherwise
> take weeks or months or run out of memory.  But on average
> FriCAS got slower (probably about two times slower) and there
> is an example which works well with old code but did not finish
> in few hours with new one.
> 
> Given that I do not think that new code can replace the old
> one.  OTOH the new code allows to compute some things which
> are practically impossible to do with current one.  One
> possible way is to include new code but have a flag so that
> it is active only when the flag is set (and have the flag off
> by default). 

Now I have added this code to Expression.  There is a flag
(common to all Expression-s) which when on causes removal
if algebraic irrationalities from denominators.
In Expression there are two new functions,
setSimplifyDenomsFlag(new_flag) and getSimplifyDenomsFlag()
which allow setting and querying new flag.

Most of the time the new flag just causes moderate slowdown,
but sometimes effects are dramatic, huge speedup or slowdown.

As discussed, in the future this flag may go away (when
no longer needed).

-- 
                              Waldek Hebisch
[email protected] 

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to