Changeset cfa45e in git for factory/ffops.cc
- Timestamp:
- Jun 18, 1996, 2:05:42 PM (27 years ago)
- Branches:
- (u'spielwiese', 'a719bcf0b8dbc648b128303a49777a094b57592c')
- Children:
- 76cc2d98b06a0707c5c63e25f791b1df23024af0
- Parents:
- 02af91814dd18b74411df95652a7b867df115cd8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/ffops.cc
r02af91 rcfa45e 1 1 // emacs edit mode for this file is -*- C++ -*- 2 // $Id: ffops.cc,v 1. 1 1996-06-18 06:57:00stobbe Exp $2 // $Id: ffops.cc,v 1.2 1996-06-18 12:05:42 stobbe Exp $ 3 3 4 4 /* 5 5 $Log: not supported by cvs2svn $ 6 Revision 1.1 1996/06/18 06:57:00 stobbe 7 "Now the functionality to handle prime numbers that are bigger than 2^15. 8 This results in various changes and some new functions. 9 " 10 6 11 Revision 1.0 1996/05/17 10:59:46 stobbe 7 12 Initial revision … … 16 21 int ff_halfprime = 31991 / 2; 17 22 bool ff_big = false; 18 short * ff_invtab = new short [3 1991];23 short * ff_invtab = new short [32767]; 19 24 20 25 void ff_setprime ( const int p ) … … 47 52 int ff_biginv ( const int a ) 48 53 { 49 int u, r0 = a, r1 = ff_prime, q0 = 1, q1 = 0;54 long long int u, r0 = a, r1 = ff_prime, q0 = 1, q1 = 0; 50 55 while ( ( r0 > 0 ) && ( r1 > 0 ) ) { 51 56 u = r0 / r1; … … 59 64 } 60 65 if ( r0 == 0 ) 61 return - q1;66 return -(int)q1; 62 67 else 63 return q0;68 return (int)q0; 64 69 }
Note: See TracChangeset
for help on using the changeset viewer.