On Sunday, 3 August 2014 at 19:52:42 UTC, Philippe Sigaud wrote:
Can someone confirm the results and tell me what I'm doing wrong?
LDC is likely optimizing the summation: int sum = 0; foreach(i; 0..task.goal) sum += i; To something like: int sum = cast(int)(cast(ulong)(task.goal-1)*task.goal/2);