Re: Multiply Linear Polynomials



Nicolas.Capens@xxxxxxxxx wrote:
It is definitely not cheating, it's an optimization. Precomputing
things is common practice in computer science (lookup tables are
typically also precomputed).

If a, b, c and d are constants then there's no practical problem
defining new constants A, B and C as above. The cost of computing A, B
and C does not count for the total cost of evaluating the polynomial at
run-time. They are just known beforehand, computed at compile-time,
constants at run-time.
The key point is if they are constants :) if they aren't and we have different linear equations each time , or we only wish to compute one once , then we can't apply the optimization once and amortize the cost of it over multiple computations of the same polynomial.

Hence it's cheating , because you are assuming something that isn't given.

Nicholas King
.



Relevant Pages

  • Re: Is programming gender biased?
    ... science work, while only 9% of the male students describe their orientation towards ... computer science in this way. ... pure research and other matters ... Certainly "computing for a cause" sounds practical, but in common practice it ...
    (comp.programming)
  • Re: Modular Exponentiation?
    ... That is a common practice of Computer Science. ... if and only if N divides a-b. ... Arturo Magidin ...
    (sci.math)
  • Re: Modular Exponentiation?
    ... On Fri, 3 Nov 2006, Arturo Magidin wrote: ... That is a common practice of Computer Science. ... if and only if N divides a-b. ...
    (sci.math)