Changeset 488738 in git


Ignore:
Timestamp:
Sep 7, 2000, 9:38:22 AM (24 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
69139f6fac8f4e3fb3c358dfad72ef35f3d72d46
Parents:
005a724a3fa1475cc2b7b1eedde7e946be3fbf5e
Message:
*hannes: tried to fix smIsNegQuot


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

Legend:

Unmodified
Added
Removed
  • Singular/sparsmat.cc

    r005a72 r488738  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: sparsmat.cc,v 1.31 2000-08-14 12:56:51 obachman Exp $ */
     4/* $Id: sparsmat.cc,v 1.32 2000-09-07 07:38:22 Singular Exp $ */
    55
    66/*
     
    19031903}
    19041904
     1905// orginal text:
     1906// static BOOLEAN smIsNegQuot(poly a, const poly b, const poly c)
     1907// {
     1908//   int i;
     1909//
     1910//   i=pVariables;
     1911//   while (i&&(pGetExp(b,i)<pGetExp(c,i))) i--;
     1912//   if(i)
     1913//   {
     1914//     for (i=pVariables; i; i--)
     1915//     {
     1916//       if(pGetExp(b,i)<pGetExp(c,i))
     1917//         pSetExp(a,i,pGetExp(c,i)-pGetExp(b,i));
     1918//       else
     1919//         pSetExp(a,i,0);
     1920//     }
     1921//     return TRUE;
     1922//   }
     1923//   else
     1924//   {
     1925//     for (i=pVariables; i; i--)
     1926//     {
     1927//       pSetExp(a,i,pGetExp(b,i)-pGetExp(c,i));
     1928//     }
     1929//     return FALSE;
     1930//   }
     1931// }
    19051932static BOOLEAN smIsNegQuot(poly a, const poly b, const poly c)
    19061933{
    1907   int i;
    1908 
    1909   i=pVariables;
    1910   while (i&&(pGetExp(b,i)<pGetExp(c,i))) i--;
    1911   if(i)
    1912   {
    1913     for (i=pVariables; i; i--)
    1914     {
    1915       if(pGetExp(b,i)<pGetExp(c,i))
     1934  int i=pVariables;
     1935
     1936  while ((i>0) && (pGetExp(c,i) >= pGetExp(b,i))) i--;
     1937  if(i!=0)
     1938  {
     1939    for (i=pVariables; i>0; i--)
     1940    {
     1941      if(pGetExp(c,i) > pGetExp(b,i))
    19161942        pSetExp(a,i,pGetExp(c,i)-pGetExp(b,i));
    19171943      else
     
    19221948  else
    19231949  {
    1924     for (i=pVariables; i; i--)
    1925     {
    1926       pSetExp(a,i,pGetExp(b,i)-pGetExp(c,i));
     1950    for (i=pVariables; i>0; i--)
     1951    {
     1952      int j=pGetExp(b,i)-pGetExp(c,i);
     1953      if (j<0) { Print("!"); j=0;}
     1954      pSetExp(a,i,j);
    19271955    }
    19281956    return FALSE;
Note: See TracChangeset for help on using the changeset viewer.