# Fast\_math: A collection of functions for fast number crunching using Fortran

**URL:** <https://fortran-lang.discourse.group/t/fast-math-a-collection-of-functions-for-fast-number-crunching-using-fortran/6589>\
**Category:** Announcements\
**Created:** [October 1, 2023, 10:53am UTC](https://fortran-lang.discourse.group/t/fast-math-a-collection-of-functions-for-fast-number-crunching-using-fortran/6589 "2023-10-01T10:53:30Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ivanpribec](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/ivanpribec/32/3290_2.png) [@ivanpribec](https://fortran-lang.discourse.group/u/ivanpribec)\
**Post date:** [October 1, 2023, 1:53pm UTC](https://fortran-lang.discourse.group/t/fast-math-a-collection-of-functions-for-fast-number-crunching-using-fortran/6589/5 "2023-10-01T13:53:37Z")

</div>

For the intrinsic `sum` at least I don’t believe there are many guarantees. There’s been a lengthy discussion before here: [Some Intrinsic SUMS](https://fortran-lang.discourse.group/t/some-intrinsic-sums/5760)

The standard appears to wash it’s hands by stating the result is processor-dependent:

> The result of SUM (ARRAY) has a value equal to a **processor-dependent** approximation to the sum of all the elements of ARRAY or has the value zero if ARRAY has size zero

(Processor being jargon for the Fortran compiler in typical scenarios.)

Especially for global sums across multiple ranks (MPI) or images (coarrays), enhanced accurary is needed to get consistent results. The following paper discusses the issue: [Redirecting](https://doi.org/10.1016/j.parco.2011.02.009)

---

_[View the full topic](https://fortran-lang.discourse.group/t/fast-math-a-collection-of-functions-for-fast-number-crunching-using-fortran/6589)._
