gmp_libmpz_get_d Method |
Namespace: Math.Gmp.Native
public static double mpz_get_d( mpz_t op )
Public Shared Function mpz_get_d ( op As mpz_t ) As Double
public: static double mpz_get_d( mpz_t^ op )
static member mpz_get_d : op : mpz_t -> float
If the exponent from the conversion is too big, the result is system dependent. An infinity is returned where available. A hardware overflow trap may or may not occur.
// Create, initialize, and set the value of x to 10. mpz_t x = new mpz_t(); gmp_lib.mpz_init_set_d(x, 10.7D); // Assert that the value of x is 10.0. Assert.IsTrue(gmp_lib.mpz_get_d(x) == 10.0); // Release unmanaged memory allocated for x. gmp_lib.mpz_clear(x);
' Create, initialize, and set the value of x to 10. Dim x As New mpz_t() gmp_lib.mpz_init_set_d(x, 10.7) ' Assert that the value of x is 10.0. Assert.IsTrue(gmp_lib.mpz_get_d(x) = 10.0) ' Release unmanaged memory allocated for x. gmp_lib.mpz_clear(x)
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.