Changeset aad4ca4 in git
- Timestamp:
- Dec 6, 2017, 7:05:25 PM (5 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 06b3e84d21e073249ada6d3b863bb3b8ce91d3be
- Parents:
- 3803c6a39fad57f9a8e12942b2928c215504e027
- Files:
-
- 40 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/extra.cc
r3803c6 raad4ca4 2476 2476 p_DebugPrint((poly)h->Data(), currRing); 2477 2477 # else 2478 Warn ("Sorry: not available for release build!");2478 WarnS("Sorry: not available for release build!"); 2479 2479 # endif 2480 2480 return FALSE; … … 2499 2499 rDebugPrint((ring)h->Data()); 2500 2500 # else 2501 Warn ("Sorry: not available for release build!");2501 WarnS("Sorry: not available for release build!"); 2502 2502 # endif 2503 2503 return FALSE; … … 2671 2671 if (h->next->Typ()!=POLY_CMD) 2672 2672 { 2673 Warn ("Wrong types for poly= comb(ideal,poly)");2673 WarnS("Wrong types for poly= comb(ideal,poly)"); 2674 2674 } 2675 2675 } … … 2692 2692 if (h->next->Typ()!=POLY_CMD) 2693 2693 { 2694 Warn ("Wrong types for poly= comb(ideal,poly)");2694 WarnS("Wrong types for poly= comb(ideal,poly)"); 2695 2695 } 2696 2696 } -
Singular/fehelp.cc
r3803c6 raad4ca4 173 173 else 174 174 Warn("No help for topic '%s'", str); 175 Warn ("Try one of");175 WarnS("Try one of"); 176 176 char *matches=StringEndS(); 177 177 PrintS(matches); … … 798 798 // Warn("Using URL '%s'.", feResource('u', 0)); 799 799 //} 800 Warn ("Use 'system(\"--browser\", <browser>);' to change browser,");800 WarnS("Use 'system(\"--browser\", <browser>);' to change browser,"); 801 801 StringSetS("where <browser> can be: "); 802 802 int i = 0; … … 1039 1039 Warn("C-h C-s %s", 1040 1040 (hentry != NULL && *(hentry->node) != '\0' ? hentry->node : "Top")); 1041 Warn ("to enter the Singular online help. For general");1042 Warn ("information on Singular running under Emacs, type C-h m.");1041 WarnS("to enter the Singular online help. For general"); 1042 WarnS("information on Singular running under Emacs, type C-h m."); 1043 1043 } 1044 1044 static int singular_manual(char *str, BOOLEAN isIndexEntry); -
Singular/ipassign.cc
r3803c6 raad4ca4 1633 1633 if (r!=NULL) 1634 1634 { 1635 Warn ("list length mismatch in assign (l>r)");1635 WarnS("list length mismatch in assign (l>r)"); 1636 1636 nok=TRUE; 1637 1637 } … … 1640 1640 else if (r==NULL) 1641 1641 { 1642 Warn ("list length mismatch in assign (l<r)");1642 WarnS("list length mismatch in assign (l<r)"); 1643 1643 nok=TRUE; 1644 1644 break; -
Singular/iplib.cc
r3803c6 raad4ca4 597 597 static void iiCallLibProcEnd(idhdl save_ringhdl, ring save_ring) 598 598 { 599 if ((currRing!=NULL) 599 if ((currRing!=NULL) 600 600 &&(currRing!=save_ring)) 601 601 { … … 962 962 { 963 963 Warn( "library %s has old format. This format is still accepted,", newlib); 964 Warn ( "but for functionality you may wish to change to the new");965 Warn ( "format. Please refer to the manual for further information.");964 WarnS( "but for functionality you may wish to change to the new"); 965 WarnS( "format. Please refer to the manual for further information."); 966 966 } 967 967 reinit_yylp(); -
Singular/ipshell.cc
r3803c6 raad4ca4 527 527 if (Sy_bit(ii) & kOptions) 528 528 { 529 Warn ("Gerhard, use the option command");529 WarnS("Gerhard, use the option command"); 530 530 si_opt_1 |= Sy_bit(ii); 531 531 } -
Singular/lists.cc
r3803c6 raad4ca4 276 276 { 277 277 // should not happen: 278 Warn ("internal NULL in resolvente");278 WarnS("internal NULL in resolvente"); 279 279 L->m[i].data=(void *)idInit(1,1); 280 280 } -
Singular/misc_ip.cc
r3803c6 raad4ca4 664 664 } 665 665 else 666 Warn ("cannot set option");666 WarnS("cannot set option"); 667 667 #if 0 668 668 if (TEST_OPT_INTSTRATEGY && (currRing!=NULL) … … 683 683 } 684 684 else 685 Warn ("cannot clear option");685 WarnS("cannot clear option"); 686 686 goto okay; 687 687 } -
Singular/scanner.ll
r3803c6 raad4ca4 120 120 121 121 %% 122 \/\/[^\n]* 123 ^[ \r\t\n]*#![^\n]* 122 \/\/[^\n]* 123 ^[ \r\t\n]*#![^\n]* 124 124 "/*" { 125 125 yy_noeof=noeof_comment; -
Singular/svd/bdsvd.h
r3803c6 raad4ca4 346 346 return result; 347 347 } 348 348 349 349 // 350 350 // init … … 363 363 rightside = true; 364 364 fwddir = true; 365 365 366 366 // 367 367 // resize E from N-1 to N … … 379 379 e(n) = 0; 380 380 idir = 0; 381 381 382 382 // 383 383 // Get machine constants … … 385 385 eps = amp::ampf<Precision>::getAlgoPascalEpsilon(); 386 386 unfl = amp::ampf<Precision>::getAlgoPascalMinNumber(); 387 387 388 388 // 389 389 // If matrix lower bidiagonal, rotate to be upper bidiagonal … … 401 401 work1(i) = sn; 402 402 } 403 403 404 404 // 405 405 // Update singular vectors if desired … … 414 414 } 415 415 } 416 416 417 417 // 418 418 // Compute singular values to relative accuracy TOL … … 426 426 tol = -tol; 427 427 } 428 428 429 429 // 430 430 // Compute approximate maximum, minimum singular values … … 442 442 if( tol>=0 ) 443 443 { 444 444 445 445 // 446 446 // Relative accuracy desired … … 465 465 else 466 466 { 467 467 468 468 // 469 469 // Absolute accuracy desired … … 471 471 thresh = amp::maximum<Precision>(amp::abs<Precision>(tol)*smax, maxitr*n*n*unfl); 472 472 } 473 473 474 474 // 475 475 // Prepare for main iteration loop for the singular values … … 481 481 oldll = -1; 482 482 oldm = -1; 483 483 484 484 // 485 485 // M points to last element of unconverged part of matrix 486 486 // 487 487 m = n; 488 488 489 489 // 490 490 // Begin main iteration loop … … 492 492 while( true ) 493 493 { 494 494 495 495 // 496 496 // Check for convergence or exceeding iteration count … … 505 505 return result; 506 506 } 507 507 508 508 // 509 509 // Find diagonal block of matrix to work on … … 539 539 else 540 540 { 541 541 542 542 // 543 543 // Matrix splits since E(LL) = 0 … … 546 546 if( ll==m-1 ) 547 547 { 548 548 549 549 // 550 550 // Convergence of bottom singular value, return to top of loop … … 555 555 } 556 556 ll = ll+1; 557 557 558 558 // 559 559 // E(LL) through E(M-1) are nonzero, E(LL-1) is zero … … 561 561 if( ll==m-1 ) 562 562 { 563 563 564 564 // 565 565 // 2 by 2 block, handle separately … … 569 569 e(m-1) = 0; 570 570 d(m) = sigmn; 571 571 572 572 // 573 573 // Compute singular vectors, if desired … … 606 606 continue; 607 607 } 608 608 609 609 // 610 610 // If working on new submatrix, choose shift direction … … 629 629 if( amp::abs<Precision>(d(ll))>=amp::abs<Precision>(d(m)) ) 630 630 { 631 631 632 632 // 633 633 // Chase bulge from top (big end) to bottom (small end) … … 637 637 else 638 638 { 639 639 640 640 // 641 641 // Chase bulge from bottom (big end) to top (small end) … … 644 644 } 645 645 } 646 646 647 647 // 648 648 // Apply convergence tests … … 650 650 if( idir==1 ) 651 651 { 652 652 653 653 // 654 654 // Run convergence test in forward direction … … 662 662 if( tol>=0 ) 663 663 { 664 664 665 665 // 666 666 // If relative accuracy desired, … … 690 690 else 691 691 { 692 692 693 693 // 694 694 // Run convergence test in backward direction … … 702 702 if( tol>=0 ) 703 703 { 704 704 705 705 // 706 706 // If relative accuracy desired, … … 730 730 oldll = ll; 731 731 oldm = m; 732 732 733 733 // 734 734 // Compute shift. First, test if shifting would ruin relative … … 737 737 if( tol>=0 && n*tol*(sminl/smax)<=amp::maximum<Precision>(eps, amp::ampf<Precision>("0.01")*tol) ) 738 738 { 739 739 740 740 // 741 741 // Use a zero shift to avoid loss of relative accuracy … … 745 745 else 746 746 { 747 747 748 748 // 749 749 // Compute the shift from 2-by-2 block at end of matrix … … 759 759 svd2x2<Precision>(d(ll), e(ll), d(ll+1), shift, r); 760 760 } 761 761 762 762 // 763 763 // Test if shift negligible, and if so set to zero … … 771 771 } 772 772 } 773 773 774 774 // 775 775 // Increment iteration count 776 776 // 777 777 iter = iter+m-ll; 778 778 779 779 // 780 780 // If SHIFT = 0, do simplified QR iteration … … 784 784 if( idir==1 ) 785 785 { 786 786 787 787 // 788 788 // Chase bulge from top to bottom … … 808 808 d(m) = h*oldcs; 809 809 e(m-1) = h*oldsn; 810 810 811 811 // 812 812 // Update singular vectors … … 824 824 rotations::applyrotationsfromtheleft<Precision>(fwddir, ll+cstart-1, m+cstart-1, cstart, cend, work2, work3, c, ctemp); 825 825 } 826 826 827 827 // 828 828 // Test convergence … … 835 835 else 836 836 { 837 837 838 838 // 839 839 // Chase bulge from bottom to top … … 859 859 d(ll) = h*oldcs; 860 860 e(ll) = h*oldsn; 861 861 862 862 // 863 863 // Update singular vectors … … 875 875 rotations::applyrotationsfromtheleft<Precision>(!fwddir, ll+cstart-1, m+cstart-1, cstart, cend, work0, work1, c, ctemp); 876 876 } 877 877 878 878 // 879 879 // Test convergence … … 887 887 else 888 888 { 889 889 890 890 // 891 891 // Use nonzero shift … … 893 893 if( idir==1 ) 894 894 { 895 895 896 896 // 897 897 // Chase bulge from top to bottom … … 926 926 } 927 927 e(m-1) = f; 928 928 929 929 // 930 930 // Update singular vectors … … 942 942 rotations::applyrotationsfromtheleft<Precision>(fwddir, ll+cstart-1, m+cstart-1, cstart, cend, work2, work3, c, ctemp); 943 943 } 944 944 945 945 // 946 946 // Test convergence … … 953 953 else 954 954 { 955 955 956 956 // 957 957 // Chase bulge from bottom to top … … 986 986 } 987 987 e(ll) = f; 988 988 989 989 // 990 990 // Test convergence … … 994 994 e(ll) = 0; 995 995 } 996 996 997 997 // 998 998 // Update singular vectors if desired … … 1012 1012 } 1013 1013 } 1014 1014 1015 1015 // 1016 1016 // QR iteration finished, go back and check convergence … … 1018 1018 continue; 1019 1019 } 1020 1020 1021 1021 // 1022 1022 // All singular values converged, so make them positive … … 1027 1027 { 1028 1028 d(i) = -d(i); 1029 1029 1030 1030 // 1031 1031 // Change sign of singular vectors, if desired … … 1037 1037 } 1038 1038 } 1039 1039 1040 1040 // 1041 1041 // Sort the singular values into decreasing order (insertion sort on … … 1044 1044 for(i=1; i<=n-1; i++) 1045 1045 { 1046 1046 1047 1047 // 1048 1048 // Scan for smallest D(I) … … 1060 1060 if( isub!=n+1-i ) 1061 1061 { 1062 1062 1063 1063 // 1064 1064 // Swap singular values and vectors … … 1163 1163 if( au==0 ) 1164 1164 { 1165 1165 1166 1166 // 1167 1167 // Avoid possible harmful underflow if exponent range … … 1228 1228 ht = h; 1229 1229 ha = amp::abs<Precision>(h); 1230 1230 1231 1231 // 1232 1232 // PMAX points to the maximum absolute element of matrix … … 1239 1239 if( swp ) 1240 1240 { 1241 1241 1242 1242 // 1243 1243 // Now FA .ge. HA … … 1255 1255 if( ga==0 ) 1256 1256 { 1257 1257 1258 1258 // 1259 1259 // Diagonal matrix … … 1274 1274 if( fa/ga<amp::ampf<Precision>::getAlgoPascalEpsilon() ) 1275 1275 { 1276 1276 1277 1277 // 1278 1278 // Case of very large GA … … 1298 1298 if( gasmal ) 1299 1299 { 1300 1300 1301 1301 // 1302 1302 // Normal case … … 1329 1329 if( mm==0 ) 1330 1330 { 1331 1331 1332 1332 // 1333 1333 // Note that M is very tiny … … 1368 1368 snr = srt; 1369 1369 } 1370 1370 1371 1371 // 1372 1372 // Correct signs of SSMAX and SSMIN -
Singular/svd/bidiagonal.h
r3803c6 raad4ca4 207 207 208 208 209 209 210 210 // 211 211 // Prepare … … 231 231 if( m>=n ) 232 232 { 233 233 234 234 // 235 235 // Reduce to upper bidiagonal form … … 237 237 for(i=0; i<=n-1; i++) 238 238 { 239 239 240 240 // 241 241 // Generate elementary reflector H(i) to annihilate A(i+1:m-1,i) … … 246 246 ap::vmove(a.getcolumn(i, i, m-1), t.getvector(1, m-i)); 247 247 t(1) = 1; 248 248 249 249 // 250 250 // Apply H(i) to A(i:m-1,i+1:n-1) from the left … … 253 253 if( i<n-1 ) 254 254 { 255 255 256 256 // 257 257 // Generate elementary reflector G(i) to annihilate … … 263 263 ap::vmove(a.getrow(i, i+1, n-1), t.getvector(1, n-1-i)); 264 264 t(1) = 1; 265 265 266 266 // 267 267 // Apply G(i) to A(i+1:m-1,i+1:n-1) from the right … … 277 277 else 278 278 { 279 279 280 280 // 281 281 // Reduce to lower bidiagonal form … … 283 283 for(i=0; i<=m-1; i++) 284 284 { 285 285 286 286 // 287 287 // Generate elementary reflector G(i) to annihilate A(i,i+1:n-1) … … 292 292 ap::vmove(a.getrow(i, i, n-1), t.getvector(1, n-i)); 293 293 t(1) = 1; 294 294 295 295 // 296 296 // Apply G(i) to A(i+1:m-1,i:n-1) from the right … … 299 299 if( i<m-1 ) 300 300 { 301 301 302 302 // 303 303 // Generate elementary reflector H(i) to annihilate … … 309 309 ap::vmove(a.getcolumn(i, i+1, m-1), t.getvector(1, m-1-i)); 310 310 t(1) = 1; 311 311 312 312 // 313 313 // Apply H(i) to A(i+1:m-1,i+1:n-1) from the left … … 363 363 return; 364 364 } 365 365 366 366 // 367 367 // prepare Q … … 382 382 } 383 383 } 384 384 385 385 // 386 386 // Calculate … … 444 444 } 445 445 ap::ap_error::make_assertion(fromtheright && zcolumns==m || !fromtheright && zrows==m); 446 446 447 447 // 448 448 // init … … 455 455 if( m>=n ) 456 456 { 457 457 458 458 // 459 459 // setup … … 478 478 istep = -istep; 479 479 } 480 480 481 481 // 482 482 // Process … … 501 501 else 502 502 { 503 503 504 504 // 505 505 // setup … … 524 524 istep = -istep; 525 525 } 526 526 527 527 // 528 528 // Process … … 590 590 return; 591 591 } 592 592 593 593 // 594 594 // prepare PT … … 609 609 } 610 610 } 611 611 612 612 // 613 613 // Calculate … … 671 671 } 672 672 ap::ap_error::make_assertion(fromtheright && zcolumns==n || !fromtheright && zrows==n); 673 673 674 674 // 675 675 // init … … 684 684 if( m>=n ) 685 685 { 686 686 687 687 // 688 688 // setup … … 707 707 istep = -istep; 708 708 } 709 709 710 710 // 711 711 // Process … … 733 733 else 734 734 { 735 735 736 736 // 737 737 // setup … … 756 756 istep = -istep; 757 757 } 758 758 759 759 // 760 760 // Process … … 875 875 if( m>=n ) 876 876 { 877 877 878 878 // 879 879 // Reduce to upper bidiagonal form … … 881 881 for(i=1; i<=n; i++) 882 882 { 883 883 884 884 // 885 885 // Generate elementary reflector H(i) to annihilate A(i+1:m,i) … … 891 891 ap::vmove(a.getcolumn(i, i, m), t.getvector(1, mmip1)); 892 892 t(1) = 1; 893 893 894 894 // 895 895 // Apply H(i) to A(i:m,i+1:n) from the left … … 898 898 if( i<n ) 899 899 { 900 900 901 901 // 902 902 // Generate elementary reflector G(i) to annihilate … … 910 910 ap::vmove(a.getrow(i, ip1, n), t.getvector(1, nmi)); 911 911 t(1) = 1; 912 912 913 913 // 914 914 // Apply G(i) to A(i+1:m,i+1:n) from the right … … 924 924 else 925 925 { 926 926 927 927 // 928 928 // Reduce to lower bidiagonal form … … 930 930 for(i=1; i<=m; i++) 931 931 { 932 932 933 933 // 934 934 // Generate elementary reflector G(i) to annihilate A(i,i+1:n) … … 940 940 ap::vmove(a.getrow(i, i, n), t.getvector(1, nmip1)); 941 941 t(1) = 1; 942 942 943 943 // 944 944 // Apply G(i) to A(i+1:m,i:n) from the right … … 947 947 if( i<m ) 948 948 { 949 949 950 950 // 951 951 // Generate elementary reflector H(i) to annihilate … … 959 959 ap::vmove(a.getcolumn(i, ip1, m), t.getvector(1, mmi)); 960 960 t(1) = 1; 961 961 962 962 // 963 963 // Apply H(i) to A(i+1:m,i+1:n) from the left … … 999 999 return; 1000 1000 } 1001 1001 1002 1002 // 1003 1003 // init … … 1006 1006 v.setbounds(1, m); 1007 1007 work.setbounds(1, qcolumns); 1008 1008 1009 1009 // 1010 1010 // prepare Q … … 1079 1079 } 1080 1080 ap::ap_error::make_assertion(fromtheright && zcolumns==m || !fromtheright && zrows==m); 1081 1081 1082 1082 // 1083 1083 // init … … 1090 1090 if( m>=n ) 1091 1091 { 1092 1092 1093 1093 // 1094 1094 // setup … … 1113 1113 istep = -istep; 1114 1114 } 1115 1115 1116 1116 // 1117 1117 // Process … … 1137 1137 else 1138 1138 { 1139 1139 1140 1140 // 1141 1141 // setup … … 1160 1160 istep = -istep; 1161 1161 } 1162 1162 1163 1163 // 1164 1164 // Process … … 1214 1214 return; 1215 1215 } 1216 1216 1217 1217 // 1218 1218 // init … … 1221 1221 v.setbounds(1, n); 1222 1222 work.setbounds(1, ptrows); 1223 1223 1224 1224 // 1225 1225 // prepare PT … … 1294 1294 } 1295 1295 ap::ap_error::make_assertion(fromtheright && zcolumns==n || !fromtheright && zrows==n); 1296 1296 1297 1297 // 1298 1298 // init … … 1307 1307 if( m>=n ) 1308 1308 { 1309 1309 1310 1310 // 1311 1311 // setup … … 1330 1330 istep = -istep; 1331 1331 } 1332 1332 1333 1333 // 1334 1334 // Process … … 1358 1358 else 1359 1359 { 1360 1360 1361 1361 // 1362 1362 // setup … … 1381 1381 istep = -istep; 1382 1382 } 1383 1383 1384 1384 // 1385 1385 // Process -
Singular/svd/blas.h
r3803c6 raad4ca4 400 400 if( !trans ) 401 401 { 402 402 403 403 // 404 404 // y := alpha*A*x + beta*y; … … 410 410 ap::ap_error::make_assertion(j2-j1==ix2-ix1); 411 411 ap::ap_error::make_assertion(i2-i1==iy2-iy1); 412 412 413 413 // 414 414 // beta*y … … 425 425 ap::vmul(y.getvector(iy1, iy2), beta); 426 426 } 427 427 428 428 // 429 429 // alpha*A*x … … 437 437 else 438 438 { 439 439 440 440 // 441 441 // y := alpha*A'*x + beta*y; … … 447 447 ap::ap_error::make_assertion(i2-i1==ix2-ix1); 448 448 ap::ap_error::make_assertion(j2-j1==iy2-iy1); 449 449 450 450 // 451 451 // beta*y … … 462 462 ap::vmul(y.getvector(iy1, iy2), beta); 463 463 } 464 464 465 465 // 466 466 // alpha*A'*x … … 538 538 539 539 540 540 541 541 // 542 542 // Setup … … 569 569 crows = arows; 570 570 ccols = bcols; 571 571 572 572 // 573 573 // Test WORK … … 578 578 work(1) = 0; 579 579 work(i) = 0; 580 580 581 581 // 582 582 // Prepare C … … 599 599 } 600 600 } 601 601 602 602 // 603 603 // A*B … … 616 616 return; 617 617 } 618 618 619 619 // 620 620 // A*B' … … 647 647 } 648 648 } 649 649 650 650 // 651 651 // A'*B … … 664 664 return; 665 665 } 666 666 667 667 // 668 668 // A'*B' -
Singular/svd/libs/amp.cpp
r3803c6 raad4ca4 20 20 lst = rec; 21 21 } 22 22 23 23 amp::mpfr_record *p = lst; 24 24 p->refCount = 1; … … 111 111 free(); 112 112 } 113 113 114 114 void amp::mpfr_reference::initialize(int Precision) 115 115 { … … 130 130 ref = NULL; 131 131 } 132 132 133 133 mpfr_srcptr amp::mpfr_reference::getReadPtr() const 134 134 { … … 149 149 amp::mpfr_record *newref = amp::mpfr_storage::newMpfr(ref->Precision); 150 150 mpfr_set(newref->value, ref->value, GMP_RNDN); 151 151 152 152 free(); 153 153 ref = newref; -
Singular/svd/libs/amp.english.html
r3803c6 raad4ca4 128 128 ~ampf(); 129 129 130 ampf (); 130 ampf (); 131 131 ampf (<b>long double</b> v); 132 132 ampf (<b>double</b> v); … … 142 142 ampf (<b>const</b> std::string &s); 143 143 ampf (<b>const char</b> *s); 144 144 145 145 ampf(<b>const</b> ampf& r); 146 146 <b>template</b><<b>unsigned int</b> Precision2> … … 163 163 <b>template</b><<b>unsigned int</b> Precision2> 164 164 ampf& <b>operator</b>= (<b>const</b> ampf<Precision2>& r); 165 165 166 166 <b>template</b><<b>class</b> T> 167 167 ampf& <b>operator</b>+=(<b>const</b> T& v); … … 172 172 <b>template</b><class T> 173 173 ampf& <b>operator</b>/=(<b>const</b> T& v); 174 174 175 175 mpfr_srcptr getReadPtr() <b>const</b>; 176 176 mpfr_ptr getWritePtr(); 177 177 178 178 <b>bool</b> isFiniteNumber() <b>const</b>; 179 179 <b>bool</b> isPositiveNumber() <b>const</b>; … … 185 185 std::string toHex() <b>const</b>; 186 186 std::string toDec() <b>const</b>; 187 187 188 188 <b>static const</b> ampf getUlpOf(<b>const</b> ampf &x); 189 189 <b>static const</b> ampf getUlp(); … … 499 499 Calculates the arc tangent of y/x. It produces correct results even when the resulting angle is near pi/2 or -pi/2 (x near 0). 500 500 </p> 501 501 502 502 <p> 503 503 <span class=func> -
Singular/svd/libs/amp.h
r3803c6 raad4ca4 19 19 namespace amp 20 20 { 21 class exception {}; 21 class exception {}; 22 22 class incorrectPrecision : public exception {}; 23 23 class overflow : public exception {}; … … 28 28 class internalError : public exception {}; 29 29 class domainError : public exception {}; 30 30 31 31 typedef unsigned long unsigned32; 32 32 typedef signed long signed32; 33 33 34 34 struct mpfr_record 35 35 { … … 39 39 mpfr_record *next; 40 40 }; 41 41 42 42 typedef mpfr_record* mpfr_record_ptr; 43 43 44 44 // 45 45 // storage for mpfr_t instances … … 47 47 class mpfr_storage 48 48 { 49 public: 49 public: 50 50 static mpfr_record* newMpfr(unsigned int Precision); 51 51 static void deleteMpfr(mpfr_record* ref); … … 55 55 static mpfr_record_ptr& getList(unsigned int Precision); 56 56 }; 57 57 58 58 // 59 59 // mpfr_t reference … … 66 66 mpfr_reference& operator= (const mpfr_reference &r); 67 67 ~mpfr_reference(); 68 68 69 69 void initialize(int Precision); 70 70 void free(); 71 71 72 72 mpfr_srcptr getReadPtr() const; 73 73 mpfr_ptr getWritePtr(); … … 75 75 mpfr_record *ref; 76 76 }; 77 77 78 78 // 79 79 // ampf template … … 92 92 mpfr_storage::deleteMpfr(rval); 93 93 } 94 94 95 95 // 96 96 // Initializing … … 98 98 ampf () { InitializeAsZero(); } 99 99 ampf(mpfr_record *v) { rval = v; } 100 100 101 101 ampf (long double v) { InitializeAsDouble(v); } 102 102 ampf (double v) { InitializeAsDouble(v); } … … 110 110 ampf (signed char v) { InitializeAsSLong(v); } 111 111 ampf (unsigned char v) { InitializeAsULong(v); } 112 112 113 113 // 114 114 // initializing from string … … 117 117 ampf (const std::string &s) { InitializeAsString(s.c_str()); } 118 118 ampf (const char *s) { InitializeAsString(s); } 119 119 120 120 // 121 121 // copy constructors … … 177 177 } 178 178 #endif 179 179 180 180 // 181 181 // in-place operators … … 186 186 template<class T> ampf& operator*=(const T& v){ *this = *this * v; return *this; }; 187 187 template<class T> ampf& operator/=(const T& v){ *this = *this / v; return *this; }; 188 188 189 189 // 190 190 // MPFR access … … 192 192 mpfr_srcptr getReadPtr() const; 193 193 mpfr_ptr getWritePtr(); 194 194 195 195 // 196 196 // properties and information … … 209 209 std::string toDec() const; 210 210 char * toString() const; 211 212 211 212 213 213 // 214 214 // static methods 215 // 215 // 216 216 static const ampf getUlpOf(const ampf &x); 217 217 static const ampf getUlp(); … … 231 231 void InitializeAsDouble(long double v); 232 232 void InitializeAsString(const char *s); 233 233 234 234 //mpfr_reference ref; 235 235 mpfr_record *rval; … … 264 264 mpfr_set_si(getWritePtr(), sv, GMP_RNDN); 265 265 } 266 266 267 267 template<unsigned int Precision> 268 268 void ampf<Precision>::InitializeAsULong(unsigned long v) … … 272 272 mpfr_set_ui(getWritePtr(), v, GMP_RNDN); 273 273 } 274 274 275 275 template<unsigned int Precision> 276 276 void ampf<Precision>::InitializeAsDouble(long double v) … … 287 287 rval = mpfr_storage::newMpfr(Precision); 288 288 mpfr_strtofr(getWritePtr(), s, NULL, 0, GMP_RNDN); 289 } 289 } 290 290 291 291 template<unsigned int Precision> 292 292 mpfr_srcptr ampf<Precision>::getReadPtr() const 293 293 { 294 // TODO: ïîäóìàòü, íóæíî ëè ñäåëàòü, ÷òîáû è ïðè getRead, è ïðè 294 // TODO: ïîäóìàòü, íóæíî ëè ñäåëàòü, ÷òîáû è ïðè getRead, è ïðè 295 295 // getWrite ñîçäàâàëàñü íîâàÿ instance mpfr_t. 296 296 // ýòî ìîæåò áûòü íóæíî äëÿ êîððåêòíîé îáðàáîòêè ñèòóàöèé âèäà … … 299 299 return rval->value; 300 300 } 301 301 302 302 template<unsigned int Precision> 303 303 mpfr_ptr ampf<Precision>::getWritePtr() … … 311 311 return rval->value; 312 312 } 313 313 314 314 template<unsigned int Precision> 315 315 bool ampf<Precision>::isFiniteNumber() const … … 325 325 return mpfr_sgn(getReadPtr())>0; 326 326 } 327 327 328 328 template<unsigned int Precision> 329 329 bool ampf<Precision>::isZero() const … … 331 331 return mpfr_zero_p(getReadPtr())!=0; 332 332 } 333 333 334 334 template<unsigned int Precision> 335 335 bool ampf<Precision>::isNegativeNumber() const … … 345 345 return getUlpOf(*this); 346 346 } 347 347 348 348 template<unsigned int Precision> 349 349 double ampf<Precision>::toDouble() const … … 351 351 return mpfr_get_d(getReadPtr(), GMP_RNDN); 352 352 } 353 353 354 354 template<unsigned int Precision> 355 355 std::string ampf<Precision>::toHex() const … … 368 368 return r; 369 369 } 370 370 371 371 // 372 372 // general case … … 396 396 return r; 397 397 } 398 398 399 399 template<unsigned int Precision> 400 400 std::string ampf<Precision>::toDec() const 401 401 { 402 402 // TODO: advanced output formatting (zero, integers) 403 403 404 404 // 405 405 // some special cases … … 415 415 return r; 416 416 } 417 417 418 418 // 419 419 // general case … … 459 459 return toString_Block; 460 460 } 461 461 462 462 // 463 463 // general case … … 508 508 return r; 509 509 } 510 510 511 511 template<unsigned int Precision> 512 512 const ampf<Precision> ampf<Precision>::getUlp() … … 517 517 return r; 518 518 } 519 519 520 520 template<unsigned int Precision> 521 521 const ampf<Precision> ampf<Precision>::getUlp256() … … 531 531 return r; 532 532 } 533 533 534 534 template<unsigned int Precision> 535 535 const ampf<Precision> ampf<Precision>::getUlp512() … … 544 544 GMP_RNDN); 545 545 return r; 546 } 546 } 547 547 548 548 template<unsigned int Precision> … … 554 554 return r; 555 555 } 556 556 557 557 template<unsigned int Precision> 558 558 const ampf<Precision> ampf<Precision>::getMinNumber() … … 568 568 return getUlp256(); 569 569 } 570 570 571 571 template<unsigned int Precision> 572 572 const ampf<Precision> ampf<Precision>::getAlgoPascalMaxNumber() … … 579 579 return r; 580 580 } 581 581 582 582 template<unsigned int Precision> 583 583 const ampf<Precision> ampf<Precision>::getAlgoPascalMinNumber() … … 598 598 return r; 599 599 } 600 600 601 601 // 602 602 // comparison operators … … 613 613 return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())!=0; 614 614 } 615 615 616 616 template<unsigned int Precision> 617 617 const bool operator<(const ampf<Precision>& op1, const ampf<Precision>& op2) … … 619 619 return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())<0; 620 620 } 621 621 622 622 template<unsigned int Precision> 623 623 const bool operator>(const ampf<Precision>& op1, const ampf<Precision>& op2) … … 625 625 return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())>0; 626 626 } 627 627 628 628 template<unsigned int Precision> 629 629 const bool operator<=(const ampf<Precision>& op1, const ampf<Precision>& op2) … … 631 631 return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())<=0; 632 632 } 633 633 634 634 template<unsigned int Precision> 635 635 const bool operator>=(const ampf<Precision>& op1, const ampf<Precision>& op2) … … 637 637 return mpfr_cmp(op1.getReadPtr(), op2.getReadPtr())>=0; 638 638 } 639 639 640 640 // 641 641 // arithmetic operators … … 646 646 return op1; 647 647 } 648 648 649 649 template<unsigned int Precision> 650 650 const ampf<Precision> operator-(const ampf<Precision>& op1) … … 654 654 return v; 655 655 } 656 656 657 657 template<unsigned int Precision> 658 658 const ampf<Precision> operator+(const ampf<Precision>& op1, const ampf<Precision>& op2) … … 662 662 return v; 663 663 } 664 664 665 665 template<unsigned int Precision> 666 666 const ampf<Precision> operator-(const ampf<Precision>& op1, const ampf<Precision>& op2) … … 670 670 return v; 671 671 } 672 673 672 673 674 674 template<unsigned int Precision> 675 675 const ampf<Precision> operator*(const ampf<Precision>& op1, const ampf<Precision>& op2) … … 679 679 return v; 680 680 } 681 681 682 682 template<unsigned int Precision> 683 683 const ampf<Precision> operator/(const ampf<Precision>& op1, const ampf<Precision>& op2) … … 687 687 return v; 688 688 } 689 689 690 690 // 691 691 // basic functions … … 843 843 return r; 844 844 } 845 845 846 846 // 847 847 // different types of arguments … … 918 918 __AMP_BINARY_OPF(long double) 919 919 #undef __AMP_BINARY_OPF 920 920 921 921 // 922 922 // transcendent functions … … 1003 1003 return v; 1004 1004 } 1005 1005 1006 1006 template<unsigned int Precision> 1007 1007 const ampf<Precision> log(const ampf<Precision> &x) … … 1077 1077 campf():x(0),y(0){}; 1078 1078 campf(long double v) { x=v; y=0; } 1079 campf(double v) { x=v; y=0; } 1079 campf(double v) { x=v; y=0; } 1080 1080 campf(float v) { x=v; y=0; } 1081 1081 campf(signed long v) { x=v; y=0; } … … 1126 1126 ampf<Precision> x, y; 1127 1127 }; 1128 1128 1129 1129 // 1130 1130 // complex operations … … 1133 1133 const bool operator==(const campf<Precision>& lhs, const campf<Precision>& rhs) 1134 1134 { return lhs.x==rhs.x && lhs.y==rhs.y; } 1135 1135 1136 1136 template<unsigned int Precision> 1137 1137 const bool operator!=(const campf<Precision>& lhs, const campf<Precision>& rhs) 1138 1138 { return lhs.x!=rhs.x || lhs.y!=rhs.y; } 1139 1139 1140 1140 template<unsigned int Precision> 1141 1141 const campf<Precision> operator+(const campf<Precision>& lhs) 1142 1142 { return lhs; } 1143 1143 1144 1144 template<unsigned int Precision> 1145 1145 campf<Precision>& operator+=(campf<Precision>& lhs, const campf<Precision>& rhs) 1146 1146 { lhs.x += rhs.x; lhs.y += rhs.y; return lhs; } 1147 1147 1148 1148 template<unsigned int Precision> 1149 1149 const campf<Precision> operator+(const campf<Precision>& lhs, const campf<Precision>& rhs) 1150 1150 { campf<Precision> r = lhs; r += rhs; return r; } 1151 1151 1152 1152 template<unsigned int Precision> 1153 1153 const campf<Precision> operator-(const campf<Precision>& lhs) 1154 1154 { return campf<Precision>(-lhs.x, -lhs.y); } 1155 1155 1156 1156 template<unsigned int Precision> 1157 1157 campf<Precision>& operator-=(campf<Precision>& lhs, const campf<Precision>& rhs) 1158 1158 { lhs.x -= rhs.x; lhs.y -= rhs.y; return lhs; } 1159 1159 1160 1160 template<unsigned int Precision> 1161 1161 const campf<Precision> operator-(const campf<Precision>& lhs, const campf<Precision>& rhs) 1162 1162 { campf<Precision> r = lhs; r -= rhs; return r; } 1163 1163 1164 1164 template<unsigned int Precision> 1165 1165 campf<Precision>& operator*=(campf<Precision>& lhs, const campf<Precision>& rhs) … … 1170 1170 return lhs; 1171 1171 } 1172 1172 1173 1173 template<unsigned int Precision> 1174 1174 const campf<Precision> operator*(const campf<Precision>& lhs, const campf<Precision>& rhs) 1175 1175 { campf<Precision> r = lhs; r *= rhs; return r; } 1176 1176 1177 1177 template<unsigned int Precision> 1178 1178 const campf<Precision> operator/(const campf<Precision>& lhs, const campf<Precision>& rhs) … … 1197 1197 return result; 1198 1198 } 1199 1199 1200 1200 template<unsigned int Precision> 1201 1201 campf<Precision>& operator/=(campf<Precision>& lhs, const campf<Precision>& rhs) … … 1204 1204 return lhs; 1205 1205 } 1206 1206 1207 1207 template<unsigned int Precision> 1208 1208 const ampf<Precision> abscomplex(const campf<Precision> &z) 1209 1209 { 1210 1210 ampf<Precision> w, xabs, yabs, v; 1211 1211 1212 1212 xabs = abs(z.x); 1213 1213 yabs = abs(z.y); 1214 1214 w = xabs>yabs ? xabs : yabs; 1215 v = xabs<yabs ? xabs : yabs; 1215 v = xabs<yabs ? xabs : yabs; 1216 1216 if( v==0 ) 1217 1217 return w; … … 1222 1222 } 1223 1223 } 1224 1224 1225 1225 template<unsigned int Precision> 1226 1226 const campf<Precision> conj(const campf<Precision> &z) 1227 1227 { 1228 return campf<Precision>(z.x, -z.y); 1229 } 1230 1228 return campf<Precision>(z.x, -z.y); 1229 } 1230 1231 1231 template<unsigned int Precision> 1232 1232 const campf<Precision> csqr(const campf<Precision> &z) 1233 1233 { 1234 ampf<Precision> t = z.x*z.y; 1235 return campf<Precision>(sqr(z.x)-sqr(z.y), t+t); 1236 } 1237 1234 ampf<Precision> t = z.x*z.y; 1235 return campf<Precision>(sqr(z.x)-sqr(z.y), t+t); 1236 } 1237 1238 1238 // 1239 1239 // different types of arguments … … 1281 1281 template<unsigned int Precision> bool operator==(const campf<Precision>& op1, const type& op2) { return op1.x==op2 && op1.y==0; } \ 1282 1282 template<unsigned int Precision> bool operator!=(const type& op1, const campf<Precision>& op2) { return op1!=op2.x || op2.y!=0; } \ 1283 template<unsigned int Precision> bool operator!=(const campf<Precision>& op1, const type& op2) { return op1.x!=op2 || op1.y!=0; } 1283 template<unsigned int Precision> bool operator!=(const campf<Precision>& op1, const type& op2) { return op1.x!=op2 || op1.y!=0; } 1284 1284 __AMP_BINARY_OPF(float) 1285 1285 __AMP_BINARY_OPF(double) … … 1287 1287 __AMP_BINARY_OPF(ampf<Precision>) 1288 1288 #undef __AMP_BINARY_OPF 1289 1289 1290 1290 // 1291 1291 // Real linear algebra … … 1341 1341 } 1342 1342 } 1343 1343 1344 1344 template<unsigned int Precision> 1345 1345 void vMoveNeg(ap::raw_vector< ampf<Precision> > vDst, ap::const_raw_vector< ampf<Precision> > vSrc) … … 1358 1358 } 1359 1359 } 1360 1360 1361 1361 template<unsigned int Precision, class T2> 1362 1362 void vMove(ap::raw_vector< ampf<Precision> > vDst, ap::const_raw_vector< ampf<Precision> > vSrc, T2 alpha) … … 1376 1376 } 1377 1377 } 1378 1378 1379 1379 template<unsigned int Precision> 1380 1380 void vAdd(ap::raw_vector< ampf<Precision> > vDst, ap::const_raw_vector< ampf<Precision> > vSrc) … … 1393 1393 } 1394 1394 } 1395 1395 1396 1396 template<unsigned int Precision, class T2> 1397 1397 void vAdd(ap::raw_vector< ampf<Precision> > vDst, ap::const_raw_vector< ampf<Precision> > vSrc, T2 alpha) … … 1412 1412 } 1413 1413 } 1414 1414 1415 1415 template<unsigned int Precision> 1416 1416 void vSub(ap::raw_vector< ampf<Precision> > vDst, ap::const_raw_vector< ampf<Precision> > vSrc) … … 1429 1429 } 1430 1430 } 1431 1431 1432 1432 template<unsigned int Precision, class T2> 1433 1433 void vSub(ap::raw_vector< ampf<Precision> > vDst, ap::const_raw_vector< ampf<Precision> > vSrc, T2 alpha) … … 1435 1435 vAdd(vDst, vSrc, -alpha); 1436 1436 } 1437 1437 1438 1438 template<unsigned int Precision, class T2> 1439 1439 void vMul(ap::raw_vector< ampf<Precision> > vDst, T2 alpha) … … 1450 1450 } 1451 1451 } 1452 1452 1453 1453 #endif -
Singular/svd/libs/amp.russian.html
r3803c6 raad4ca4 77 77 78 78 <p> 79 <b>Îïðåäåëåíèå òî÷íîñòè íà ýòàïå êîìïèëÿöèè</b>. Îñîáåííîñòüþ áèáëèîòåêè AMP ÿâëÿåòñÿ òî, ÷òî êëàññ, ïîçâîëÿþùèé îñóùåñòâëÿòü îïåðàöèè ñ âåùåñòâåííûìè ÷èñëàìè âûñîêîé òî÷íîñòè, ÿâëÿåòñÿ êëàññîì-øàáëîíîì, ïàðàìåòðîì êîòîðîãî ÿâëÿåòñÿ öåëîå ÷èñëî, çàäàþùåå òî÷íîñòü õðàíÿùåãîñÿ çíà÷åíèÿ. Òàêèì îáðàçîì, òî÷íîñòü, ñ êîòîðîé îñóùåñòâëÿþòñÿ âû÷èñëåíèÿ, ñòàíîâèòñÿ èçâåñòíà åùž íà ýòàïå êîìïèëÿöèè - ïðè ïàðàìåòðèçàöèè øàáëîíà, è íå ìîæåò áûòü èçìåíåíà â õîäå âûïîëíåíèÿ ïðîãðàììû. Ýòî ñóùåñòâåííîå îãðàíè÷åíèå ôóíêöèîíàëüíîñòè áèáëèîòåêè áûëî ââåäåíî ñîçíàòåëüíî. Ïðè÷èíîé ÿâëÿåòñÿ òî, ÷òî îñíîâíîå íàçíà÷åíèå áèáëèîòåêè AMP - ïðèìåíåíèå â ðàìêàõ ïðîåêòà ALGLIB.  ïðîåêòå ALGLIB áèáëèîòåêà AMP èñïîëüçóåòñÿ ïðîãðàììàìè, ÿâëÿþùèìèñÿ ðåçóëüòàòîì ðàáîòû àâòîìàòè÷åñêîãî òðàíñëÿòîðà. Ãåíåðèðóåìûé òðàíñëÿòîðîì êîä íå ñïîñîáåí ðàáîòàòü ñ âåùåñòâåííûìè ÷èñëàìè, ÷üÿ òî÷íîñòü ìåíÿåòñÿ äèíàìè÷åñêè, ïîñêîëüêó ïðè ýòîì âîçíèêàåò ðÿä ïðîáëåì (íàïðèìåð, êàêóþ òî÷íîñòü ñëåäóåò èñïîëüçîâàòü äëÿ ïðîìåæóòî÷íûõ ðåçóëüòàòîâ, åñëè îäíè ýëåìåíòû ìàòðèöû çàäàíû ñ òî÷íîñòüþ 128 áèò, à äðóãèå - ñ òî÷íîñòüþ 256 áèò). Ïî ýòîé ïðè÷èíå áûëî ðåøåíî ââåñòè âûøåóêàçàííîå îãðàíè÷åíèå. 79 <b>Îïðåäåëåíèå òî÷íîñòè íà ýòàïå êîìïèëÿöèè</b>. Îñîáåííîñòüþ áèáëèîòåêè AMP ÿâëÿåòñÿ òî, ÷òî êëàññ, ïîçâîëÿþùèé îñóùåñòâëÿòü îïåðàöèè ñ âåùåñòâåííûìè ÷èñëàìè âûñîêîé òî÷íîñòè, ÿâëÿåòñÿ êëàññîì-øàáëîíîì, ïàðàìåòðîì êîòîðîãî ÿâëÿåòñÿ öåëîå ÷èñëî, çàäàþùåå òî÷íîñòü õðàíÿùåãîñÿ çíà÷åíèÿ. Òàêèì îáðàçîì, òî÷íîñòü, ñ êîòîðîé îñóùåñòâëÿþòñÿ âû÷èñëåíèÿ, ñòàíîâèòñÿ èçâåñòíà åùž íà ýòàïå êîìïèëÿöèè - ïðè ïàðàìåòðèçàöèè øàáëîíà, è íå ìîæåò áûòü èçìåíåíà â õîäå âûïîëíåíèÿ ïðîãðàììû. Ýòî ñóùåñòâåííîå îãðàíè÷åíèå ôóíêöèîíàëüíîñòè áèáëèîòåêè áûëî ââåäåíî ñîçíàòåëüíî. Ïðè÷èíîé ÿâëÿåòñÿ òî, ÷òî îñíîâíîå íàçíà÷åíèå áèáëèîòåêè AMP - ïðèìåíåíèå â ðàìêàõ ïðîåêòà ALGLIB.  ïðîåêòå ALGLIB áèáëèîòåêà AMP èñïîëüçóåòñÿ ïðîãðàììàìè, ÿâëÿþùèìèñÿ ðåçóëüòàòîì ðàáîòû àâòîìàòè÷åñêîãî òðàíñëÿòîðà. Ãåíåðèðóåìûé òðàíñëÿòîðîì êîä íå ñïîñîáåí ðàáîòàòü ñ âåùåñòâåííûìè ÷èñëàìè, ÷üÿ òî÷íîñòü ìåíÿåòñÿ äèíàìè÷åñêè, ïîñêîëüêó ïðè ýòîì âîçíèêàåò ðÿä ïðîáëåì (íàïðèìåð, êàêóþ òî÷íîñòü ñëåäóåò èñïîëüçîâàòü äëÿ ïðîìåæóòî÷íûõ ðåçóëüòàòîâ, åñëè îäíè ýëåìåíòû ìàòðèöû çàäàíû ñ òî÷íîñòüþ 128 áèò, à äðóãèå - ñ òî÷íîñòüþ 256 áèò). Ïî ýòîé ïðè÷èíå áûëî ðåøåíî ââåñòè âûøåóêàçàííîå îãðàíè÷åíèå. 80 80 </p> 81 81 … … 128 128 ~ampf(); 129 129 130 ampf (); 130 ampf (); 131 131 ampf (<b>long double</b> v); 132 132 ampf (<b>double</b> v); … … 142 142 ampf (<b>const</b> std::string &s); 143 143 ampf (<b>const char</b> *s); 144 144 145 145 ampf(<b>const</b> ampf& r); 146 146 <b>template</b><<b>unsigned int</b> Precision2> … … 163 163 <b>template</b><<b>unsigned int</b> Precision2> 164 164 ampf& <b>operator</b>= (<b>const</b> ampf<Precision2>& r); 165 165 166 166 <b>template</b><<b>class</b> T> 167 167 ampf& <b>operator</b>+=(<b>const</b> T& v); … … 172 172 <b>template</b><class T> 173 173 ampf& <b>operator</b>/=(<b>const</b> T& v); 174 174 175 175 mpfr_srcptr getReadPtr() <b>const</b>; 176 176 mpfr_ptr getWritePtr(); 177 177 178 178 <b>bool</b> isFiniteNumber() <b>const</b>; 179 179 <b>bool</b> isPositiveNumber() <b>const</b>; … … 185 185 std::string toHex() <b>const</b>; 186 186 std::string toDec() <b>const</b>; 187 187 188 188 <b>static const</b> ampf getUlpOf(<b>const</b> ampf &x); 189 189 <b>static const</b> ampf getUlp(); … … 496 496 Ýòà ôóíêöèÿ âîçâðàùàåò àðêòàíãåíñ ÷èñëà, ðàâíîãî îòíîøåíèþ àðãóìåíòîâ <code>y/x</code>. Ôóíêöèÿ âîçâðàùàåò êîððåêòíûé ðåçóëüòàò, äàæå åñëè <code>x</code> ðàâíî <code>0</code>. 497 497 </p> 498 498 499 499 <p> 500 500 <span class=func> -
Singular/svd/libs/ap.cpp
r3803c6 raad4ca4 104 104 yabs = fabs(z.y); 105 105 w = xabs>yabs ? xabs : yabs; 106 v = xabs<yabs ? xabs : yabs; 106 v = xabs<yabs ? xabs : yabs; 107 107 if( v==0 ) 108 108 return w; -
Singular/svd/libs/ap.english.html
r3803c6 raad4ca4 142 142 143 143 <p align=justify> 144 Classes of the standard library allow operations with matrixes and vectors (one-dimensional and two-dimensional arrays) of variable size and with variable numeration of elements, that is, the array numeration can start at any number, end at any number and change dynamically. Because the array classes are templates, the arrays of the same dimension have the same set of member functions. And as the member functions of arrays with different dimensions differ only by the number of arguments, there is little difference between two-dimensional and one-dimenstional arrays. 144 Classes of the standard library allow operations with matrixes and vectors (one-dimensional and two-dimensional arrays) of variable size and with variable numeration of elements, that is, the array numeration can start at any number, end at any number and change dynamically. Because the array classes are templates, the arrays of the same dimension have the same set of member functions. And as the member functions of arrays with different dimensions differ only by the number of arguments, there is little difference between two-dimensional and one-dimenstional arrays. 145 145 </p> 146 146 … … 154 154 155 155 <p align=justify> 156 To address the array elements, an overloaded <code:>operator()</code:> is used. That is, the code addressing the element of array <code:>a</code:> with indexes <code:>a(i,j,k)</code:> will look like <code:>a(i,j,k)</code:>. Below is given an example of factorial array calculation, illustrating the work with arrays. 156 To address the array elements, an overloaded <code:>operator()</code:> is used. That is, the code addressing the element of array <code:>a</code:> with indexes <code:>a(i,j,k)</code:> will look like <code:>a(i,j,k)</code:>. Below is given an example of factorial array calculation, illustrating the work with arrays. 157 157 </p> 158 158 … … 201 201 202 202 <p align=justify> 203 <span class=func>T& operator()(<b>int</b> i)</span><br> Addressing the array element number i 203 <span class=func>T& operator()(<b>int</b> i)</span><br> Addressing the array element number i 204 204 </p> 205 205 … … 213 213 214 214 <p align=justify> 215 <span class=func>T* getcontent()</span><br> Gets pointer to the array. The data pointed by the returned pointer can be changed, and the array content will be changed as well. 215 <span class=func>T* getcontent()</span><br> Gets pointer to the array. The data pointed by the returned pointer can be changed, and the array content will be changed as well. 216 216 </p> 217 217 … … 225 225 226 226 <p align=justify> 227 <span class=func>const_raw_vector<T> getvector(<b>int</b> iStart, <b>int</b> iEnd) <b>const</b></span><br> The method is used by the basic subroutines of linear algebra to get access to the internal memory of the array. The method returns an object, holding the pointer to a vector part (starting from the element with iStart index value and finishing with iEnd index value). If iEnd<iStart, then an empty vector is considered to be set. The returned object is for read only. 227 <span class=func>const_raw_vector<T> getvector(<b>int</b> iStart, <b>int</b> iEnd) <b>const</b></span><br> The method is used by the basic subroutines of linear algebra to get access to the internal memory of the array. The method returns an object, holding the pointer to a vector part (starting from the element with iStart index value and finishing with iEnd index value). If iEnd<iStart, then an empty vector is considered to be set. The returned object is for read only. 228 228 </p> 229 229 … … 273 273 274 274 <p align=justify> 275 <span class=func>T* getcontent()</span><br> Gets pointer to the array. The data pointed by the returned pointer can be changed, and the array content will be changed as well. 275 <span class=func>T* getcontent()</span><br> Gets pointer to the array. The data pointed by the returned pointer can be changed, and the array content will be changed as well. 276 276 </p> 277 277 -
Singular/svd/libs/ap.h
r3803c6 raad4ca4 28 28 29 29 /******************************************************************** 30 This symbol is used for debugging. Do not define it and do not remove 31 comments. 30 This symbol is used for debugging. Do not define it and do not remove 31 comments. 32 32 ********************************************************************/ 33 33 //#define UNSAFE_MEM_COPY … … 124 124 125 125 /******************************************************************** 126 Template defining vector in memory. It is used by the basic 126 Template defining vector in memory. It is used by the basic 127 127 subroutines of linear algebra. 128 128 129 Vector consists of Length elements of type T, starting from an element, 130 which Data is pointed to. Interval between adjacent elements equals 129 Vector consists of Length elements of type T, starting from an element, 130 which Data is pointed to. Interval between adjacent elements equals 131 131 the value of Step. 132 132 … … 158 158 It is used by the basic subroutines of linear algebra. 159 159 160 Vector consists of Length elements of type T, starting from an element, 161 which Data is pointed to. Interval between adjacent elements equals 160 Vector consists of Length elements of type T, starting from an element, 161 which Data is pointed to. Interval between adjacent elements equals 162 162 the value of Step. 163 163 … … 688 688 }; 689 689 690 690 691 691 const template_1d_array& operator=(const template_1d_array &rhs) 692 692 { … … 714 714 }; 715 715 716 716 717 717 const T& operator()(int i) const 718 718 { … … 723 723 }; 724 724 725 725 726 726 T& operator()(int i) 727 727 { … … 732 732 }; 733 733 734 734 735 735 void setbounds( int iLow, int iHigh ) 736 736 { … … 743 743 }; 744 744 745 745 746 746 void setcontent( int iLow, int iHigh, const T *pContent ) 747 747 { … … 751 751 }; 752 752 753 753 754 754 T* getcontent() 755 755 { … … 762 762 }; 763 763 764 764 765 765 int getlowbound(int iBoundNum = 0) const 766 766 { … … 768 768 }; 769 769 770 770 771 771 int gethighbound(int iBoundNum = 0) const 772 772 { … … 782 782 }; 783 783 784 784 785 785 const_raw_vector<T> getvector(int iStart, int iEnd) const 786 786 { -
Singular/svd/libs/ap.russian.html
r3803c6 raad4ca4 184 184 185 185 <p align=justify> 186 Äëÿ îáðàùåíèÿ ê ýëåìåíòàì ìàññèâà èñïîëüçóåòñÿ ïåðåãðóæåííûé <code:>operator()</code:>. Ò.å. êîä, îáðàùàþùèéñÿ ê ýëåìåíòó ìàññèâà <code:>a</code:> ñ èíäåêñàìè <code:>i, j, k</code:> áóäåò âûãëÿäåòü êàê <code:>a(i,j,k)</code:>. Íèæå ïðèâåäåí ïðèìåð âû÷èñëåíèÿ ìàññèâà ôàêòîðèàëîâ, èëëþñòðèðóþùèé ðàáîòó ñ ìàññèâàìè. 186 Äëÿ îáðàùåíèÿ ê ýëåìåíòàì ìàññèâà èñïîëüçóåòñÿ ïåðåãðóæåííûé <code:>operator()</code:>. Ò.å. êîä, îáðàùàþùèéñÿ ê ýëåìåíòó ìàññèâà <code:>a</code:> ñ èíäåêñàìè <code:>i, j, k</code:> áóäåò âûãëÿäåòü êàê <code:>a(i,j,k)</code:>. Íèæå ïðèâåäåí ïðèìåð âû÷èñëåíèÿ ìàññèâà ôàêòîðèàëîâ, èëëþñòðèðóþùèé ðàáîòó ñ ìàññèâàìè. 187 187 </p> 188 188 -
Singular/svd/lq.h
r3803c6 raad4ca4 133 133 for(i=0; i<=k-1; i++) 134 134 { 135 135 136 136 // 137 137 // Generate elementary reflector H(i) to annihilate A(i,i+1:n-1) … … 144 144 if( i<n ) 145 145 { 146 146 147 147 // 148 148 // Apply H(i) to A(i+1:m,i:n) from the right … … 195 195 return; 196 196 } 197 197 198 198 // 199 199 // init … … 218 218 } 219 219 } 220 220 221 221 // 222 222 // unpack Q … … 224 224 for(i=k-1; i>=0; i--) 225 225 { 226 226 227 227 // 228 228 // Apply H(i) … … 306 306 t.setbounds(1, n); 307 307 tau.setbounds(1, minmn); 308 308 309 309 // 310 310 // Test the input arguments … … 313 313 for(i=1; i<=k; i++) 314 314 { 315 315 316 316 // 317 317 // Generate elementary reflector H(i) to annihilate A(i,i+1:n) … … 325 325 if( i<n ) 326 326 { 327 327 328 328 // 329 329 // Apply H(i) to A(i+1:m,i:n) from the right … … 361 361 return; 362 362 } 363 363 364 364 // 365 365 // init … … 384 384 } 385 385 } 386 386 387 387 // 388 388 // unpack Q … … 390 390 for(i=k; i>=1; i--) 391 391 { 392 392 393 393 // 394 394 // Apply H(i) … … 423 423 q.setbounds(1, n, 1, n); 424 424 l.setbounds(1, m, 1, n); 425 425 426 426 // 427 427 // LQDecomposition 428 428 // 429 429 lqdecomposition<Precision>(a, m, n, tau); 430 430 431 431 // 432 432 // L … … 446 446 } 447 447 } 448 448 449 449 // 450 450 // Q -
Singular/svd/makeheader
r3803c6 raad4ca4 18 18 19 19 To include a header file into the generated header file 20 (= <outfile>) use the two lines 20 (= <outfile>) use the two lines 21 21 22 22 /*MAKEHEADER*/ … … 73 73 exit 1 74 74 fi 75 75 76 76 # try to create $outfile if it does not exist 77 77 if test -w "$outfile" || cp /dev/null "$outfile" > /dev/null 2> /dev/null; then -
Singular/svd/mkinstalldirs
r3803c6 raad4ca4 8 8 errstatus=0 9 9 10 for file in ${1+"$@"} ; do 10 for file in ${1+"$@"} ; do 11 11 set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` 12 12 shift -
Singular/svd/qr.h
r3803c6 raad4ca4 142 142 t.setbounds(1, m); 143 143 tau.setbounds(0, minmn-1); 144 144 145 145 // 146 146 // Test the input arguments … … 149 149 for(i=0; i<=k-1; i++) 150 150 { 151 151 152 152 // 153 153 // Generate elementary reflector H(i) to annihilate A(i+1:m,i) … … 160 160 if( i<n ) 161 161 { 162 162 163 163 // 164 164 // Apply H(i) to A(i:m-1,i+1:n-1) from the left … … 211 211 return; 212 212 } 213 213 214 214 // 215 215 // init … … 234 234 } 235 235 } 236 236 237 237 // 238 238 // unpack Q … … 240 240 for(i=k-1; i>=0; i--) 241 241 { 242 242 243 243 // 244 244 // Apply H(i) … … 319 319 t.setbounds(1, m); 320 320 tau.setbounds(1, minmn); 321 321 322 322 // 323 323 // Test the input arguments … … 326 326 for(i=1; i<=k; i++) 327 327 { 328 328 329 329 // 330 330 // Generate elementary reflector H(i) to annihilate A(i+1:m,i) … … 338 338 if( i<n ) 339 339 { 340 340 341 341 // 342 342 // Apply H(i) to A(i:m,i+1:n) from the left … … 373 373 return; 374 374 } 375 375 376 376 // 377 377 // init … … 396 396 } 397 397 } 398 398 399 399 // 400 400 // unpack Q … … 402 402 for(i=k; i>=1; i--) 403 403 { 404 404 405 405 // 406 406 // Apply H(i) … … 440 440 q.setbounds(1, m, 1, m); 441 441 r.setbounds(1, m, 1, n); 442 442 443 443 // 444 444 // QRDecomposition 445 445 // 446 446 qrdecomposition<Precision>(a, m, n, tau); 447 447 448 448 // 449 449 // R … … 461 461 ap::vmove(r.getrow(i, i, n), a.getrow(i, i, n)); 462 462 } 463 463 464 464 // 465 465 // Q -
Singular/svd/reflections.h
r3803c6 raad4ca4 122 122 123 123 124 124 125 125 // 126 126 // Executable Statements .. … … 131 131 return; 132 132 } 133 133 134 134 // 135 135 // XNORM = DNRM2( N-1, X, INCX ) … … 152 152 if( xnorm==0 ) 153 153 { 154 154 155 155 // 156 156 // H = I … … 159 159 return; 160 160 } 161 161 162 162 // 163 163 // general case … … 223 223 return; 224 224 } 225 225 226 226 // 227 227 // w := C' * v … … 237 237 ap::vadd(work.getvector(n1, n2), c.getrow(i, n1, n2), t); 238 238 } 239 239 240 240 // 241 241 // C := C - tau * v * w' … … 296 296 return; 297 297 } 298 298 299 299 // 300 300 // w := C * v … … 306 306 work(i) = t; 307 307 } 308 308 309 309 // 310 310 // C := C - w * v' -
Singular/svd/rotations.h
r3803c6 raad4ca4 119 119 return; 120 120 } 121 121 122 122 // 123 123 // Form P * A … … 127 127 if( n1!=n2 ) 128 128 { 129 129 130 130 // 131 131 // Common case: N1<>N2 … … 148 148 else 149 149 { 150 150 151 151 // 152 152 // Special case: N1=N2 … … 169 169 if( n1!=n2 ) 170 170 { 171 171 172 172 // 173 173 // Common case: N1<>N2 … … 190 190 else 191 191 { 192 192 193 193 // 194 194 // Special case: N1=N2 … … 253 253 254 254 255 255 256 256 // 257 257 // Form A * P' … … 261 261 if( m1!=m2 ) 262 262 { 263 263 264 264 // 265 265 // Common case: M1<>M2 … … 282 282 else 283 283 { 284 284 285 285 // 286 286 // Special case: M1=M2 … … 303 303 if( m1!=m2 ) 304 304 { 305 305 306 306 // 307 307 // Common case: M1<>M2 … … 324 324 else 325 325 { 326 326 327 327 // 328 328 // Special case: M1=M2 -
Singular/svd/tests/testsvdunit.h
r3803c6 raad4ca4 90 90 failthreshold = amp::ampf<Precision>("5.0E-3"); 91 91 a.setbounds(0, maxmn-1, 0, maxmn-1); 92 92 93 93 // 94 94 // TODO: div by zero fail, convergence fail … … 96 96 for(gpass=1; gpass<=1; gpass++) 97 97 { 98 98 99 99 // 100 100 // zero matrix, several cases … … 114 114 } 115 115 } 116 116 117 117 // 118 118 // Long dense matrix … … 146 146 } 147 147 } 148 148 149 149 // 150 150 // Dense matrices … … 164 164 } 165 165 } 166 166 167 167 // 168 168 // Sparse matrices, very sparse matrices, incredible sparse matrices … … 184 184 } 185 185 } 186 186 187 187 // 188 188 // report … … 283 283 284 284 minmn = ap::minint(m, n); 285 285 286 286 // 287 287 // decomposition error … … 301 301 } 302 302 materr = amp::maximum<Precision>(materr, locerr); 303 303 304 304 // 305 305 // orthogonality error … … 331 331 } 332 332 orterr = amp::maximum<Precision>(orterr, locerr); 333 333 334 334 // 335 335 // values order error … … 373 373 374 374 375 375 376 376 // 377 377 // Main SVD test … … 384 384 } 385 385 getsvderror<Precision>(a, m, n, u, w, vt, materr, orterr, wsorted); 386 386 387 387 // 388 388 // Additional SVD tests … … 439 439 } 440 440 } 441 441 442 442 // 443 443 // update counter -
Singular/tesths.cc
r3803c6 raad4ca4 141 141 "FB Mathematik der Universitaet, D-67653 Kaiserslautern \\\n" 142 142 , VERSION, VERSION_DATE); 143 if (feOptValue(FE_OPT_NO_SHELL)) Warn ("running in restricted mode:"143 if (feOptValue(FE_OPT_NO_SHELL)) WarnS("running in restricted mode:" 144 144 " shell invocation and links are disallowed"); 145 145 } -
Tst/Short/gitfan.tst
r3803c6 raad4ca4 94 94 list Asigmagens = groupActionOnQImage(generatorsG,Q); 95 95 list actionOnOrbitconeIndicesForGenerators = groupActionOnHashes(Asigmagens,OC); 96 string elementInTermsOfGenerators = 96 string elementInTermsOfGenerators = 97 97 "(x2^-1*x1^-1)^3*x1^-1"; 98 98 evaluateProduct(actionOnOrbitconeIndicesForGenerators, elementInTermsOfGenerators); -
factory/timing.h
r3803c6 raad4ca4 44 44 45 45 #define TIMING_DEFINE(t) static clock_t timing_ ## t ## _start, timing_ ## t ## _end; \ 46 static clock_t timing_ ## t ## _time; 46 static clock_t timing_ ## t ## _time; 47 47 #define TIMING_START(t) timing_ ## t ## _start = clock(); 48 48 #define TIMING_END(t) timing_ ## t ## _end = clock(); \ -
kernel/GBEngine/kstd1.cc
r3803c6 raad4ca4 2947 2947 { 2948 2948 M=idInit(1,F->rank); 2949 Warn ("no minimal generating set computed");2949 WarnS("no minimal generating set computed"); 2950 2950 } 2951 2951 else -
kernel/GBEngine/kstdfac.cc
r3803c6 raad4ca4 101 101 if(i>o->tl) 102 102 { 103 Warn ("poly p1 not found in T:");wrp(p);PrintLn();103 WarnS("poly p1 not found in T:");wrp(p);PrintLn(); 104 104 l[j].p1=pCopy(p); 105 105 l[j].i_r1=-1; … … 123 123 if(i>o->tl) 124 124 { 125 Warn ("poly p2 not found in T:");wrp(p);PrintLn();125 WarnS("poly p2 not found in T:");wrp(p);PrintLn(); 126 126 l[j].p2=pCopy(p); 127 127 l[j].i_r2=-1; -
kernel/GBEngine/syz.cc
r3803c6 raad4ca4 811 811 if (idHomModule(res[0],currRing->qideal,&w)!=isHomog) 812 812 { 813 Warn ("betti-command: Input is not homogeneous!");813 WarnS("betti-command: Input is not homogeneous!"); 814 814 weights=NULL; 815 815 } -
kernel/combinatorics/hilb.cc
r3803c6 raad4ca4 1522 1522 return(0); 1523 1523 } 1524 1524 1525 1525 if(JCount == 0) 1526 1526 { … … 1543 1543 /* 1544 1544 * It compares the ideal I with ideals in the set 'idorb' 1545 * up to total degree = 1545 * up to total degree = 1546 1546 * trInd - max(deg of w, deg of word in polist) polynomials. 1547 * 1547 * 1548 1548 * It returns 0 if I is not equal to any ideal in the 1549 1549 * 'idorb' else returns position of the matched ideal. … … 1622 1622 * It compares the ideal I with ideals in the set 'idorb'. 1623 1623 * I and ideals of 'idorb' are sorted. 1624 * 1624 * 1625 1625 * It returns 0 if I is not equal to any ideal of 'idorb' 1626 1626 * else returns position of the matched ideal. … … 1653 1653 * It compares the ideal I with ideals in the set 'idorb'. 1654 1654 * I and ideals in 'idorb' are sorted. 1655 1655 1656 1656 * returns 0 if I is not equal to any ideal of 'idorb' 1657 1657 * else returns position of the matched ideal. … … 1662 1662 int OrbCount = idorb.size(); 1663 1663 int dtr=0; int IwCount, ObCount; 1664 dtr = trunDegHs - 1 - p_Totaldegree(w, currRing); 1665 1664 dtr = trunDegHs - 1 - p_Totaldegree(w, currRing); 1665 1666 1666 if(idIs0(I)) 1667 1667 { 1668 1668 for(i = 1; i < OrbCount; i++) 1669 { 1669 { 1670 1670 if(p_Totaldegree(w, currRing) == p_Totaldegree(polist[i], currRing)) 1671 1671 { … … 1681 1681 } 1682 1682 } 1683 1683 1684 1684 return(ps); 1685 1685 } 1686 1686 1687 1687 IwCount = CountOnIdUptoTruncationIndex(I, dtr); 1688 1688 1689 1689 if(p_Totaldegree(I->m[0], currRing)==0) 1690 1690 { 1691 1691 for(i = 1; i < OrbCount; i++) 1692 { 1692 { 1693 1693 if(idIs0(idorb[i])) 1694 1694 continue; … … 1701 1701 return(ps); 1702 1702 } 1703 1703 1704 1704 for(i = 1; i < OrbCount; i++) 1705 1705 { … … 1921 1921 idInsertMonomial(Jwi, p_One(currRing)); 1922 1922 return(Jwi); 1923 } 1923 } 1924 1924 bool flag = FALSE; 1925 1925 int SCount = IDELEMS(S); … … 1942 1942 * This is based on iterative right colon operations on a 1943 1943 * two-sided monomial ideal of the free associative algebra. 1944 * The algorithm terminates for those monomial ideals 1944 * The algorithm terminates for those monomial ideals 1945 1945 * whose monomials define "regular formal languages", 1946 * that is, all monomials of the input ideal can be obtained 1946 * that is, all monomials of the input ideal can be obtained 1947 1947 * from finite languages by applying finite number of 1948 1948 * rational operations. … … 1958 1958 int (*POS)(ideal, poly, std::vector<ideal>, std::vector<poly>, int, int); 1959 1959 if(trunDegHs != 0) 1960 { 1960 { 1961 1961 Print("\nTruncation degree = %d\n",trunDegHs); 1962 1962 POS=&positionInOrbitTruncationCase; … … 2033 2033 //in the vector of ideals 'idorb' 2034 2034 //otherwise delete it 2035 2035 2036 2036 Jwi = idInit(1,1); 2037 2037 2038 2038 Jwi = colonIdeal(S, wi, lV, Jwi, trunDegHs); 2039 2039 ps = (*POS)(Jwi, wi, idorb, polist, trInd, trunDegHs); 2040 2040 2041 2041 if(ps == 0) // finds a new ideal 2042 2042 { … … 2113 2113 } 2114 2114 } 2115 2115 2116 2116 ring r = currRing; 2117 2117 int npar; … … 2134 2134 npar = lV; 2135 2135 } 2136 2136 2137 2137 p.r = rDefault(0, npar, tt); 2138 2138 coeffs cf = nInitChar(n_transExt, &p); … … 2242 2242 luDecomp(gMat, pMat, lMat, uMat, R); 2243 2243 luSolveViaLUDecomp(pMat, lMat, uMat, cMat, H_serVec, Hnot); 2244 2244 2245 2245 //to print system solving time 2246 2246 //if(odp){ … … 2283 2283 * the free associative algebra with respect to a monomial 'w' 2284 2284 * (S:_R w). 2285 */ 2285 */ 2286 2286 S = minimalMonomialGenSet(S); 2287 2287 ideal Iw = idInit(1,1); -
libpolys/coeffs/ffields.cc
r3803c6 raad4ca4 912 912 { 913 913 #ifndef SING_NDEBUG 914 Warn ("illegal characteristic");914 WarnS("illegal characteristic"); 915 915 #endif 916 916 return TRUE; -
libpolys/coeffs/generics.cc
r3803c6 raad4ca4 21 21 22 22 #include "coeffs/generics.h" 23 23 24 24 #include "coeffs/rintegers.h" 25 25 … … 432 432 cc->a1=coeffs1->cfExtGcd(aa->a1,bb->a1,&ss->a1,&tt->a1,coeffs1); 433 433 cc->a2=coeffs2->cfExtGcd(aa->a2,bb->a2,&ss->a2,&tt->a2,coeffs2); 434 return (number)cc; 434 return (number)cc; 435 435 } 436 436 static number gGetUnit (number n, const coeffs r) … … 440 440 cc->a1=coeffs1->cfGetUnit(aa->a1,coeffs1); 441 441 cc->a2=coeffs2->cfGetUnit(aa->a2,coeffs2); 442 return (number)cc; 442 return (number)cc; 443 443 } 444 444 static BOOLEAN gIsUnit (number a, const coeffs) -
libpolys/coeffs/gnumpc.h
r3803c6 raad4ca4 15 15 BOOLEAN ngcInitChar(coeffs r, void*); 16 16 17 void ngcSetChar(const coeffs r); 17 void ngcSetChar(const coeffs r); 18 18 #endif 19 19 /* GMPCOMPLEX_H */ -
libpolys/polys/mod_raw.cc
r3803c6 raad4ca4 90 90 if (found) Warn("Error message from system: %s", dynl_error()); 91 91 if (msg != NULL) Warn("%s", msg); 92 Warn ("See the INSTALL section in the Singular manual for details.");92 WarnS("See the INSTALL section in the Singular manual for details."); 93 93 warn_handle = TRUE; 94 94 } … … 106 106 if (proc_ptr == NULL && ! warn_proc) 107 107 { 108 Warn ("Could load a procedure from a dynamic library");108 WarnS("Could load a procedure from a dynamic library"); 109 109 Warn("Error message from system: %s", dynl_error()); 110 110 if (msg != NULL) Warn("%s", msg); 111 Warn ("See the INSTALL section in the Singular manual for details.");111 WarnS("See the INSTALL section in the Singular manual for details."); 112 112 warn_proc = TRUE; 113 113 } -
libpolys/polys/monomials/ring.cc
r3803c6 raad4ca4 583 583 if (l==nblocks) 584 584 { 585 if (r->bitmask!=0xffff) 585 if (r->bitmask!=0xffff) 586 586 { 587 587 long mm=r->bitmask; … … 5064 5064 #ifndef SING_NDEBUG 5065 5065 WarnS("rGetMaxSyzComp: order c"); 5066 #endif 5066 #endif 5067 5067 return 0; 5068 5068 } -
misc/intset.cc
r3803c6 raad4ca4 67 67 } 68 68 else 69 { 69 { 70 70 l->data = (void*) tobeassigned; 71 } 71 } 72 72 } 73 73 else … … 116 116 { 117 117 WerrorS("syntax: intersect_set(<intset>,<intset>,<intset>)"); 118 return TRUE; 118 return TRUE; 119 119 } 120 120 si_intset *a=(si_intset*)arg->Data(); … … 150 150 ||(arg->next->Typ()!=INT_CMD)) 151 151 { 152 WerrorS("syntax: insert_set(<intset>,<int>)"); 152 WerrorS("syntax: insert_set(<intset>,<int>)"); 153 153 return TRUE; 154 154 } … … 156 156 int b=(int)(long)arg->next->Data(); 157 157 a->insert(b); 158 result->rtyp=NONE; 158 result->rtyp=NONE; 159 159 result->data=NULL; 160 160 return FALSE;
Note: See TracChangeset
for help on using the changeset viewer.