emsr / polynomial

A C++ polynomials and related algorithms.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Derivative of 0 coeff static polynomial undefined?

glalonde opened this issue · comments

Seems like it is still mathematically valid. might as well allow it.

      /**
       *  Return the derivative of the polynomial.
       */
      std::enable_if_t<0 == _Num, _StaticPolynomial<_Tp, _Num>>
      derivative() const
      {
	return _StaticPolynomial<_Tp, 0>();
      }

This seems reasonable to me. I implemented it and now I need to test it and really the whole of StaticPolynomial.

tested. It works.