"sum([1.0, 1e100, 1.0, -1e100])" fails

that’s kind of cheating… might as well just use more precision?

julia> setprecision(800) do # you can do this globally
           sum(BigFloat[1.0, 1e100, 1.0, -1e100])
       end
2.0
6 Likes