[Jprogramming] Does #. Use Horner rule inside

Raul Miller rauldmiller at gmail.com
Tue May 14 12:37:30 UTC 2013


On Tue, May 14, 2013 at 7:54 AM, Elton Wang <ahala2000 at yahoo.com> wrote:
> In Rosetta code Horner code item, it uses (#.|.)~ as a solution. Is this right? I thought this is plain polynominal sum rather than horner rule, since for x#.y, the product scan of x is calculated first?

#. is, in my opinion, an expression of Horner's Rule, regardless of
how it is implemented.

But there's a fundamental problem with some rosetta code tasks - they
ask for non-results.

The fix, I think, is not to do away with mathematical equivalence in
the implementation. That would pretty much exclude the use of
languages which use optimizing compilers or related techniques. The
fix, I think, would be to rephrase those tasks (or create new ones and
simplify the existing tasks) so that the relevant intermediate results
are exposed and testable.

-- 
Raul


More information about the Programming mailing list