Post Reply 
what is POLYFORM?
12-02-2014, 07:13 AM
Post: #6
RE: what is POLYFORM?
POLYFORM is not yet in the list of commands whose output is not autosimplified. Set autosimplify to none if you want to use it in CAS.
If the second argument to POLYFORM is a function, then convert is called, and if the function is not in the list of conversion functions, it is simply applied.
Code:

    if (v[1].type==_FUNC){
      if (f==at_sincos)
    return sincos(g,contextptr);
      if (f==at_sin || f==at_SIN)
    return trigsin(g,contextptr);
      if (f==at_cos || f==at_COS)
    return trigcos(g,contextptr);
      if (f==at_tan || f==at_TAN)
    return halftan(g,contextptr);
      if (f==at_plus)
    return partfrac(tcollect(g,contextptr),true,contextptr);
      if (f==at_prod)
    return _factor(_texpand(g,contextptr),contextptr);
      if (f==at_division)
    return _simplify(g,contextptr);
      if (f==at_exp || f==at_ln || f==at_EXP)
    return trig2exp(g,contextptr);
      if (f==at_string){
    int maxp=MAX_PRINTABLE_ZINT;
    MAX_PRINTABLE_ZINT= 1000000;
    gen res=string2gen(g.print(contextptr),false);
    MAX_PRINTABLE_ZINT=maxp;
    return res;
      }
      if (f==at_matrix || f==at_vector || f==at_array){
    g.subtype=_MATRIX__VECT;
    return g;
      }
      return f(g,contextptr);
    }
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
what is POLYFORM? - Alberto Candel - 12-01-2014, 10:25 PM
RE: what is POLYFORM? - Han - 12-01-2014, 11:17 PM
RE: what is POLYFORM? - Alberto Candel - 12-01-2014, 11:30 PM
RE: what is POLYFORM? - Alberto Candel - 12-01-2014, 11:34 PM
RE: what is POLYFORM? - Han - 12-02-2014, 02:43 AM
RE: what is POLYFORM? - parisse - 12-02-2014 07:13 AM
RE: what is POLYFORM? - Han - 12-03-2014, 02:40 AM
RE: what is POLYFORM? - Alberto Candel - 12-03-2014, 06:51 AM



User(s) browsing this thread: 4 Guest(s)