GMP Native Interface for .NET
gmp_libmpf_inits Method |
Initialize a NULL-terminated list of mpf_t variables, and set their values to 0.
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 mpf_inits( params mpf_t[] x )
Public Shared Sub mpf_inits ( ParamArray x As mpf_t() )
public: static void mpf_inits( ... array<mpf_t^>^ x )
static member mpf_inits : x : mpf_t[] -> unit
Parameters
- x
- Type: Math.Gmp.Nativempf_t
The operand float.
Remarks
The precision of the initialized variables is undefined unless a default precision has already been established by a call to mpf_set_default_prec.
Examples
// Create new floating-point numbers x1, x2 and x3. mpf_t x1 = new mpf_t(); mpf_t x2 = new mpf_t(); mpf_t x3 = new mpf_t(); // Initialize the floating-point numbers. gmp_lib.mpf_inits(x1, x2, x3, null); // Assert that their value is 0. Assert.IsTrue(gmp_lib.mpf_get_d(x1) == 0.0); Assert.IsTrue(gmp_lib.mpf_get_d(x2) == 0.0); Assert.IsTrue(gmp_lib.mpf_get_d(x3) == 0.0); // Release unmanaged memory allocated for the floating-point numbers. gmp_lib.mpf_clears(x1, x2, x3, null);
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