Online Algebra Calculator
Many of users do not use powerful Maxima computer algebra system for systematic work, but for ad hoc algebraic calculations – equations, functions, matrixes, etc. only. To do this job, it is not useful to download the whole application from a web site.
Function: horner (<expr>, <x>)
Function: horner (<expr>) Returns a rearranged representation of <expr> as in Horners rule, using <x> as the main variable if it is specified. x may be omitted in which case the main variable of the canonical rational expression form of <expr> is used.
horner sometimes improves stability if expr is to be numerically evaluated. It is also useful if Maxima is used to generate programs to be run in Fortran. See also stringout.
(%i1) expr: 1e-155*x^2 - 5.5*x + 5.2e155;
2
(%o1) 1.0E-155 x - 5.5 x + 5.2E+155
(%i2) expr2: horner (%, x), keepfloat: true;
(%o2) (1.0E-155 x - 5.5) x + 5.2E+155
(%i3) ev (expr, x=1e155);
Maxima encountered a Lisp error:floating point overflow
Automatically continuing. To reenable the Lisp debugger set *debugger-hook* to nil.
(%i4) ev (expr2, x=1e155);
(%o4) 7.0E+154
(%o1) true (%i2)