On Tue, May 14, 2013 at 7:54 AM, Elton Wang <[email protected]> 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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to