Click or drag to resize
gmp_libmpn_perfect_power_p Method
Return non-zero iff {sp, n} is a perfect power.

Namespace:  Math.Gmp.Native
Assembly:  Math.Gmp.Native (in Math.Gmp.Native.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static int mpn_perfect_power_p(
	mp_ptr sp,
	mp_size_t n
)

Parameters

sp
Type: Math.Gmp.Nativemp_ptr
The operand integer.
n
Type: Math.Gmp.Nativemp_size_t
The numbe rof limbs of sp.

Return Value

Type: Int32
Non-zero iff {sp, n} is a perfect power.
Examples
// Create multi-precision operand.
mp_ptr s1p = new mp_ptr(new uint[] { 0xd4a51000, 0x000000e8 });

// Assert s1p is a perfect power.
Assert.IsTrue(gmp_lib.mpn_perfect_power_p(s1p, s1p.Size) != 0);

// Release unmanaged memory.
gmp_lib.free(s1p);
See Also