# Lots of failing tests on arm64 Macs due to Clang default of \`-ffp-contract=on\`

**URL:** <https://discourse.vtk.org/t/lots-of-failing-tests-on-arm64-macs-due-to-clang-default-of-ffp-contract-on/13779>\
**Category:** Development\
**Created:** [April 23, 2024, 8:51pm UTC](https://discourse.vtk.org/t/lots-of-failing-tests-on-arm64-macs-due-to-clang-default-of-ffp-contract-on/13779 "2024-04-23T20:51:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![seanm](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@seanm](https://discourse.vtk.org/u/seanm)\
**Post date:** [April 23, 2024, 8:51pm UTC](https://discourse.vtk.org/t/lots-of-failing-tests-on-arm64-macs-due-to-clang-default-of-ffp-contract-on/13779/1 "2024-04-23T20:51:56Z")

</div>

Hi all,

Building VTK master on my Intel Mac results in only 1 test failure. But on arm64 Macs, there are about 15.

You can see details here:

[https://open.cdash.org/viewTest.php?onlyfailed&buildid=9564918](https://open.cdash.org/viewTest.php?onlyfailed&buildid=9564918)

I debugged them, and found at least 2 were due to very tight numerical precision expectations, and created MRs:

[https://gitlab.kitware.com/vtk/vtk/-/merge\_requests/11083](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/11083)  
[https://gitlab.kitware.com/vtk/vtk/-/merge\_requests/11086](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/11086)

I then had some deja vu, and remembered how Clang 14 changed to default to `-ffp-contract=on` and how this caused numerical differences in our own code, more so on arm64 than x86\_64. So I tried building again with `-ffp-model=strict` and now 13 of 15 pass.

Since this is clang’s default now (on almost all platforms), what should we do about this?

Require `-ffp-model=strict`? Loosen the strictness of the tests?

Cheers,

Sean

---

<div class="post-metadata">

**Author:** ![seanm](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@seanm](https://discourse.vtk.org/u/seanm)\
**Post date:** [August 2, 2024, 9:23pm UTC](https://discourse.vtk.org/t/lots-of-failing-tests-on-arm64-macs-due-to-clang-default-of-ffp-contract-on/13779/2 "2024-08-02T21:23:17Z")

</div>

I created a gitlab issue for this: [https://gitlab.kitware.com/vtk/vtk/-/issues/19418](https://gitlab.kitware.com/vtk/vtk/-/issues/19418)
