Please don't make me be the only one to post test cases or I will take my ball and go home ;-)
Just a reminder: You can get bonus points added to your Master problem entry score by participating in each problem's forum. Earn 5 points for each forum post, up to a maximum of 25 points per problem. The forum points can make a difference in your final entry score. So, take advantage of this for this last Master levelproblem.
Hi1. are two commands per line allowed? like:var a=1; var b=2;2. can a command be split betwene the lines?var a=123;I hope the answer is NO in both casesCheersJakub
output(1 / 0);
What should the program output ?
NaN ? Error ?
can variable name be some key word like this :
These I designed to test that parallelism does not break inter-statement dependencies.For the attached "chain2.txt", output should be:0.13333333331.00000000000.13333333332.00000000000.13333333333.00000000000.13333333334.00000000000.13333333335.00000000000.13333333336.00000000000.13333333337.00000000000.13333333338.00000000000.13333333339.00000000000.133333333310.0000000000For the attached "chain3.txt", the output should be:200.0000000000400.0000000000600.0000000000800.00000000001000.00000000001200.00000000001400.00000000001600.00000000001800.00000000002000.00000000001.00000000002200.0000000
We have been hashing the expression evaluation order as to right-to-left versis left-to-right for some time in other threads with the apparent "official" position as being right-to-left.
I would like to point out then an apparent inconsistancy with this rule (I say apparent because the results were not stated but are implied).
In the description for string operators (concatination) you have
var strConcat = str1 + str2 + str3;
The output for this was not shown, but I would imagine everyone expects the output to be:
Has anyone tried to parallelize the problem with explicit inter-statment dependencies worked into the parallelism? I've pondered and pondered, but I can't seem to find a model that is simple enough to produce any speedup except in very specialized cases (like a whole slew of output() statements).
My first timings are available. My test is to replicate the attached input 500,000 times for a 765MB file (30.5 million statements). Time on an i7-2600 is about 8 seconds on first run, 4 seconds on second run (after input was cached by OS). Disclaimer: i7-2600 is a very fast CPU.
Attached are some samples and the results I produce. Please compare and comment.john