gmp_lib.mpf_fits_sshort_p Method

GMP Native Interface for .NET

gmp_libmpf_fits_sshort_p Method
Return non-zero if op fits in a 16-bit integer, when truncated to an integer.

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 mpf_fits_sshort_p(
	mpf_t op
)
Public Shared Function mpf_fits_sshort_p ( 
	op As mpf_t
) As Integer
public:
static int mpf_fits_sshort_p(
	mpf_t^ op
)
static member mpf_fits_sshort_p : 
        op : mpf_t -> int 

Parameters

op
Type: Math.Gmp.Nativempf_t
The operand float.

Return Value

Type: Int32
Return non-zero if op fits in a 16-bit integer, when truncated to an integer.
Examples
// Create, initialize, and set the value of op 4294967295.
mpf_t op = new mpf_t();
gmp_lib.mpf_init_set_ui(op, uint.MaxValue);

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

// Release unmanaged memory allocated for op.
gmp_lib.mpf_clear(op);
' Create, initialize, and set the value of op 4294967295.
Dim op As New mpf_t()
gmp_lib.mpf_init_set_ui(op, UInteger.MaxValue)

' Assert that op does not fit in short.
Assert.IsTrue(gmp_lib.mpf_fits_sshort_p(op) = 0)

' Release unmanaged memory allocated for op.
gmp_lib.mpf_clear(op)

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.

See Also