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

Inf Integrand handling #35

Open
agerlach opened this issue Aug 31, 2020 · 2 comments
Open

Inf Integrand handling #35

agerlach opened this issue Aug 31, 2020 · 2 comments

Comments

@agerlach
Copy link
Collaborator

agerlach commented Aug 31, 2020

Many of the quadrature algorithms do not handle Inf in the integrand well.

QuadGK throws a DomainError, 2D or higher HCubature returns NaN. Cubature has similar issues but at different dimensions (see JuliaMath/HCubature.jl#29). Some Cuba methods seem to work, i.e. return Inf, while others segfault after a significant amount of computation time.

I'm not quite sure how to approach this issue. Seems like it should be handled upstream by the various algorithms, but this may be a big task to get cleaned up across the board.

@lxvm
Copy link
Collaborator

lxvm commented Nov 4, 2023

I guess the surprising thing is that there are integrable singularities, but in practice if an algorithm encounters an infinity, it will either throw an error, give a NaN or Inf, or silently return an underconverged result depending on how proactive it is about numerical errors. I think the best we can do is provide informative return codes, which are currently available from SciMLBase but unused. @agerlach do you think that would address the issue?

@agerlach
Copy link
Collaborator Author

agerlach commented Nov 8, 2023

I think that is probably the best solution.

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

No branches or pull requests

2 participants