Skip to content

Conversation

peterfpeterson
Copy link
Member

This is a version of #39656 into ornl-next

This PR removes the use of `Mantid::CurveFitting::EigenMatrix` from the
`Muon` library to avoid the linking of two plugin libraries.

We use `PartialPivLU` decomposition in calculating the inverse,
replicating what the `Mantid::CurveFitting::EigenMatrix` is doing under
the hood.

`long double` is used on arm mac, as it brings precision of eigen matrix
multiplication inline (lowers it) with the other operating systems. I'm
not sure why, you would expect a greater degree of precision.

Here is a compiler explorer used to interrogate the differences when
different types are used with eigen across our compilers:
https://godbolt.org/z/51W6KPecb

This illustrates the issue, but doesn't show the same impact on arm64 of
switching to `long double`.
@peterfpeterson peterfpeterson added the ornl-next A copy of a branch into the ornl-next fork label Jul 17, 2025
@peterfpeterson peterfpeterson enabled auto-merge (squash) July 17, 2025 20:35
@peterfpeterson peterfpeterson merged commit b8e9788 into mantidproject:ornl-next Jul 17, 2025
9 of 10 checks passed
@peterfpeterson peterfpeterson deleted the muon_curvefitting branch July 17, 2025 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ornl-next A copy of a branch into the ornl-next fork
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants