On 2/23/15 1:30 PM, Steven Schveighoffer wrote:
foreach(x; stdin.byLine)
     writefln("%0.15f", map!(a =>
(a&1?-1:1)/(2.0*a+1))(iota(x.to!int)).sum);

Wonder why didn't you lead with the iota? -- Andrei

Reply via email to