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

Detect 0 raised to negative exponents #684

Open
alexmo1997 opened this issue Jan 18, 2025 · 1 comment
Open

Detect 0 raised to negative exponents #684

alexmo1997 opened this issue Jan 18, 2025 · 1 comment

Comments

@alexmo1997
Copy link

For 0^-1, numbat gives inf as a result. However, 0^-1 should be equally undefined just as 1/0.

@sharkdp
Copy link
Owner

sharkdp commented Feb 16, 2025

Yes, thank you for reporting this. I think we should probably catch this, but in general, we won't be able to turn all calculations that potentially return inf into runtime errors. Numbat is a numerical calculator and can not analytically determine in all cases if a calculations will result in inf/NaN.

@sharkdp sharkdp changed the title wrong answer for 0^-1 Detect 0 raised to negative exponents Feb 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants