Skip to content

Instantly share code, notes, and snippets.

@jamesthompson
Created October 3, 2013 00:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesthompson/6802475 to your computer and use it in GitHub Desktop.
Save jamesthompson/6802475 to your computer and use it in GitHub Desktop.
MVPs
scala> p
res6: spire.math.poly.MultivariatePolynomial[Double] = (2.0x + 5.0 + 3.0y)
scala> q
res7: spire.math.poly.MultivariatePolynomial[Double] = (xy + 2.0x + 1.0 + 5.0y)
scala> p * q
res8: spire.math.poly.MultivariatePolynomial[Double] = (2.0x^2y + 4.0x^2 + 3.0xy^2 + 21.0xy + 12.0x + 28.0y + 5.0 + 15.0y^2)
scala> p + q
res9: spire.math.poly.MultivariatePolynomial[Double] = (xy + 4.0x + 6.0 + 8.0y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment