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

Overflow error due to pointless type cast #2

Open
h3ssto opened this issue Mar 28, 2022 · 0 comments · May be fixed by #3
Open

Overflow error due to pointless type cast #2

h3ssto opened this issue Mar 28, 2022 · 0 comments · May be fixed by #3

Comments

@h3ssto
Copy link

h3ssto commented Mar 28, 2022

KUS/KUS.py

Line 142 in 0dfba46

p = (1.0*z0)/(z0+z1)

This type conversion to float will cause an Overflow Error when z0 is too large. As Python does floating point division by default, this cast is unnecessary. Replacing the line by p = z0 / (z0+z1) solves the problem. Optionally, one could invert the division to remove the need to divide by z0+z1.

@h3ssto h3ssto linked a pull request Nov 3, 2024 that will close this issue
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 a pull request may close this issue.

1 participant