gmp_libmpn_xnor_n Method |
Namespace: Math.Gmp.Native
public static void mpn_xnor_n( mp_ptr rp, mp_ptr s1p, mp_ptr s2p, mp_size_t n )
Public Shared Sub mpn_xnor_n ( rp As mp_ptr, s1p As mp_ptr, s2p As mp_ptr, n As mp_size_t )
public: static void mpn_xnor_n( mp_ptr^ rp, mp_ptr^ s1p, mp_ptr^ s2p, mp_size_t n )
static member mpn_xnor_n : rp : mp_ptr * s1p : mp_ptr * s2p : mp_ptr * n : mp_size_t -> unit
// Create multi-precision operands, and expected result. mp_ptr s1p = new mp_ptr(new uint[] { 0xffffffff, 0xffffffff }); mp_ptr s2p = new mp_ptr(new uint[] { 0x00000001, 0x12345678 }); mp_ptr rp = new mp_ptr(new uint[2]); mp_ptr result = new mp_ptr(new uint[] { 0x00000001, 0x12345678 }); // Set rp = not(s1 xor s2). gmp_lib.mpn_xnor_n(rp, s1p, s2p, s1p.Size); // Assert result of operation. Assert.IsTrue(rp.SequenceEqual(result)); // Release unmanaged memory. gmp_lib.free(rp, s1p, s2p, result);
' Create multi-precision operands, and expected result. Dim s1p As New mp_ptr(New UInteger() { &HffffffffUI, &HffffffffUI}) Dim s2p As New mp_ptr(New UInteger() { &H1, &H12345678}) Dim rp As New mp_ptr(New UInteger(1) { }) Dim result As New mp_ptr(New UInteger() { &H1, &H12345678}) ' Set rp = not(s1 xor s2). gmp_lib.mpn_xnor_n(rp, s1p, s2p, s1p.Size) ' Assert result of operation. Assert.IsTrue(rp.SequenceEqual(result)) ' Release unmanaged memory. gmp_lib.free(rp, s1p, s2p, result)
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.