Changeset 3eccafa in git


Ignore:
Timestamp:
Jan 22, 1999, 6:40:57 PM (25 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
31b8436f979efbf98c360c7279f6ef542bf0c26f
Parents:
29a9d139b98d3546d9bf9d28c6bbe74f351c98a3
Message:
* hannes: minor changes to naEqual
          highcorner introduced (iparith.cc, tok.h) and documented
	  (reference.doc, general.doc)


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

Legend:

Unmodified
Added
Removed
  • Singular/extra.cc

    r29a9d13 r3eccafa  
    22*  Computer Algebra System SINGULAR      *
    33*****************************************/
    4 /* $Id: extra.cc,v 1.87 1999-01-19 13:42:30 Singular Exp $ */
     4/* $Id: extra.cc,v 1.88 1999-01-22 17:40:49 Singular Exp $ */
    55/*
    66* ABSTRACT: general interface to internals of Singular ("system" command)
     
    881881        if (slOpen(l, SI_LINK_READ)) return TRUE;
    882882      }
    883      
     883
    884884      MP_Link_pt link = (MP_Link_pt) l->data;
    885       if (MP_InitMsg(link) != MP_Success) 
     885      if (MP_InitMsg(link) != MP_Success)
    886886      {
    887887        WerrorS("Can not Init");
     
    915915    else
    916916#endif
     917/*============================================================*/
    917918      Werror( "system(\"%s\",...) %s", sys_cmd, feNotImplemented );
    918919  }
     
    920921}
    921922#endif // HAVE_EXTENDED_SYSTEM
    922 /*============================================================*/
  • Singular/iparith.cc

    r29a9d13 r3eccafa  
    168168  { "GCD",         2, GCD_CMD ,           CMD_2},
    169169  { "hilb",        0, HILBERT_CMD ,       CMD_12},
     170  { "highcorner",  0, HIGHCORNER_CMD,     CMD_1},
    170171  { "homog",       0, HOMOG_CMD ,         CMD_12},
    171172  { "ideal",       0, IDEAL_CMD ,         IDEAL_CMD},
     
    24732474  return FALSE;
    24742475}
     2476#ifdef HAVE_FACTORY
     2477static BOOLEAN jjFACSTD(leftv res, leftv v)
     2478{
     2479  res->data=(void *)kStdfac((ideal)v->Data(),NULL,testHomog,NULL);
     2480  setFlag(res,FLAG_STD);
     2481  return FALSE;
     2482}
     2483#endif
    24752484static BOOLEAN jjGETDUMP(leftv res, leftv v)
    24762485{
     
    24872496    return FALSE;
    24882497}
    2489 #ifdef HAVE_FACTORY
    2490 static BOOLEAN jjFACSTD(leftv res, leftv v)
    2491 {
    2492   res->data=(void *)kStdfac((ideal)v->Data(),NULL,testHomog,NULL);
    2493   setFlag(res,FLAG_STD);
    2494   return FALSE;
    2495 }
    2496 #endif
     2498static BOOLEAN jjHIGHCORNER(leftv res, leftv v)
     2499{
     2500  ideal I=(ideal)v->Data();
     2501  BOOLEAN *UsedAxis=(BOOLEAN *)Alloc0(pVariables*sizeof(BOOLEAN));
     2502  int i,n;
     2503  for(i=IDELEMS(I)-1;i>=0;i--)
     2504  {
     2505    if((n=pIsPurePower(I->m[i]))!=0) UsedAxis[n-1]=TRUE;
     2506  }
     2507  for(i=pVariables-1;i>=0;i--)
     2508  {
     2509    if(UsedAxis[i]==FALSE) return FALSE; // not zero-dim.
     2510  }
     2511  if (currRing->OrdSgn==1)
     2512  {
     2513    res->data=pOne();
     2514    return FALSE;
     2515  }
     2516  poly po=NULL;
     2517  scComputeHC(I,0,po);
     2518  if (po!=NULL)
     2519  {
     2520    pGetCoeff(po)=nInit(1);
     2521    for (i=pVariables; i>0; i--)
     2522    {
     2523      if (pGetExp(po, i) > 0) pDecrExp(po,i);
     2524    }
     2525    pSetm(po);
     2526  }
     2527  res->data=(void *)po;
     2528  return FALSE;
     2529}
    24972530static BOOLEAN jjHILBERT(leftv res, leftv v)
    24982531{
     
    33483381#endif
    33493382,{jjGETDUMP,    GETDUMP_CMD,     NONE,           LINK_CMD }
     3383,{jjHIGHCORNER, HIGHCORNER_CMD,  POLY_CMD,       IDEAL_CMD }
    33503384,{jjHILBERT,    HILBERT_CMD,     NONE,           IDEAL_CMD }
    33513385,{jjHILBERT,    HILBERT_CMD,     NONE,           MODUL_CMD }
  • Singular/longalg.cc

    r29a9d13 r3eccafa  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: longalg.cc,v 1.27 1999-01-21 15:00:07 Singular Exp $ */
     4/* $Id: longalg.cc,v 1.28 1999-01-22 17:40:51 Singular Exp $ */
    55/*
    66* ABSTRACT:   algebraic numbers
     
    16401640BOOLEAN naEqual (number a, number b)
    16411641{
    1642   number h;
    1643   BOOLEAN bo;
    1644   h = naSub(a, b);
    1645   bo = naIsZero(h);
     1642  if(a==b) return TRUE;
     1643  if((a==NULL)&&(b!=NULL)) return FALSE;
     1644  if((b==NULL)&&(a!=NULL)) return FALSE;
     1645
     1646  lnumber aa=(lnumber)a;
     1647  lnumber bb=(lnumber)b;
     1648
     1649  int an_deg=0;
     1650  if(aa->n!=NULL)
     1651    an_deg=napDeg(aa->n);
     1652  int bn_deg=0;
     1653  if(bb->n!=NULL)
     1654    bn_deg=napDeg(bb->n);
     1655  if(an_deg+napDeg(bb->z)!=bn_deg+napDeg(aa->z))
     1656    return FALSE;
     1657#if 0
     1658  naNormalize(a);
     1659  aa=(lnumber)a;
     1660  naNormalize(b);
     1661  bb=(lnumber)b;
     1662  if((aa->n==NULL)&&(bb->n!=NULL)) return FALSE;
     1663  if((bb->n==NULL)&&(aa->n!=NULL)) return FALSE;
     1664  if(napComp(aa->z,bb->z)!=0) return FALSE;
     1665  if((aa->n!=NULL) && (napComp(aa->n,bb->n))) return FALSE;
     1666#endif
     1667  number h = naSub(a, b);
     1668  BOOLEAN bo = naIsZero(h);
    16461669  naDelete(&h);
    16471670  return bo;
  • Singular/tok.h

    r29a9d13 r3eccafa  
    77* ABSTRACT: token for interpreter, as types; general macros
    88*/
    9 /* $Id: tok.h,v 1.21 1998-10-21 10:25:40 krueger Exp $ */
     9/* $Id: tok.h,v 1.22 1999-01-22 17:40:52 Singular Exp $ */
    1010
    1111#ifndef MYYSTYPE
     
    6868  GCD_CMD,
    6969  GETDUMP_CMD,
     70  HIGHCORNER_CMD,
    7071  INSERT_CMD,
    7172  INT_CMD,
  • Tst/Old/palg.stat

    r29a9d13 r3eccafa  
    221 >> tst_memory_1 :: nepomuck.mathematik.uni-kl.de:707254
    331 >> tst_memory_2 :: nepomuck.mathematik.uni-kl.de:675840
    4 1 >> tst_timer_1 :: nepomuck.mathematik.uni-kl.de:194
     41 >> tst_timer_1 :: nepomuck.mathematik.uni-kl.de:199
Note: See TracChangeset for help on using the changeset viewer.