Changeset 3fc398 in git


Ignore:
Timestamp:
Sep 27, 2011, 5:09:53 PM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
Children:
e75eabc61db8b91ae3f58093334be6ae2f694691
Parents:
30a68478d0ec6f1ae5fc55c6907b025bedae4404
Message:
fix rootsur.lib: sturmha: reuires global ordering

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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/rootsur.lib

    r30a684 r3fc398  
    179179  lastsign = sign(l[1]);
    180180
    181   for (int i = 1; i <= size(l); i = i + 1) {
    182     if (sign(l[i]) != lastsign && sign(l[i]) != 0) {
     181  for (int i = 1; i <= size(l); i++)
     182  {
     183    if (sign(l[i]) != lastsign && sign(l[i]) != 0)
     184    {
    183185      numberofchanges++;
    184186      lastsign = sign(l[i]);
     
    437439  maximum = 0;
    438440
    439   for (i = 1; i <= size(monic); i = i + 1) {
     441  for (i = 1; i <= size(monic); i++)
     442  {
    440443    maximum = max(abs(leadcoef(p[i])),maximum);
    441444  }
     
    624627  int result;
    625628
    626   if (isparam(P) || isparam(a) || isparam(b)) {
    627     ERROR("This procedure cannot operate with parametric arguments");
    628   }
     629  if (isparam(P) || isparam(a) || isparam(b))
     630  { ERROR("This procedure cannot operate with parametric arguments"); }
     631  if (!attrib(basering,"global"))
     632  { ERROR("This procedure requires a global ordering"); }
    629633
    630634  variable = isuni(P);
    631635
    632   if (variable == 0) {
    633     ERROR ("P must be a univariate polynomial");
    634   }
    635 
    636   if (a >= b) {
    637     ERROR("a must be lower than b");
    638   }
     636  if (variable == 0) { ERROR ("P must be a univariate polynomial"); }
     637
     638  if (a >= b) { ERROR("a must be lower than b"); }
    639639
    640640  if (subst(P,variable,a) == 0 || subst(P,variable,b) == 0) {
     
    646646  bound = maxabs(P);
    647647
    648   if (a < -bound) {
    649     a = -bound;
    650   }
    651 
    652   if (b > bound) {
    653     b = bound;
    654   }
     648  if (a < -bound) { a = -bound; }
     649
     650  if (b > bound) { b = bound; }
    655651
    656652//  if (a == -bound && b == bound) {
     
    786782EXAMPLE:   example nrroots; shows an example"
    787783{
    788   if (isparam(p)) {
    789     ERROR("This procedure cannot operate with parametric arguments");
    790   }
     784  if (isparam(p))
     785  { ERROR("This procedure cannot operate with parametric arguments"); }
    791786
    792787  number a = maxabs(p);
     
    916911  result = 0;
    917912
    918   while (i + dir >= 0 && i + dir <= size(l) + 1 && !result) {
    919     if (l[i] == element) {
    920       result = i;
    921     }
     913  while (i + dir >= 0 && i + dir <= size(l) + 1 && !result)
     914  {
     915    if (l[i] == element) { result = i; }
    922916    i = i + dir;
    923917  }
     
    934928  result = 0;
    935929
    936   while (i + dir >= 0 && i + dir <= size(l) + 1 && !result) {
    937     if (l[i] != element) {
    938       result = i;
    939     }
     930  while (i + dir >= 0 && i + dir <= size(l) + 1 && !result)
     931  {
     932    if (l[i] != element) { result = i; }
    940933    i = i + dir;
    941934  }
Note: See TracChangeset for help on using the changeset viewer.