Skip to content

Added implementation of Euler's totient function#6

Open
ipsin wants to merge 1 commit intowackywendell:masterfrom
ipsin:master
Open

Added implementation of Euler's totient function#6
ipsin wants to merge 1 commit intowackywendell:masterfrom
ipsin:master

Conversation

@ipsin
Copy link

@ipsin ipsin commented Jan 9, 2022

For anyone working in number theory Euler's totient function can be useful, and I thought it might make a welcome addition to your library. I understand this was unsolicited feature, so no worries if you choose not to incorporate it.

Thanks for your time.

@EMBradley
Copy link

The comment on lines 455-456 describes the function incorrectly, although as far as I can tell the actual implementation is correct. The totient function counts all the numbers from 1 to n that are coprime with n, not just the primes.

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.

2 participants