gmp_libmpz_perfect_power_p Method |
Return non-zero if op is a perfect power, i.e., if there exist integers a and b, with b > 1, such that op = a^b.
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 mpz_perfect_power_p(
mpz_t op
)
Public Shared Function mpz_perfect_power_p (
op As mpz_t
) As Integer
public:
static int mpz_perfect_power_p(
mpz_t^ op
)
static member mpz_perfect_power_p :
op : mpz_t -> int
Parameters
- op
- Type: Math.Gmp.Nativempz_t
The operand integer.
Return Value
Type:
Int32Non-zero if
op is a perfect power, i.e., if there exist integers
a and
b, with
b > 1, such that
op = a^b.
Remarks
Under this definition both 0 and 1 are considered to be perfect powers. Negative values of op are accepted, but of course can only be odd perfect powers.
Examples
mpz_t op = new mpz_t();
gmp_lib.mpz_init_set_si(op, 10000);
Assert.IsTrue(gmp_lib.mpz_perfect_power_p(op) > 0);
gmp_lib.mpz_clear(op);
Dim op As New mpz_t()
gmp_lib.mpz_init_set_si(op, 10000)
Assert.IsTrue(gmp_lib.mpz_perfect_power_p(op) > 0)
gmp_lib.mpz_clear(op)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also