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

handle corner case of eta=0.25 giving nan in phenom_d #96

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

deepchatterjeeligo
Copy link
Contributor

@deepchatterjeeligo deepchatterjeeligo commented Jan 30, 2024

For context

>>> torch.sqrt(torch.tensor([0, -1e-30]))
tensor([0., nan])

The expression that is leading to corner cases like this sometimes is

Seta = torch.sqrt(1.0 - 4.0 * eta)

around eta = 0.25, in which case the answer is Seta=0

@EthanMarx EthanMarx merged commit 954f619 into ML4GW:dev Jan 31, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants