Changeset 2b44a1 in git for factory/canonicalform.cc


Ignore:
Timestamp:
Dec 4, 2007, 4:24:53 PM (16 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
76cee4ecf4f4ebb3a8aa88178fdda32dc26fe987
Parents:
01c4861ef358d95157809da52c75de1595678444
Message:
*hannes: format


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

Legend:

Unmodified
Added
Removed
  • factory/canonicalform.cc

    r01c486 r2b44a1  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: canonicalform.cc,v 1.40 2006-05-15 09:03:04 Singular Exp $ */
     2/* $Id: canonicalform.cc,v 1.41 2007-12-04 15:24:53 Singular Exp $ */
    33
    44#include <config.h>
     
    14371437    // check immediate cases
    14381438    int what = is_imm( g.value );
    1439     if ( is_imm( f.value ) ) {
     1439    if ( is_imm( f.value ) )
     1440    {
    14401441        ASSERT( ! what || (what == is_imm( f.value )), "incompatible operands" );
    14411442        if ( what == 0 )
    14421443            return g.value->bgcdcoeff( f.value );
    1443         else if ( what == INTMARK && ! cf_glob_switches.isOn( SW_RATIONAL ) ) {
     1444        else if ( what == INTMARK && ! cf_glob_switches.isOn( SW_RATIONAL ) )
     1445        {
    14441446            // calculate gcd using standard integer
    14451447            // arithmetic
     
    14501452            if ( gInt < 0 ) gInt = -gInt;
    14511453            // swap fInt and gInt
    1452             if ( gInt > fInt ) {
     1454            if ( gInt > fInt )
     1455            {
    14531456                int swap = gInt;
    14541457                gInt = fInt;
     
    14571460
    14581461            // now, 0 <= gInt <= fInt.  Start the loop.
    1459             while ( gInt ) {
     1462            while ( gInt )
     1463            {
    14601464                // calculate (fInt, gInt) = (gInt, fInt%gInt)
    14611465                int r = fInt % gInt;
     
    14651469
    14661470            return CanonicalForm( fInt );
    1467         } else
     1471        }
     1472        else
    14681473            // we do not go for maximal speed for these stupid
    14691474            // special cases
     
    14771482
    14781483    // check levels
    1479     if ( fLevel == gLevel ) {
     1484    if ( fLevel == gLevel )
     1485    {
    14801486        fLevel = f.value->levelcoeff();
    14811487        gLevel = g.value->levelcoeff();
Note: See TracChangeset for help on using the changeset viewer.