gmp_libmpq_sgn Method |
Namespace: Math.Gmp.Native
public static int mpq_sgn( mpq_t op )
Public Shared Function mpq_sgn ( op As mpq_t ) As Integer
public: static int mpq_sgn( mpq_t^ op )
static member mpq_sgn : op : mpq_t -> int
// Create, initialize, and set a new rational x to -10 / 11. mpq_t op = new mpq_t(); gmp_lib.mpq_init(op); gmp_lib.mpq_set_si(op, -10, 11); // Assert that op is negative. Assert.IsTrue(gmp_lib.mpq_sgn(op) == -1); // Release unmanaged memory allocated for x and y. gmp_lib.mpq_clear(op);
' Create, initialize, and set a new rational x to -10 / 11. Dim op As New mpq_t() gmp_lib.mpq_init(op) gmp_lib.mpq_set_si(op, -10, 11) ' Assert that op is negative. Assert.IsTrue(gmp_lib.mpq_sgn(op) = -1) ' Release unmanaged memory allocated for x and y. gmp_lib.mpq_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.