Changeset 6c15ec in git


Ignore:
Timestamp:
Nov 21, 2006, 12:00:56 PM (17 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
Children:
e2629ce4f7e55e7bff5bf2315aee0a8801a5f683
Parents:
f2c2b7e9680cff169a760b50002fbd78676e5fae
Message:
*hannes: map rationals to large prime fields


git-svn-id: file:///usr/local/Singular/svn/trunk@9507 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/longrat.cc

    rf2c2b7 r6c15ec  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: longrat.cc,v 1.13 2006-05-02 16:25:17 Singular Exp $ */
     4/* $Id: longrat.cc,v 1.14 2006-11-21 11:00:56 Singular Exp $ */
    55/*
    66* ABSTRACT: computation with long rational numbers (Hubert Grassmann)
     
    12971297  {
    12981298    int in=mpz_mmod_ui(NULL,&n->n,(unsigned long)p);
     1299    #ifdef NV_OPS
     1300    if (npPrimeM>NV_MAX_PRIME)
     1301    return (int)((long)nvDiv((number)iz,(number)in));
     1302    #endif
    12991303    return (int)((long)npDiv((number)iz,(number)in));
    13001304  }
  • kernel/modulop.cc

    rf2c2b7 r6c15ec  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: modulop.cc,v 1.6 2006-08-11 09:47:22 Singular Exp $ */
     4/* $Id: modulop.cc,v 1.7 2006-11-21 11:00:56 Singular Exp $ */
    55/*
    66* ABSTRACT: numbers modulo p (<=32003)
     
    163163number npDiv (number a,number b)
    164164{
     165//#ifdef NV_OPS
     166//  if (npPrimeM>NV_MAX_PRIME)
     167//    return nvDiv(a,b);
     168//#endif
    165169  if ((long)a==0)
    166170    return (number)0;
    167171#ifndef HAVE_DIV_MOD
    168   else if ((long)b==0)
     172  if ((long)b==0)
    169173  {
    170174    WerrorS("div by 0");
     
    267271  if (n == 1)
    268272    *a = (number)z;
    269   else 
     273  else
    270274#ifdef NV_OPS
    271275    if (npPrimeM>NV_MAX_PRIME)
    272276      *a = nvDiv((number)z,(number)n);
    273277    else
    274 #endif   
     278#endif
    275279      *a = npDiv((number)z,(number)n);
    276280  return s;
Note: See TracChangeset for help on using the changeset viewer.