/* Test mpn_and, mpn_ior, mpn_xor, mpn_andn, mpn_iorn, mpn_xnor, mpn_nand, and mpn_nior.
Copyright 2011-2013 Free Software Foundation, Inc.
This file is part of the GNU MP Library test suite.
The GNU MP Library test suite is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
The GNU MP Library test suite is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */
#include <stdlib.h> #include <stdio.h>
/* Fake native prevalence of the tested operations, so that we actually test the compiled functions, i.e., the ones which users will reach. The inlined
variants will be tested through tests/mpz/logic.c. */ #define HAVE_NATIVE_mpn_com 1 #define HAVE_NATIVE_mpn_and_n 1 #define HAVE_NATIVE_mpn_andn_n 1 #define HAVE_NATIVE_mpn_nand_n 1 #define HAVE_NATIVE_mpn_ior_n 1 #define HAVE_NATIVE_mpn_iorn_n 1 #define HAVE_NATIVE_mpn_nior_n 1 #define HAVE_NATIVE_mpn_xor_n 1 #define HAVE_NATIVE_mpn_xnor_n 1
for (test = 0; test < reps; test++)
{ for (i = 1; i <= max_n; i++)
{
mpz_rrandomb (a, rands, i * 8);
mpz_rrandomb (b, rands, i * 8);
mpz_setbit (a, i * 8 - 1);
mpz_setbit (b, i * 8 - 1);
ap = PTR(a);
bp = PTR(b);
n = SIZ(a);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.