This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Eulers Totient Function | |
# | |
# Description at http://mathworld.wolfram.com/TotientFunction.html | |
# Algorithm based on http://en.wikipedia.org/wiki/Euler%27s_totient_function | |
# Interesting property: for a prime number p, epf(p) = p - 1 | |
# greatest common divisor of two integers | |
# @param m int the first number | |
# @param n int the second number | |
# @return int the greates common divisor of the two numbers |
NewerOlder