The polynomial support

As polynomials form very important class of mathematical functions, they are extensively supported by Syntan.
 The polynomial used by Syntan is the real function of one real variable, described by the formula:
  an*xn+ an-1*xn-1 + … + a1*x + a0
  where:
    x        the variable
    a#      real number
    n        integer – the grade of the polynomial
 The function is automatically tested if it is a polynomial (even if it is nested, for example
sin(x^2-2*x+1)). If it is, then the polynomial is transferred into the standard Horner´s form:
    ( … ((an*x + an-1)*x + an-2)*x + … )*x + a0
All common powers are eliminated in this shape and only simple multiplications remain.
 Syntan automatically recognises polynomials and treats them as ones, i.e. addition, subtraction and multiplication of polynomials have the appropriate polynomial as a result.
 If two polynomials have to be divided, Syntan gains their greatest common divider (GCD) at first. If the GCD is a polynomial, both the numerator and the denominator polynomials are divided by the GCD. The special case arise if the GCD equals the denominator. In this case the result is also polynomial.
 All polynomial operations take place internally, i.e. they can be nested inside other non-polynomial functions.
Example:
    sin((sqr(x)-1)/(x+1)) results to   sin(x-1)
 Roots of polynomial