- function represents the expression to be rewritten in Horner form

- The command horner rewrites the expression representing the function function in a way such that all polynomial subexpressions (or the whole expression itself, if it is a polynomial) are written in Horner form. The command horner does not endanger the safety of computations even in Sollya's floating-point environment: the function returned is mathematically equal to the function function.

1 + x * (2 + x * 3)

> print(horner((x + 1)^7));

1 + x * (7 + x * (21 + x * (35 + x * (35 + x * (21 + x * (7 + x))))))

exp(1 + x * (5 + x * (10 + x * (10 + x * (5 + x))))) - log(asin(x * (1 + x^2)) + x)