gmp_libmpz_ui_sub Method |
Namespace: Math.Gmp.Native
public static void mpz_ui_sub( mpz_t rop, uint op1, mpz_t op2 )
Public Shared Sub mpz_ui_sub ( rop As mpz_t, op1 As UInteger, op2 As mpz_t )
public: static void mpz_ui_sub( mpz_t^ rop, unsigned int op1, mpz_t^ op2 )
static member mpz_ui_sub : rop : mpz_t * op1 : uint32 * op2 : mpz_t -> unit
// Create, initialize, and set the value of x to 10000. mpz_t x = new mpz_t(); gmp_lib.mpz_init_set_ui(x, 10000U); // Create, initialize, and set the value of z to 0. mpz_t z = new mpz_t(); gmp_lib.mpz_init(z); // Set z = 12222 - x. gmp_lib.mpz_ui_sub(z, 12222U, x); // Assert that z = 12222 - x. Assert.IsTrue(gmp_lib.mpz_get_si(z) == 2222); // Release unmanaged memory allocated for x and z. gmp_lib.mpz_clears(x, z, null);
' Create, initialize, and set the value of x to 10000. Dim x As New mpz_t() gmp_lib.mpz_init_set_ui(x, 10000UI) ' Create, initialize, and set the value of z to 0. Dim z As New mpz_t() gmp_lib.mpz_init(z) ' Set z = 12222 - x. gmp_lib.mpz_ui_sub(z, 12222UI, x) ' Assert that z = 12222 - x. Assert.IsTrue(gmp_lib.mpz_get_si(z) = 2222) ' Release unmanaged memory allocated for x and z. gmp_lib.mpz_clears(x, z, Nothing)
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.