Changeset 49698f3 in git for kernel/mpr_numeric.cc
- Timestamp:
- Aug 26, 2005, 2:33:27 PM (19 years ago)
- Branches:
- (u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
- Children:
- 695341870a0657f232d330f471725e6277fc18da
- Parents:
- 8cb9f91e38f2b181552eeac6cf64763409e7c918
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/mpr_numeric.cc
r8cb9f9 r49698f3 3 3 ****************************************/ 4 4 5 /* $Id: mpr_numeric.cc,v 1. 5 2005-08-23 09:11:08Singular Exp $ */5 /* $Id: mpr_numeric.cc,v 1.6 2005-08-26 12:33:27 Singular Exp $ */ 6 6 7 7 /* … … 896 896 bool found; 897 897 //gmp_complex mprec(1.0/pow(10,gmp_output_digits-5),1.0/pow(10,gmp_output_digits-5)); 898 gmp_float mprec(1.0/pow(10.0,(int)(gmp_output_digits/3)));899 898 900 899 for ( xkoord= 0; xkoord < anzm; xkoord++ ) { // für x1,x2, x1,x2,x3, x1,x2,...,xn 900 gmp_float mprec(1.0/pow(10.0,(int)(gmp_output_digits/3))); 901 901 for ( r= 0; r < anzr; r++ ) { // für jede Nullstelle 902 902 // (x1-koordinate) * evp[1] + (x2-koordinate) * evp[2] + … … 908 908 } 909 909 found= false; 910 for ( rtest= r; rtest < anzr; rtest++ ) { // für jede Nullstelle 911 zwerg = tmp - (*roots[xk])[rtest] * mu[xkoord]->evPointCoord(xk+1); // xk+1, xkoord+2 912 for ( mtest= 0; mtest < anzr; mtest++ ) 910 do { // while not found 911 for ( rtest= r; rtest < anzr; rtest++ ) { // für jede Nullstelle 912 zwerg = tmp - (*roots[xk])[rtest] * mu[xkoord]->evPointCoord(xk+1); // xk+1, xkoord+2 913 for ( mtest= 0; mtest < anzr; mtest++ ) 914 { 915 // if ( tmp == (*mu[xkoord])[mtest] ) 916 // { 917 if ( ((zwerg.real() <= (*mu[xkoord])[mtest].real() + mprec) && 918 (zwerg.real() >= (*mu[xkoord])[mtest].real() - mprec)) && 919 ((zwerg.imag() <= (*mu[xkoord])[mtest].imag() + mprec) && 920 (zwerg.imag() >= (*mu[xkoord])[mtest].imag() - mprec)) ) 921 { 922 roots[xk]->swapRoots( r, rtest ); 923 found= true; 924 break; 925 } 926 } 927 } // rtest 928 if (!found) 913 929 { 914 // if ( tmp == (*mu[xkoord])[mtest] ) 915 // { 916 if ( ((zwerg.real() <= (*mu[xkoord])[mtest].real() + mprec) && 917 (zwerg.real() >= (*mu[xkoord])[mtest].real() - mprec)) && 918 ((zwerg.imag() <= (*mu[xkoord])[mtest].imag() + mprec) && 919 (zwerg.imag() >= (*mu[xkoord])[mtest].imag() - mprec)) ) 920 { 921 roots[xk]->swapRoots( r, rtest ); 922 found= true; 923 break; 924 } 925 } 926 } // rtest 930 WarnS("rootArranger::arrange: precision lost"); 931 mprec*=10; 932 } 933 } while(!found); 934 #if 0 927 935 if ( !found ) 928 936 { 929 937 Warn("rootArranger::arrange: No match? coord %d, root %d.",xkoord,r); 930 #ifdef mprDEBUG_PROT938 //#ifdef mprDEBUG_PROT 931 939 WarnS("One of these ..."); 932 940 for ( rtest= r; rtest < anzr; rtest++ ) … … 945 953 Warn(" %s",complexToStr((*mu[xkoord])[mtest],gmp_output_digits+1)); 946 954 } 947 #endif 948 } 955 //#endif 956 } 957 #endif 949 958 } // r 950 959 } // xkoord
Note: See TracChangeset
for help on using the changeset viewer.