Skip to content

Describe How to Create a Polynomial With Math Notation

I just wasted I day because I thought this polynomen did not work, but it was all a misunderstanding. When I want to create a polynomial with macro poly!(vec) or Poly::new_from_coeffs(vec) for me it in that order :

vec[0]*x^(n) + vec[1]*x^(n-1) + ... + vec[n-1]*x + vec[n] = 0 where vec.len() = n+1

It is the same way in the popular python lib numpy in its root function. In your project documentation, you should specify it is in that way :

vec[n]*x^(n) + vec[n-1]*x^(n-1) + ... + vec[1]*x + vec[0] = 0 where vec.len() = n+1

I hope you will make it clearer for future users. The project looks quite good and complete

Edited by Sébastien Bédard