Changeset 09171bd in git for factory/ffops.cc


Ignore:
Timestamp:
Nov 8, 2005, 7:08:58 PM (18 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
c91fefd86fa767380ec3afd51615cf5943a61c88
Parents:
79cf7d0d7efe4df23244844b4fcd1285ef913580
Message:
*hannes: removed MWERKS support
         optimized ffops with idea from Singular/kernel/modulop.h


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

Legend:

Unmodified
Added
Removed
  • factory/ffops.cc

    r79cf7d0 r09171bd  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: ffops.cc,v 1.9 2000-08-04 11:10:15 obachman Exp $ */
     2/* $Id: ffops.cc,v 1.10 2005-11-08 18:08:58 Singular Exp $ */
    33
    44#include <config.h>
     
    1515bool ff_big = false;
    1616short * ff_invtab = new short [32767];
    17 
    18 #ifdef __MWERKS__
    19 #include <stuff_64.h>
    20 int ff_mul( const int a, const int b )
    21 {
    22   Int_64 c;
    23   unsigned int ua, ub;
    24   int res;
    25  
    26   if ((!a) || (!b)) return 0;
    27   if (a>0)
    28     ua = a;
    29   else
    30     ua = -a;
    31   if (b>0)
    32     ub = b;
    33   else
    34     ub = -b;
    35   mul_64(&c, ua, ub);
    36   res = rem_64(&c, ff_prime);
    37   if ((a>0) != (b>0))
    38     res = ff_prime-res;
    39   return res;
    40 }
    41 #endif
    4217
    4318void ff_setprime ( const int p )
Note: See TracChangeset for help on using the changeset viewer.