Sitelet https://web.archive.org/web/20260528040925/https://github.com/TheAlgorithms/Python/pull/6023
Skip to content

Add power using exponential squaring#6023

Closed
fffzlfk wants to merge 2 commits into
TheAlgorithms:masterfrom
fffzlfk:power_using_exponential_squaring
Closed

Add power using exponential squaring#6023
fffzlfk wants to merge 2 commits into
TheAlgorithms:masterfrom
fffzlfk:power_using_exponential_squaring

Conversation

@fffzlfk
Copy link
Copy Markdown

@fffzlfk fffzlfk commented Mar 1, 2022 •

Describe your change:

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

@fffzlfk fffzlfk requested a review from Kush1101 as a code owner March 1, 2022 14:32
@ghost ghost added the awaiting reviews This PR is ready to be reviewed label Mar 1, 2022
@fffzlfk fffzlfk changed the title Power using exponential squaring Add power using exponential squaring Mar 1, 2022
@poyea
Copy link
Copy Markdown
Member

poyea commented Apr 8, 2022

Hi @fffzlfk! I think this might a duplicate of https://github.com/TheAlgorithms/Python/blob/master/maths/binary_exponentiation_2.py. Feel free to improve the current versions (like adding test cases to some current implementation). You're free to modify / organize / add tests to code if appropriate.

@fffzlfk fffzlfk closed this Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting reviews This PR is ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants