Setting of gcd variable.



-----maxima-bounces at math.utexas.edu wrote: -----


>I?am?using?ratsimp()?and?fullratsimp()?for?simplification?with?the?setting
>of?the?variable?gcd?=?spmod.
>
>Any?assistance?with?the?following?would?be?appreciated:
>
>(1)?In?a?recent?posting?by?Stavros?Macrakis,?it?seems?that?the?settings
>spmod?=?red?and?spmod?=?subres
>lead?to?cancellations?in?fractions,?not?obtainable?with?gcd?=?spmod.
>
>Which?setting?is?best?for?the?case?of?expressions?with?complicated
>trigonometric?terms???

Without knowing any thing more, I can't even guess. In general, spmod is the least likely to 
cause Maxima to halt with a Lisp error, but spmod sometimes misses simplifications 
that subres does. To decide what is best for your expressions, I'd suggest experimentation:

  gcd_try(e) := map(lambda([s], block([gcd : s], ratsimp(e))), ['red, 'subres, 'spmod, 'mod, false]);
 
You can also experiment with algebraic set to true/false.


>(2)?Are?facts?entered?using?the?assume()?function,?explicitly?used?by
>all/some?simplification?functions??

Declared facts are used by some, but not all simplification functions: Example

 (%i1) assume(equal(x,0));
 (%o1) [equal(x,0)]

 (%i2) [abs(x), cos(x),1+x, sign(x)];
 (%o2) [0,cos(x),x+1,zero]

When an assumption isn't considered by a (simplification) function, you might be able to 
get tellsimpafter to do the the job.

>Thanks?very?much.
>Regards,
>Constantine?Frangos.
>_______________________________________________
>Maxima?mailing?list
>Maxima at math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima