[BACK]Return to nextprime.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gmp / mpz

Diff for /OpenXM_contrib/gmp/mpz/Attic/nextprime.c between version 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2000/09/09 14:12:55 version 1.1.1.2, 2003/08/25 16:06:33
Line 1 
Line 1 
 /* mpz_nextprime(p,t) - compute the next prime > t and store that in p.  /* mpz_nextprime(p,t) - compute the next prime > t and store that in p.
   
 Copyright (C) 1999, 2000 Free Software Foundation, Inc.  Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
   
 This file is part of the GNU MP Library.  This file is part of the GNU MP Library.
   
Line 23  MA 02111-1307, USA. */
Line 23  MA 02111-1307, USA. */
 #include "gmp-impl.h"  #include "gmp-impl.h"
   
 void  void
 #if __STDC__  
 mpz_nextprime (mpz_ptr p, mpz_srcptr t)  mpz_nextprime (mpz_ptr p, mpz_srcptr t)
 #else  
 mpz_nextprime (p, t)  
      mpz_ptr    p;  
      mpz_srcptr t;  
 #endif  
 {  {
   mpz_add_ui (p, t, 1L);    mpz_add_ui (p, t, 1L);
   while (! mpz_probab_prime_p (p, 5))    while (! mpz_probab_prime_p (p, 5))
Line 37  mpz_nextprime (p, t)
Line 31  mpz_nextprime (p, t)
 }  }
   
 #if 0  #if 0
 /* This code is not yet tested.  Will be enabled in 3.1. */  /* This code is not yet tested.  Will be enabled some time. */
   
 status unsigned short primes[] =  status unsigned short primes[] =
 {  {
Line 56  status unsigned short primes[] =
Line 50  status unsigned short primes[] =
 #define NUMBER_OF_PRIMES 167  #define NUMBER_OF_PRIMES 167
   
 void  void
 #if __STDC__  
 mpz_nextprime (mpz_ptr p, mpz_srcptr n)  mpz_nextprime (mpz_ptr p, mpz_srcptr n)
 #else  
 mpz_nextprime (p, n)  
      mpz_ptr p;  
      mpz_srcptr n;  
 #endif  
 {  {
   mpz_t tmp;    mpz_t tmp;
   unsigned short *moduli;    unsigned short *moduli;

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>