Wanting to compare the execution times of H1000000 in both NARS2000 and C on a Core i7 4970, I wrote this and got that result : z←⎕t ⋄ +/÷⍳1000000 ⋄ ⎕t-z
int i; float s = 0.;
for (i=1; i<=1000000;++i) s+=1./i;
printf("%20.4f \n", s);
Process returned 0 (0x0) execution time : 0.010 s
Press any key to continue.The good news are of course that on this particular example, the execution time ratio is only 3.5 to 1.
news seem that we do not get the same computation result at all
Did I good somewhere ? I cannot believe that rounding errors explain such a difference.
Any hint ?