Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/anupq/src/   (GAP Algebra Version 4.15.1©)  Datei vom 28.7.2025 mit Größe 1 kB image not shown  

Quelle  calculate_jacobi.c

  Sprache: C
 

/****************************************************************************
**
*A  calculate_jacobi.c          ANUPQ source                   Eamonn O'Brien
**
*Y  Copyright 1995-2001,  Lehrstuhl D fuer Mathematik,  RWTH Aachen,  Germany
*Y  Copyright 1995-2001,  School of Mathematical Sciences, ANU,     Australia
**
*/


#include "pq_defs.h"
#include "pcp_vars.h"
#include "constants.h"

/* calculate an individual jacobi */

void calculate_jacobi(struct pcp_vars *pcp)
{
   register int *y = y_address;

   Logical invalid = FALSE;
   int bound = pcp->ccbeg;
   int output;
   int a, b, c;

#include "access.h"

   printf("Input the three components for the consistency calculation: ");
   read_value(FALSE"", &c, 1);
   read_value(FALSE"", &b, 1);
   read_value(TRUE"", &a, 1);

   /* check the validity of the components */
   invalid =
       outside(a, bound) || outside(b, bound) || outside(c, bound) ||
       pcp->cc <= 2 || c < b || b < a ||
       (a != b && b != c &&
        WT(y[pcp->structure + c]) + WT(y[pcp->structure + b]) +
                WT(y[pcp->structure + a]) >
            pcp->cc) ||
       ((a == b || b == c) &&
        WT(y[pcp->structure + a]) + WT(y[pcp->structure + c]) + 1 > pcp->cc);

   /* if valid, calculate the jacobi */
   if (!invalid) {
      output = pcp->fullop;
      pcp->fullop = TRUE;
      jacobi(c, b, a, 0, pcp);
      pcp->fullop = output;
   } else {
      PRINT("Incorrect values %d, %d, %d for Jacobi calculation\n", c, b, a);
      pcp->redgen = 0;
   }
}

/* check if x lies outside permitted range from 1 to y */
int outside(int x, int y)
{
   return (x <= 0) || (x > y);
}

Messung V0.5 in Prozent
C=97 H=96 G=96

¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet am  2026-06-18) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.