emsr / polynomial

A C++ polynomials and related algorithms.
6 stars 3 forks source link

SFINAE out or static_assert out eval_evan/odd(complex) if the polynomial coeff is complex. #5

Closed emsr closed 6 years ago

emsr commented 6 years ago

The Horner tricks for fast even/odd eval of real-coefficient polynomials doesn't work unless the polynomial coeffs are real.

I made a local has_imag with void_t.

It may be that a static_assert would be nicer to the user. Oh well.

emsr commented 6 years ago

Done... with SFINAE.