O'Reilly logo

Clojure for Finance by Timothy Washington

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Polynomial expressions

A polynomial is an expression of more than two algebraic terms. These terms have variables and coefficients that only involve addition, subtraction, and multiplication. The variables can only have non-negative exponents, and these exponents typically decrease in size from the left-hand side to the right-hand side of the equation. So, for example, (2 * x^3) + (2 * x^2) - (3 * x) is a typical polynomial equation.

Polynomial expressions that have the right variables and coefficients are interesting for our purpose because they graph as a nice upward and downward wave:

Polynomial expressions

If we try to encode the preceding polynomial expression, we'll ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required