gmp_libmpz_ui_kronecker Method |
Namespace: Math.Gmp.Native
public static int mpz_ui_kronecker( uint a, mpz_t b )
Public Shared Function mpz_ui_kronecker ( a As UInteger, b As mpz_t ) As Integer
public: static int mpz_ui_kronecker( unsigned int a, mpz_t^ b )
static member mpz_ui_kronecker : a : uint32 * b : mpz_t -> int
When b is odd the Jacobi symbol and Kronecker symbol are identical, so mpz_kronecker_ui, etc. can be used for mixed precision Jacobi symbols too.
// Create, initialize, and set the value of b to 4. mpz_t b = new mpz_t(); gmp_lib.mpz_init_set_ui(b, 4U); // Assert that the Kronecker symbol of (15/b) is 1. Assert.IsTrue(gmp_lib.mpz_ui_kronecker(15U, b) == 1); // Release unmanaged memory allocated for b. gmp_lib.mpz_clear(b);
' Create, initialize, and set the value of b to 4. Dim b As New mpz_t() gmp_lib.mpz_init_set_ui(b, 4UI) ' Assert that the Kronecker symbol of (15/b) is 1. Assert.IsTrue(gmp_lib.mpz_ui_kronecker(15UI, b) = 1) ' Release unmanaged memory allocated for b. gmp_lib.mpz_clear(b)
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.