Re: Sum a lot of numbers...

2014-07-10 Thread Justin Whear via Digitalmars-d-learn
On Thu, 10 Jul 2014 17:17:40 +, Justin Whear wrote: > On Thu, 10 Jul 2014 17:16:00 +, Alexandre wrote: > >> Hi :) >> >> I need to sum a list of numbers... but, when I calculate the sum of >> this numbers, I got a simplify representation of sum: >> >> 2.97506e+,12 >> >> How I can make t

Re: Sum a lot of numbers...

2014-07-10 Thread Justin Whear via Digitalmars-d-learn
On Thu, 10 Jul 2014 17:16:00 +, Alexandre wrote: > Hi :) > > I need to sum a list of numbers... but, when I calculate the sum of this > numbers, I got a simplify representation of sum: > > 2.97506e+,12 > > How I can make to get the correctly representation of this number ? A full decimal r

Re: Sum a lot of numbers...

2014-07-10 Thread Alexandre via Digitalmars-d-learn
PS: that is my code: import std.stdio, std.algorithm, std.range, std.conv; string InsertComma(string val) { return val[0 .. $-2] ~ "," ~ val[$-2 .. $]; } int main(string[] argv) { auto x = "oi.txt" .File .byLine .filter!(line => li