0
$\begingroup$

I have a file i need to write a unit test for that includes a number of polynomial functions, and i need to provide test data to the function to calculate and compare them with an exact answer(preferably a whole number that i could easily compute myself with some math). I have to test:

  • Multiplication
  • Scaling
  • Addition
  • Subtraction
  • Synthetic Division
  • Quadratic roots
  • Cubic Roots
  • Quartic Roots

most of these will be easy to come up with 'simple' equations to test, but i'm a little stuck once i reach synthetic division and multiplication of polynomials. Could anyone give me a couple "nice" equations that equate to some whole numbers i can use in my tests, even better a method for creating such equations to test?

  • 1
    You want to generate polynomials with known solutions ?2012-12-18
  • 0
    exactly, i need solved polynomials to test that the function produced the right value.2012-12-18

1 Answers 1