Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SimplePore distance function #5016

Merged
merged 2 commits into from
Dec 6, 2024
Merged

Conversation

jngrad
Copy link
Member

@jngrad jngrad commented Dec 4, 2024

The SimplePore shape used trigonometric functions incorrectly and generated NaN values in the core that would not propagate, but would still be a source of undefined behavior in if/else statements and would cause fatal errors when floating-point exceptions trapping was enabled.

The new distance calculation doesn't rely on trigonometric functions, is 5% faster, and is fully tested.

@jngrad jngrad added this to the ESPResSo 4.3.0 milestone Dec 4, 2024
@jngrad jngrad requested review from hidekb, Yashas17 and reinaual and removed request for hidekb December 4, 2024 20:44
Copy link
Contributor

@reinaual reinaual left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jngrad jngrad added the automerge Merge with kodiak label Dec 6, 2024
@kodiakhq kodiakhq bot merged commit 6dbf05f into espressomd:python Dec 6, 2024
10 checks passed
@jngrad jngrad deleted the simplepore branch December 6, 2024 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants