At 17:33  -0400 2007/05/20, Terrence Brannon wrote:
On 5/20/07, Raul Miller <[EMAIL PROTECTED]> wrote:
On 5/20/07, Terrence Brannon <[EMAIL PROTECTED]> wrote:
 So can you modify the program in 2 ways please:
 1 - just assume it is not running on Windows (alioth tests on Linux).
 Cygwin and Linux should be just fine.
 2 - write something to transform a negative number represented as -5
 to something that J can digest, i.e., _5

Can you give me a specific example of how it fails to meet these
requirements?


No, I can't. I was expecting the output to 400,000 because the
published output from the other programs was that:
http://shootout.alioth.debian.org/debian/benchmark.php?test=sumcol&lang=perl&id=0

but Raul's program generates 500, which is correct.

So I am wrong.


I agree that the correct sum of the given file is 500,
in the more minimilist approach shown on the above link -

iMg5:~/Desktop jkt$ cat cs.ijs
echo +/ 0&". ;._2 stdin''
iMg5:~/Desktop jkt$ time cat sumcol-input.txt | ja cs.ijs
500
real 0m0.192s
user    0m0.047s
sys     0m0.060s
iMg5:~/Desktop jkt$
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to