GMP Native Interface for .NET
gmp_libmpz_primorial_ui Method |
Set rop to the primorial of n, i.e. the product of all positive prime numbers ≤ n.
Namespace: Math.Gmp.Native
Assembly: Math.Gmp.Native (in Math.Gmp.Native.dll) Version: 1.0.0.0 (1.0.0.0)

public static void mpz_primorial_ui( mpz_t rop, uint n )
Public Shared Sub mpz_primorial_ui ( rop As mpz_t, n As UInteger )
public: static void mpz_primorial_ui( mpz_t^ rop, unsigned int n )
static member mpz_primorial_ui : rop : mpz_t * n : uint32 -> unit
Parameters
- rop
- Type: Math.Gmp.Nativempz_t
The result integer. - n
- Type: SystemUInt32
The operand integer.

// Create, initialize, and set the value of rop to 0. mpz_t rop = new mpz_t(); gmp_lib.mpz_init(rop); // Set rop = 7 * 5 * 3 * 2 = 210. gmp_lib.mpz_primorial_ui(rop, 9U); // Assert that rop is 210. Assert.IsTrue(gmp_lib.mpz_get_si(rop) == 210); // Release unmanaged memory allocated for rop. gmp_lib.mpz_clear(rop);
' Create, initialize, and set the value of rop to 0. Dim rop As New mpz_t() gmp_lib.mpz_init(rop) ' Set rop = 7 * 5 * 3 * 2 = 210. gmp_lib.mpz_primorial_ui(rop, 9UI) ' Assert that rop is 210. Assert.IsTrue(gmp_lib.mpz_get_si(rop) = 210) ' Release unmanaged memory allocated for rop. gmp_lib.mpz_clear(rop)
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.
