Changeset 6d37e8 in git
- Timestamp:
- Apr 11, 2002, 4:51:50 PM (21 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
- Children:
- 0e8152ebb2559f1aabc537bc2bd088ef1c8c1041
- Parents:
- ca41246411e667fc0037f19eb53bf1a019285622
- Location:
- Singular/LIB
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/linalg.lib
rca41246 r6d37e8 1 1 //GMG last modified: 04/25/2000 2 2 ////////////////////////////////////////////////////////////////////////////// 3 version="$Id: linalg.lib,v 1.3 1 2002-03-26 12:41:43 mschulzeExp $";3 version="$Id: linalg.lib,v 1.32 2002-04-11 14:48:43 westenb Exp $"; 4 4 category="Linear Algebra"; 5 5 info=" … … 37 37 LIB "ring.lib"; 38 38 LIB "elim.lib"; 39 LIB "general.lib"; 39 40 ////////////////////////////////////////////////////////////////////////////// 40 41 // help functions 41 42 ////////////////////////////////////////////////////////////////////////////// 42 static proc abs(poly c)43 "RETURN: absolut value of c, c must be constants"44 {45 if(c>=0){ return(c);}46 else{ return(-c);}47 }48 49 43 static proc const_mat(matrix A) 50 44 "RETURN: 1 (0) if A is (is not) a constant matrix" … … 797 791 jp=i;pivo=0; 798 792 for(j=i+1;j<=n;j=j+1){ 799 c=abs (A[j,i+k]);793 c=absValue(A[j,i+k]); 800 794 if(pivo<c){ pivo=c;jp=j;} 801 795 } … … 884 878 885 879 //Pivotisierung 886 pivo=abs (A[i,i+k]);jp=i;880 pivo=absValue(A[i,i+k]);jp=i; 887 881 for(j=i+1;j<=n;j=j+1){ 888 c=abs (A[j,i+k]);882 c=absValue(A[j,i+k]); 889 883 if(pivo<c){ pivo=c;jp=j;} 890 884 } -
Singular/LIB/ntsolve.lib
rca41246 r6d37e8 1 1 //(GMG, last modified 16.12.00) 2 2 /////////////////////////////////////////////////////////////////////////////// 3 version="$Id: ntsolve.lib,v 1.1 3 2001-08-27 14:47:56 SingularExp $";3 version="$Id: ntsolve.lib,v 1.14 2002-04-11 14:51:50 westenb Exp $"; 4 4 category="Symbolic-numerical solving"; 5 5 info=" … … 13 13 "; 14 14 15 LIB "general.lib"; 15 16 /////////////////////////////////////////////////////////////////////////////// 16 17 … … 328 329 for (i = 1; i <= n; i++) 329 330 { 330 if ( abs (h[i]) > (1/10)^err)331 if ( absValue(h[i]) > (1/10)^err) 331 332 { 332 333 fertig = 0; … … 338 339 if (prot > 0) 339 340 { 340 "// error:"; print(abs (h[i]));341 "// error:"; print(absValue(h[i])); 341 342 "// iterations to be performed: "+string(itb); 342 343 } … … 363 364 } 364 365 /////////////////////////////////////////////////////////////////////////////// 365 366 static proc abs( number r)367 {368 if (r >= 0)369 {370 return(r);371 }372 else373 {374 return(-r);375 }376 }377 ///////////////////////////////////////////////////////////////////////////////378
Note: See TracChangeset
for help on using the changeset viewer.