Changeset 16910e in git for Singular/fglm.cc


Ignore:
Timestamp:
Mar 29, 1997, 10:49:21 AM (27 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
b7808e0d5a520a6f1142871d7b0706aa1ac05721
Parents:
286bd57f141192952ea97529da8fec2abe3e1d61
Message:
* wichmann: minor bugfix in fglmProc (qring-case/update of ideal resp. result)


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

Legend:

Unmodified
Added
Removed
  • Singular/fglm.cc

    r286bd57 r16910e  
    11// emacs edit mode for this file is -*- C++ -*-
    2 // $Id: fglm.cc,v 1.7 1997-03-27 20:23:36 obachman Exp $
     2// $Id: fglm.cc,v 1.8 1997-03-29 09:49:21 Singular Exp $
    33
    44/****************************************
     
    5959    offset= IDELEMS( sourceIdeal );
    6060    for ( l= IDELEMS( currQuotient )-1; l >= 0; l-- ) {
    61         found= FALSE;
    62         for ( k= IDELEMS( sourceIdeal )-1; (k >= 0) && (found == FALSE); k-- )
    63             if ( pDivisibleBy( (sourceIdeal->m)[k], (currQuotient->m)[l] ) )
    64                 found= TRUE;
    65         if ( ! found ) {
    66             (newSource->m)[offset]= pCopy( (currQuotient->m)[l] );
    67             offset++;
     61        if ( (currQuotient->m)[l] != NULL ) {
     62            found= FALSE;
     63            for ( k= IDELEMS( sourceIdeal )-1; (k >= 0) && (found == FALSE); k-- )
     64                if ( pDivisibleBy( (sourceIdeal->m)[k], (currQuotient->m)[l] ) )
     65                    found= TRUE;
     66            if ( ! found ) {
     67                (newSource->m)[offset]= pCopy( (currQuotient->m)[l] );
     68                offset++;
     69            }
    6870        }
    6971    }
     
    8284    BOOLEAN found;
    8385    for ( k= IDELEMS( result )-1; k >=0; k-- ) {
    84         found= FALSE;
    85         for ( l= IDELEMS( currQuotient )-1; (l >= 0) && ( found == FALSE ); l-- )
    86             if ( pDivisibleBy( (currQuotient->m)[l], (result->m)[k] ) )
    87                 found= TRUE;
    88         if ( found ) pDelete( &(currQuotient->m)[l] );
     86        if ( (result->m)[k] != NULL ) {
     87            found= FALSE;
     88            for ( l= IDELEMS( currQuotient )-1; (l >= 0) && ( found == FALSE ); l-- )
     89                if ( pDivisibleBy( (currQuotient->m)[l], (result->m)[k] ) )
     90                    found= TRUE;
     91            if ( found ) pDelete( & ((result->m)[k]) );
     92        }
    8993    }
    9094    idSkipZeroes( result );
Note: See TracChangeset for help on using the changeset viewer.