Name:

horner brings all polynomial subexpressions of an expression to Horner form

Library name:

sollya_obj_t sollya_lib_horner(sollya_obj_t)

Usage:

horner(function) : function -> function

Parameters:

Description:

Example 1:

   > print(horner(1 + 2 * x + 3 * x^2));
   1 + x * (2 + x * 3)
   > print(horner((x + 1)^7));
   1 + x * (7 + x * (21 + x * (35 + x * (35 + x * (21 + x * (7 + x))))))

Example 2:

   > print(horner(exp((x + 1)^5) - log(asin(x + x^3) + x)));
   exp(1 + x * (5 + x * (10 + x * (10 + x * (5 + x))))) - log(asin(x * (1 + x^2)) + x)
See also: canonical, print, coeff, degree, autosimplify, simplifysafe
Go back to the list of commands