Remove ucore_ prefix from headers and source files
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
#include "ucore/math.h"
|
||||
|
||||
/*
|
||||
Euler's Totient Function is denoted by the Greek letter phi, and is defined as follows:
|
||||
phi(N) = how many numbers between 1 and N - 1 which are relatively prime to N.
|
||||
*/
|
||||
uint32_t
|
||||
uc_phi_32(uint32_t N)
|
||||
{
|
||||
uint32_t phi = 1;
|
||||
uint32_t i;
|
||||
for (i = 2 ; i < N ; ++i){
|
||||
if (uc_gcd_32(i, N) == 1){
|
||||
++phi;
|
||||
}
|
||||
}
|
||||
|
||||
return phi;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user