Click or drag to resize
gmp_libmpz_fits_sshort_p Method
Return non-zero iff the value of op fits in a signed 16-bit integer. Otherwise, return zero.

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 int mpz_fits_sshort_p(
	mpz_t op
)

Parameters

op
Type: Math.Gmp.Nativempz_t
The operand integer.

Return Value

Type: Int32
Return non-zero iff the value of op fits in a signed 16-bit integer. Otherwise, return zero.
Examples
// Create, initialize, and set the value of op 4294967295.
mpz_t op = new mpz_t();
gmp_lib.mpz_init_set_ui(op, uint.MaxValue);

// Assert that op does not fit in short.
Assert.IsTrue(gmp_lib.mpz_fits_sshort_p(op) ==  0);

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