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

Euler Totient function #55

Closed
knotman90 opened this issue May 17, 2017 · 10 comments
Closed

Euler Totient function #55

knotman90 opened this issue May 17, 2017 · 10 comments

Comments

@knotman90
Copy link

What about writing some code for computing the euler totient function?

It is defined as follows:
Given an integer n how many number <n are coprime with it?

It is a very common constant in number theory.

https://en.wikipedia.org/wiki/Euler%27s_totient_function

Would you mind if I submit a PR on this?

@faheel
Copy link
Member

faheel commented May 17, 2017

@knotman90 Yes, you can definitely submit a PR for this. In fact I was thinking about adding it a few weeks ago but didn't get the time.

You can add the code in a file named EulerTotient.cpp in the NumberTheory folder.

@ankur54
Copy link

ankur54 commented Oct 3, 2018

Is the issue open? I would like to work on it

@knotman90
Copy link
Author

@ankur54 I guess you can as I have not performed any action since then.

@ankur54
Copy link

ankur54 commented Oct 4, 2018

Would a normal c++ code suffice or, do I have to code it in .h file?

@alxmjo
Copy link
Collaborator

alxmjo commented Oct 4, 2018

Algorithm implementation goes in header (.hpp) file, unit tests go in .cpp file. Thanks!

@stale
Copy link

stale bot commented Jul 31, 2019

This issue has been automatically marked as inactive because it has not had recent activity. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Inactive label Jul 31, 2019
@faheel
Copy link
Member

faheel commented Aug 4, 2019

Since the recent code reorganisation, the code for this should now go in include/algorithm/number_theory/euler_totient.hpp.

@stale stale bot removed the Inactive label Aug 4, 2019
@stale
Copy link

stale bot commented Oct 3, 2019

This issue has been automatically marked as inactive because it has not had recent activity. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Inactive label Oct 3, 2019
@stale stale bot closed this as completed Oct 18, 2019
@naveensaigit
Copy link

Can I work on this?

@knotman90
Copy link
Author

knotman90 commented Oct 27, 2019 via email

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

5 participants