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: Correct logic in power function for zero exponent case #615

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

GideonBature
Copy link
Contributor

  • Corrected the logic in the power function where it incorrectly handled the case when num2 == 0. The function was originally set to abort when the exponent was zero.
  • Updated the logic so that when num2 == 0, the function correctly returns 1, since any number raised to the power of zero should always equal one.

- Corrected the logic in the power function where it incorrectly handled the case 
  when `num2 == 0`. The function was originally set to abort when the exponent was zero.
- Updated the logic so that when `num2 == 0`, the function correctly returns `1`, 
  since any number raised to the power of zero should always equal one.
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.

1 participant