Changeset cfa45e in git for factory/ffops.cc


Ignore:
Timestamp:
Jun 18, 1996, 2:05:42 PM (27 years ago)
Author:
Rüdiger Stobbe <stobbe@…>
Branches:
(u'spielwiese', 'a719bcf0b8dbc648b128303a49777a094b57592c')
Children:
76cc2d98b06a0707c5c63e25f791b1df23024af0
Parents:
02af91814dd18b74411df95652a7b867df115cd8
Message:
"ff_biginv: changed long's to long long int.
"


git-svn-id: file:///usr/local/Singular/svn/trunk@22 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/ffops.cc

    r02af91 rcfa45e  
    11// emacs edit mode for this file is -*- C++ -*-
    2 // $Id: ffops.cc,v 1.1 1996-06-18 06:57:00 stobbe Exp $
     2// $Id: ffops.cc,v 1.2 1996-06-18 12:05:42 stobbe Exp $
    33
    44/*
    55$Log: not supported by cvs2svn $
     6Revision 1.1  1996/06/18 06:57:00  stobbe
     7"Now the functionality to handle prime numbers that are bigger than 2^15.
     8This results in various changes and some new functions.
     9"
     10
    611Revision 1.0  1996/05/17 10:59:46  stobbe
    712Initial revision
     
    1621int ff_halfprime = 31991 / 2;
    1722bool ff_big = false;
    18 short * ff_invtab = new short [31991];
     23short * ff_invtab = new short [32767];
    1924
    2025void ff_setprime ( const int p )
     
    4752int ff_biginv ( const int a )
    4853{
    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;
    5055    while ( ( r0 > 0 ) && ( r1 > 0 ) ) {
    5156        u = r0 / r1;
     
    5964    }
    6065    if ( r0 == 0 )
    61         return -q1;
     66        return -(int)q1;
    6267    else
    63         return q0;
     68        return (int)q0;
    6469}
Note: See TracChangeset for help on using the changeset viewer.