[BACK]Return to asir0.k CVS log [TXT][DIR] Up to [local] / OpenXM / src / k097 / debug

Diff for /OpenXM/src/k097/debug/asir0.k between version 1.1.1.1 and 1.2

version 1.1.1.1, 1999/10/08 02:12:15 version 1.2, 2001/01/04 12:29:32
Line 2 
Line 2 
   
 /* SSWork/yacc/debug/asir0.k,  1997, 3/5 cf. debug/asir1.ccc */  /* SSWork/yacc/debug/asir0.k,  1997, 3/5 cf. debug/asir1.ccc */
 if (K00_verbose) {  if (K00_verbose) {
  Println("debug/asir0.k    you need to start k0 with -f option. ");   Println("debug/asir0.k    you need ox_asir module. ");
 }  }
   
   def loadOXasir() {
   Load_sm1(["oxasir.sm1",AddString([GetEnv("OpenXM_HOME"),
             "/lib/sm1/oxasir.sm1"])],
            "oxasir.sm1.loaded");
   }
   
 /* x = Poly("x");  /* x = Poly("x");
    f = (x+2)^10;     f = (x+2)^10;
 Println(f); */  Println(f); */
   
 def Factor(f)  {  def Factor(f)  {
   sm1(f, " factor /FunctionValue set");    loadOXasir();
   sm1(" clean-workfiles ");    sm1(f, " f fctr /FunctionValue set");
 }  }
 HelpAdd(["Factor",[" Not Yet. <<need asir, start k0 with -f option.>>"]]);  HelpAdd(["Factor",["Factor a given polynomial."]]);
   
 def Cancel(f)  {  def Cancel(f)  {
   local tmp,den,num;    local tmp,den,num,r;
     loadOXasir();
   if (IsRational(f)) {    if (IsRational(f)) {
    den = Cancel(Denominator(f));     den = Cancel(Denominator(f));
    num = Cancel(Numerator(f));     num = Cancel(Numerator(f));
Line 39  def Cancel(f)  {
Line 46  def Cancel(f)  {
     if (IsConstant(f)) return(DC(f,"integer"));      if (IsConstant(f)) return(DC(f,"integer"));
     return(f);      return(f);
   }    }
   sm1(f," cancel /FunctionValue set");    sm1("[[num den]] reduceByAsir /r set ");
   sm1(" clean-workfiles ");    if (IsInteger(r[1])) {
       if (r[1] == 1) return(r[0]);
     }
     return(r[0]/r[1]);
 }  }
 HelpAdd(["Cancel",[" Not Yet. <<need asir, start k0 with -f option>>"]]);  HelpAdd(["Cancel",["Cancel the greatest common multiple of the denominators and the numerator. "]]);
   
   
   
   /* BUG: It has not yet been rewritten. */
 def Primadec(f,g)  {  def Primadec(f,g)  {
   sm1(f,g," primadec /FunctionValue set");    sm1(f,g," primadec /FunctionValue set");
   sm1(" clean-workfiles ");    sm1(" clean-workfiles ");

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>