Changeset 625105 in git for libfac/charset


Ignore:
Timestamp:
Jul 8, 2005, 11:18:15 AM (19 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
f3a8c2e6db3e7e4362930d7c847a62d8453daf82
Parents:
90c1ebba9b0c011ddb3f041df9b6a41d78188230
Message:
*hannes: fixed call of resultant


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

Legend:

Unmodified
Added
Removed
  • libfac/charset/alg_factor.cc

    r90c1eb r625105  
    33// emacs edit mode for this file is -*- C++ -*-
    44////////////////////////////////////////////////////////////
    5 static char * rcsid = "$Id: alg_factor.cc,v 1.13 2004-12-10 10:15:05 Singular Exp $";
     5static char * rcsid = "$Id: alg_factor.cc,v 1.14 2005-07-08 09:18:15 Singular Exp $";
    66////////////////////////////////////////////////////////////
    77// FACTORY - Includes
     
    109109static CanonicalForm
    110110resultante( const CanonicalForm & f, const CanonicalForm& g, const Variable & v ){
    111 return resultant(f,g,v);
     111  bool on_rational = isOn(SW_RATIONAL);
     112  On(SW_RATIONAL);
     113  CanonicalForm cd = bCommonDen( f );
     114  CanonicalForm fz = f * cd;
     115  cd = bCommonDen( g );
     116  CanonicalForm gz = g * cd;
     117  if (!on_rational)  Off(SW_RATIONAL);
     118
     119return resultant(fz,gz,v);
    112120
    113121  CanonicalForm h, beta, help, F, G;
     
    359367gcd0( CanonicalForm f, CanonicalForm g ){
    360368  int charac= getCharacteristic();
     369  int save=isOn(SW_RATIONAL);
    361370  setCharacteristic(0); Off(SW_RATIONAL);
    362371  CanonicalForm ff= mapinto(f), gg= mapinto(g);
    363372  CanonicalForm result= gcd(ff,gg);
    364   setCharacteristic(charac); On(SW_RATIONAL);
     373  setCharacteristic(charac);
     374  if (save) On(SW_RATIONAL);
    365375  return mapinto(result);
    366376}
     
    809819/*
    810820$Log: not supported by cvs2svn $
     821Revision 1.13  2004/12/10 10:15:05  Singular
     822*pohl: AlgExtGenerator etc.
     823
    811824Revision 1.12  2003/02/18 11:09:25  Singular
    812825* hannes: alg_gcd(f,f'=0) get a special handling
Note: See TracChangeset for help on using the changeset viewer.