source: git/factory/cf_primes.cc @ 493c477

spielwiese
Last change on this file since 493c477 was 493c477, checked in by Jens Schmidt <schmidt@…>, 27 years ago
o header fixed git-svn-id: file:///usr/local/Singular/svn/trunk@404 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 875 bytes
Line 
1/* emacs edit mode for this file is -*- C++ -*- */
2/* $Id: cf_primes.cc,v 1.5 1997-06-19 12:24:11 schmidt Exp $ */
3
4#include <config.h>
5
6#include "assert.h"
7
8#include "cf_defs.h"
9#include "cf_globals.h"
10#include "cf_primes.h"
11#include "cf_primetab.h"
12
13
14int cf_getPrime( int i )
15{
16    ASSERT( i >= 0 && i < NUMPRIMES, "index to primes too high" );
17    if ( i >= NUMSMALLPRIMES )
18        return bigprimes[i-NUMSMALLPRIMES];
19    else
20        return smallprimes[i];
21}
22
23int cf_getNumPrimes()
24{
25    return NUMPRIMES;
26}
27
28int cf_getSmallPrime( int i )
29{
30    ASSERT( i >= 0 && i < NUMSMALLPRIMES, "index to primes too high" );
31    return smallprimes[i];
32}
33
34int cf_getNumSmallPrimes()
35{
36    return NUMSMALLPRIMES;
37}
38
39int cf_getBigPrime( int i )
40{
41    ASSERT( i >= 0 && i < NUMBIGPRIMES, "index to primes too high" );
42    return bigprimes[i];
43}
44
45int cf_getNumBigPrimes()
46{
47    return NUMBIGPRIMES;
48}
Note: See TracBrowser for help on using the repository browser.