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

Annotation of OpenXM/src/k097/debug/asir0.k, Revision 1.1.1.1

1.1       maekawa     1:
                      2:
                      3: /* SSWork/yacc/debug/asir0.k,  1997, 3/5 cf. debug/asir1.ccc */
                      4: if (K00_verbose) {
                      5:  Println("debug/asir0.k    you need to start k0 with -f option. ");
                      6: }
                      7:
                      8: /* x = Poly("x");
                      9:    f = (x+2)^10;
                     10: Println(f); */
                     11:
                     12: def Factor(f)  {
                     13:   sm1(f, " factor /FunctionValue set");
                     14:   sm1(" clean-workfiles ");
                     15: }
                     16: HelpAdd(["Factor",[" Not Yet. <<need asir, start k0 with -f option.>>"]]);
                     17:
                     18: def Cancel(f)  {
                     19:   local tmp,den,num;
                     20:   if (IsRational(f)) {
                     21:    den = Cancel(Denominator(f));
                     22:    num = Cancel(Numerator(f));
                     23:    if (IsInteger(den) && IsInteger(num)) {
                     24:      return(CancelNumber(num/den));
                     25:    }
                     26:    if (IsInteger(den)) {
                     27:      tmp = sm1("[(divByN) ",num, den," ] gbext ");
                     28:      if (tmp[1] == Poly("0")) {
                     29:        return(Cancel(tmp[0]));
                     30:      }else{
                     31:        return(f);
                     32:      }
                     33:    }
                     34:   }
                     35:   if (IsInteger(f)) return(f);
                     36:   if (IsPolynomial(f)) {
                     37:     if (f == Poly("0")) return(0);
                     38:     if (Characteristic(Ringp(f)) != 0) return(f);
                     39:     if (IsConstant(f)) return(DC(f,"integer"));
                     40:     return(f);
                     41:   }
                     42:   sm1(f," cancel /FunctionValue set");
                     43:   sm1(" clean-workfiles ");
                     44: }
                     45: HelpAdd(["Cancel",[" Not Yet. <<need asir, start k0 with -f option>>"]]);
                     46:
                     47:
                     48:
                     49: def Primadec(f,g)  {
                     50:   sm1(f,g," primadec /FunctionValue set");
                     51:   sm1(" clean-workfiles ");
                     52: }
                     53: HelpAdd(["Primadec",[" Not Yet. <<need asir, start k0 with -f option.>>"]]);
                     54:
                     55:
                     56:

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