src/NeinMath/IntegerFunctions.cs
/// <summary>
/// Raises an Integer to the power of a specified value.
/// </summary>
/// <param name="value">
/// The Integer to raise to the exponent power.
/// </param>
/// <param name="power">The exponent to raise the Integer by.</param>
/// <returns>
/// The result of raising the Integer to the exponent power.
/// </returns>
Raises an Integer to the power of a specified value.
Raises an Integer to the power of a specified value .
public static Integer Pow(this Integer value, int power)
        {
            if (power < 0)
                throw new ArgumentOutOfRangeException(nameof(power));
            Integer result = 1;
            while (power != 0)
            {
                if (power % 2 == 1)
                    result = value * result;
                value = value * value;
                power = power >> 1;
            }
            return result;
        }
public static Integer Pow ( this Integer value , int power ) { if ( power < 0 ) throw new ArgumentOutOfRangeException ( nameof ( power ) ) ; Integer result = 1 ; while ( power != 0 ) { if ( power % 2 == 1 ) result = value * result ; value = value * value ; power = power >> 1 ; } return result ; }
Raises an Integer to the power of a specified value.
Raises an Integer to the power of a specified value .
The result of raising the Integer to the exponent power.
The result of raising the Integer to the exponent power .
Integer
this
power
int
The exponent to raise the Integer by.
The exponent to raise the Integer by .
value
The Integer to raise to the exponent power.
The Integer to raise to the exponent power .