Boost logo

Boost :

Subject: Re: [boost] [Review] Polynomial library review begins today
From: dherring_at_[hidden]
Date: 2009-03-11 11:49:33

I haven't been able to evaluate this properly, but here were some quick

- Rename evaluate() to horner() and provide evaluate() as an inline call
  to horner().

- Rename evaluate_faithfully() to compensated_horner().

- Things that say "Be careful about this" generally need fixing.

- It would be nice to have operator* and operator/ as well as *= and /=.

- Considering they share the same core algorithm, it might be nice to have
  a function that could do division and return the remainder at the same
  time. Something like
  poly::divide(P &divisor, P &quotient, P &remainer)

- FFTs are good for multiplying polynomials above a certain size, but they
  are rather heavy for small polynomials and can lead to unexpected
  crosstalk between terms. There should be an option for * that doesn't
  use the FFT, and it should be the default for small polynomials.

- operator/= has a hardcoded "std::vector<double> new_coefficients" that
  later gets rounded?? Maybe that works.


Boost list run by bdawes at, gregod at, cpdaniel at, john at