gmp_libmpn_perfect_square_p Method |
Namespace: Math.Gmp.Native
public static int mpn_perfect_square_p( mp_ptr s1p, mp_size_t n )
Public Shared Function mpn_perfect_square_p ( s1p As mp_ptr, n As mp_size_t ) As Integer
public: static int mpn_perfect_square_p( mp_ptr^ s1p, mp_size_t n )
static member mpn_perfect_square_p : s1p : mp_ptr * n : mp_size_t -> int
The most significant limb of the input {s1p, n} must be non-zero.
// Create multi-precision operand. mp_ptr s1p = new mp_ptr(new uint[] { 0xffffffff, 0xffffffff }); // Assert s1p is not a perfect square. Assert.IsTrue(gmp_lib.mpn_perfect_square_p(s1p, s1p.Size) == 0); // Release unmanaged memory. gmp_lib.free(s1p);
' Create multi-precision operand. Dim s1p As New mp_ptr(New UInteger() { &HffffffffUI, &HffffffffUI}) ' Assert s1p is not a perfect square. Assert.IsTrue(gmp_lib.mpn_perfect_square_p(s1p, s1p.Size) = 0) ' Release unmanaged memory. gmp_lib.free(s1p)
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.