Click or drag to resize
gmp_libmpz_fac_ui Method
Set rop to the factorial n!.

Namespace:  Math.Gmp.Native
Assembly:  Math.Gmp.Native (in Math.Gmp.Native.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static void mpz_fac_ui(
	mpz_t rop,
	uint n
)

Parameters

rop
Type: Math.Gmp.Nativempz_t
The result integer.
n
Type: SystemUInt32
The operand integer.
Examples
// Create, initialize, and set the value of rop to 0.
mpz_t rop = new mpz_t();
gmp_lib.mpz_init(rop);

// Set rop = 3!.
gmp_lib.mpz_fac_ui(rop, 3U);

// Assert that rop is 6.
Assert.IsTrue(gmp_lib.mpz_get_si(rop) == 6);

// Release unmanaged memory allocated for rop.
gmp_lib.mpz_clear(rop);
See Also