Remove all occurrences of the factor f from op and store the result in rop.
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 mp_bitcnt_t mpz_remove(
mpz_t rop,
mpz_t op,
mpz_t f
)
Public Shared Function mpz_remove (
rop As mpz_t,
op As mpz_t,
f As mpz_t
) As mp_bitcnt_t
public:
static mp_bitcnt_t mpz_remove(
mpz_t^ rop,
mpz_t^ op,
mpz_t^ f
)
static member mpz_remove :
rop : mpz_t *
op : mpz_t *
f : mpz_t -> mp_bitcnt_t
Parameters
- rop
- Type: Math.Gmp.Nativempz_t
The result integer. - op
- Type: Math.Gmp.Nativempz_t
The operand integer. - f
- Type: Math.Gmp.Nativempz_t
The factor operand integer.
Return Value
Type:
mp_bitcnt_tThe return value is how many such occurrences were removed.
Examples
mpz_t op = new mpz_t();
gmp_lib.mpz_init_set_ui(op, 45U);
mpz_t f = new mpz_t();
gmp_lib.mpz_init_set_ui(f, 3U);
mpz_t rop = new mpz_t();
gmp_lib.mpz_init(rop);
Assert.IsTrue(gmp_lib.mpz_remove(rop, op, f) == 2);
Assert.IsTrue(gmp_lib.mpz_get_si(rop) == 5);
gmp_lib.mpz_clears(rop, op, f, null);
Dim op As New mpz_t()
gmp_lib.mpz_init_set_ui(op, 45UI)
Dim f As New mpz_t()
gmp_lib.mpz_init_set_ui(f, 3UI)
Dim rop As New mpz_t()
gmp_lib.mpz_init(rop)
Assert.IsTrue(gmp_lib.mpz_remove(rop, op, f) = 2)
Assert.IsTrue(gmp_lib.mpz_get_si(rop) = 5)
gmp_lib.mpz_clears(rop, op, f, Nothing)
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