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

**URL:** <https://discourse.julialang.org/t/sum-1-0-1e100-1-0-1e100-fails/76502>\
**Category:** General Usage\
**Tags:** question, numbers\
**Created:** [February 15, 2022, 6:37pm UTC](https://discourse.julialang.org/t/sum-1-0-1e100-1-0-1e100-fails/76502 "2022-02-15T18:37:01Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![johnmyleswhite](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnmyleswhite/32/31_2.png) [@johnmyleswhite](https://discourse.julialang.org/u/johnmyleswhite)\
**Post date:** [February 15, 2022, 6:46pm UTC](https://discourse.julialang.org/t/sum-1-0-1e100-1-0-1e100-fails/76502/4 "2022-02-15T18:46:11Z")

</div>

Relevant?

> [@Julia equivalent of Python's "fsum" for floating point summation](https://discourse.julialang.org/t/julia-equivalent-of-pythons-fsum-for-floating-point-summation/17785):
>
> I have been looking for a Julia equivalent of Python’s fsum and have thus far been unable to find one. Is there an implementation already available? If not I will write my own and put it on Github for others to use. From the Python docs: math.fsum ( iterable ) Return an accurate floating point sum of values in the iterable. Avoids loss of precision by tracking multiple intermediate partial sums: The algorithm’s accuracy depends on IEEE-754 arithmetic guarantees and the typical case where the…

---

_[View the full topic](https://discourse.julialang.org/t/sum-1-0-1e100-1-0-1e100-fails/76502)._
