gmp_libmpz_perfect_square_p Method |
Namespace: Math.Gmp.Native
public static int mpz_perfect_square_p( mpz_t op )
Public Shared Function mpz_perfect_square_p ( op As mpz_t ) As Integer
public: static int mpz_perfect_square_p( mpz_t^ op )
static member mpz_perfect_square_p : op : mpz_t -> int
Under this definition both 0 and 1 are considered to be perfect squares.
// Create, initialize, and set the value of x to 10000. mpz_t op = new mpz_t(); gmp_lib.mpz_init_set_si(op, 10000); // Assert that op is a perfect square. Assert.IsTrue(gmp_lib.mpz_perfect_square_p(op) > 0); // Release unmanaged memory allocated for op. gmp_lib.mpz_clear(op);
' Create, initialize, and set the value of x to 10000. Dim op As New mpz_t() gmp_lib.mpz_init_set_si(op, 10000) ' Assert that op is a perfect square. Assert.IsTrue(gmp_lib.mpz_perfect_square_p(op) > 0) ' Release unmanaged memory allocated for op. 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.