#include "fraigInt.h"
Go to the source code of this file.
Functions | |
unsigned int | Cudd_PrimeFraig (unsigned int p) |
Variables | |
int | s_FraigPrimes [FRAIG_MAX_PRIMES] |
unsigned int Cudd_PrimeFraig | ( | unsigned int | p | ) |
FUNCTION DEFINITIONS ///Function********************************************************************
Synopsis [Returns the next prime >= p.]
Description [Copied from CUDD, for stand-aloneness.]
SideEffects [None]
SeeAlso []
Definition at line 115 of file fraigPrime.c.
00116 { 00117 int i,pn; 00118 00119 p--; 00120 do { 00121 p++; 00122 if (p&1) { 00123 pn = 1; 00124 i = 3; 00125 while ((unsigned) (i * i) <= p) { 00126 if (p % i == 0) { 00127 pn = 0; 00128 break; 00129 } 00130 i += 2; 00131 } 00132 } else { 00133 pn = 0; 00134 } 00135 } while (!pn); 00136 return(p); 00137 00138 } /* end of Cudd_Prime */
int s_FraigPrimes[FRAIG_MAX_PRIMES] |
CFile****************************************************************
FileName [fraigPrime.c]
PackageName [FRAIG: Functionally reduced AND-INV graphs.]
Synopsis [The table of the first 1000 primes.]
Author [Alan Mishchenko <alanmi@eecs.berkeley.edu>]
Affiliation [UC Berkeley]
Date [Ver. 2.0. Started - October 1, 2004]
Revision [
] DECLARATIONS ///
Definition at line 27 of file fraigPrime.c.