Changeset b719a3 in git


Ignore:
Timestamp:
Jul 8, 1999, 3:38:44 PM (24 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
Children:
2082b6153c70d5e5b989c2d74d656bd2e080a3c7
Parents:
da408fe6b31ced4ed0febcceb258e7a27064215a
Message:
*hannes: ring fixes: real + param.


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

Legend:

Unmodified
Added
Removed
  • Singular/ring.cc

    rda408f rb719a3  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ring.cc,v 1.56 1999-07-01 16:40:42 Singular Exp $ */
     4/* $Id: ring.cc,v 1.57 1999-07-08 13:38:44 Singular Exp $ */
    55
    66/*
     
    526526
    527527  /* characteristic -----------------------------------------------*/
    528   /* input: 0 ch=0 : Q     parameter=NULL    ffChar=FALSE
     528  /* input: 0 ch=0 : Q     parameter=NULL    ffChar=FALSE   ch_flags
    529529   *         0    1 : Q(a,...)        *names         FALSE
    530    *         0   -1 : R               NULL           FALSE
    531    *         0   -1 : C               *names         FALSE
     530   *         0   -1 : R               NULL           FALSE  0
     531   *         0   -1 : R               NULL           FALSE  prec. >6
     532   *         0   -1 : C               *names         FALSE  prec. 0..?
    532533   *         p    p : Fp              NULL           FALSE
    533534   *         p   -p : Fp(a)           *names         FALSE
     
    591592    goto rInitError;
    592593  }
     594  /* post-processing of field description */
     595  // we have short reals, but no short complex
     596  if ((R->ch == - 1)
     597  && (R->parameter !=NULL)
     598  && (R->ch_flags < SHORT_REAL_LENGTH))
     599    R->ch_flags = SHORT_REAL_LENGTH;
    593600
    594601  /* names and number of variables-------------------------------------*/
     
    733740      }
    734741      PrintS("\n//   minpoly        : ");
    735       if (r->minpoly==NULL)
     742      if ( rField_is_long_C(r) )
     743      {
     744        // i^2+1:
     745        Print("(%s^2+1)\n",r->parameter[0]);
     746      }
     747      else if (r->minpoly==NULL)
    736748      {
    737749        PrintS("0\n");
  • Singular/ring.h

    rda408f rb719a3  
    77* ABSTRACT - the interpreter related ring operations
    88*/
    9 /* $Id: ring.h,v 1.28 1999-07-01 16:40:44 Singular Exp $ */
     9/* $Id: ring.h,v 1.29 1999-07-08 13:38:42 Singular Exp $ */
    1010
    1111/* includes */
    1212#include "structs.h"
    1313#include "polys-impl.h"
     14
     15#define SHORT_REAL_LENGTH 6 // use short reals for real <= 6 digits
     16
    1417
    1518#ifdef DRING
     
    6265inline BOOLEAN rField_is_R(ring r=currRing)
    6366{
    64   if (rField_is_numeric(r) && (r->ch_flags == (short)0)) return TRUE;
     67  if (rField_is_numeric(r) && (r->ch_flags <= (short)SHORT_REAL_LENGTH))
     68    return (r->parameter==NULL);
    6569  return FALSE;
    6670}
     
    7579inline BOOLEAN rField_is_long_R(ring r=currRing)
    7680{
    77   if (rField_is_numeric(r) && (r->ch_flags != (short)0))
     81  if (rField_is_numeric(r) && (r->ch_flags >(short)SHORT_REAL_LENGTH))
    7882    return (r->parameter==NULL);
    7983  return FALSE;
     
    8185inline BOOLEAN rField_is_long_C(ring r=currRing)
    8286{
    83   if (rField_is_numeric(r) && (r->ch_flags != (short)0))
     87  if (rField_is_numeric(r))
    8488    return (r->parameter!=NULL);
    8589  return FALSE;
     
    121125  rOrderType_Schreyer,     // Schreyer ordering
    122126  rOrderType_Syz2dpc,     // syzcomp2dpc
    123   rOrderType_ExpNoComp    // simple ordering, differences in component are 
     127  rOrderType_ExpNoComp    // simple ordering, differences in component are
    124128                          // not considered
    125129} rOrderType_t;
Note: See TracChangeset for help on using the changeset viewer.