# Why doesn’t Julia fma automatically?

**URL:** <https://discourse.julialang.org/t/why-doesn-t-julia-fma-automatically/104982>\
**Category:** General Usage\
**Created:** [October 13, 2023, 3:31am UTC](https://discourse.julialang.org/t/why-doesn-t-julia-fma-automatically/104982 "2023-10-13T03:31:53Z")\
**Posts on this page:** 1\
**Showing post:** 28

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [October 16, 2023, 4:31pm UTC](https://discourse.julialang.org/t/why-doesn-t-julia-fma-automatically/104982/28 "2023-10-16T16:31:51Z")

</div>

Yes, the [default floating point model](https://clang.llvm.org/docs/UsersManual.html#cmdoption-ffp-model) in clang also permits FMA [since 2020](https://reviews.llvm.org/D74436) as @Palli described. I’m also not fully convinced that it’s a great idea. The idea that the math you write in a programming language represents some abstract mathematical truth and “just does what you mean” is so very seductive but I really don’t think it’s meaningful in a way you can count on because there’s always some place that the rubber hits the road and you’re no longer abstract.

We’ve discussed this tension many times; this comment still represents my views:

> [@When "if (a\<b) x=1/(a-b)" divides by zero](https://discourse.julialang.org/t/when-if-a-b-x-1-a-b-divides-by-zero/7154/5):
>
> If a sufficiently advanced compiler is indistinguishable from an adversary, then giving the compiler access to `-ffast-math` is gifting that enemy nukes.

---

_[View the full topic](https://discourse.julialang.org/t/why-doesn-t-julia-fma-automatically/104982)._
