GMP Native Interface for .NET
gmp_libmpz_get_ui Method |
Return the value of op as an unsigned long.
Namespace: Math.Gmp.Native
Assembly: Math.Gmp.Native (in Math.Gmp.Native.dll) Version: 1.0.0.0 (1.0.0.0)

public static uint mpz_get_ui( mpz_t op )
Public Shared Function mpz_get_ui ( op As mpz_t ) As UInteger
public: static unsigned int mpz_get_ui( mpz_t^ op )
static member mpz_get_ui : op : mpz_t -> uint32
Parameters
- op
- Type: Math.Gmp.Nativempz_t
The integer.
Return Value
Type: UInt32The value of op as an unsigned long.

If op is too big to fit an unsigned long then just the least significant bits that do fit are returned. The sign of op is ignored, only the absolute value is used.

// Create, initialize, and set the value of x to 10. mpz_t x = new mpz_t(); gmp_lib.mpz_init_set_ui(x, 10U); // Retrieve the value of x, and assert that it is 10. Assert.IsTrue(gmp_lib.mpz_get_ui(x) == 10U); // Release unmanaged memory allocated for x. gmp_lib.mpz_clear(x);
' Create, initialize, and set the value of x to 10. Dim x As New mpz_t() gmp_lib.mpz_init_set_ui(x, 10UI) ' Retrieve the value of x, and assert that it is 10. Assert.IsTrue(gmp_lib.mpz_get_ui(x) = 10UI) ' Release unmanaged memory allocated for x. gmp_lib.mpz_clear(x)
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.
