AngouriMath

Navigation

← Back to list of members

Phi​(AngouriMath.​Entity.​Number.​Integer)

 Method (no overloads)

Summary

Computes Euler phi function
https://en.wikipedia.org/wiki/Euler%27s_totient_function If integer x is non-positive, the result will be 0

Example

using System;
using static AngouriMath.MathS.Compute;

Console.WriteLine(Phi(12));
Console.WriteLine(Phi(13));

Prints
4
12

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 1534 pages online