Changeset 96f9fdf in git
 Timestamp:
 Sep 5, 2011, 1:52:09 PM (12 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'cdfcdb8287f66bc6070028082cbbc6eff10e609b')
 Children:
 3426de24a82fe29ddf501d02bcb6bd50a782f43f
 Parents:
 38ffb7aa68530ae0bcc0c2bb95142f15951ff00c
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

factory/facHensel.cc
r38ffb7 r96f9fdf 573 573 { 574 574 int degAy= degree (A); 575 subA1.rep.SetLength ((long) d*(degAy + 1));576 subA2.rep.SetLength ((long) d*(degAy + 1));575 subA1.rep.SetLength ((long) d*(degAy + 2)); 576 subA2.rep.SetLength ((long) d*(degAy + 2)); 577 577 578 578 Variable v; … … 602 602 for (int j= 0; j < bufRepLength; j++) 603 603 { 604 subA1p [j + k] = bufp [j];605 subA2p [j + kk] = bufp [j];604 subA1p [j + k] += bufp [j]; 605 subA2p [j + kk] += bufp [j]; 606 606 } 607 607 } … … 614 614 { 615 615 int degAy= degree (A); 616 subA1.rep.SetLength ((long) d*(degAy + 1)); 617 subA2.rep.SetLength ((long) d*(degAy + 1)); 618 619 Variable v; 616 subA1.rep.SetLength ((long) d*(degAy + 2)); 617 subA2.rep.SetLength ((long) d*(degAy + 2)); 618 620 619 zz_p *subA1p; 621 620 zz_p *subA2p; … … 635 634 for (int j= 0; j < bufRepLength; j++) 636 635 { 637 subA1p [j + k] = bufp [j];638 subA2p [j + kk] = bufp [j];636 subA1p [j + k] += bufp [j]; 637 subA2p [j + kk] += bufp [j]; 639 638 } 640 639 } … … 739 738 if (repLengthBuf2 > degfSubLf + 1) 740 739 degfSubLf= repLengthBuf2  1; 741 int tmp= tmin (repLengthBuf1, deggSubLg );740 int tmp= tmin (repLengthBuf1, deggSubLg + 1); 742 741 for (int ind= 0; ind < tmp; ind++) 743 742 gp [ind + lg] = buf1p [ind]; … … 853 852 if (repLengthBuf2 > degfSubLf + 1) 854 853 degfSubLf= repLengthBuf2  1; 855 int tmp= tmin (repLengthBuf1, deggSubLg );854 int tmp= tmin (repLengthBuf1, deggSubLg + 1); 856 855 for (int ind= 0; ind < tmp; ind++) 857 856 gp [ind + lg] = buf1p [ind]; … … 952 951 CanonicalForm& M) 953 952 { 954 int d1= tmax (degree (F, 1), degree (G, 1)) + 1; 955 int d2= tmax (degree (F, 2), degree (G, 2)); 953 int d1= degree (F, 1) + degree (G, 1) + 1; 954 d1 /= 2; 955 d1 += 1; 956 956 957 957 zz_pX F1, F2; … … 963 963 MulTrunc (F1, F1, G1, (long) k); 964 964 965 mul (F2, F2, G2); 966 if (deg (F2) > k  2) 967 F2 >>= (deg (F2)  k + 2); 968 965 int degtailF= degree (tailcoeff (F), 1); 966 int degtailG= degree (tailcoeff (G), 1); 967 int taildegF= taildegree (F); 968 int taildegG= taildegree (G); 969 int b= k + degtailF + degtailG  d1*(2+taildegF+taildegG); 970 971 reverse (F2, F2); 972 reverse (G2, G2); 973 MulTrunc (F2, F2, G2, b + 1); 974 reverse (F2, F2, b); 975 976 int d2= tmax (deg (F2)/d1, deg (F1)/d1); 969 977 return reverseSubst (F1, F2, d1, d2); 970 978 } … … 983 991 int degBy= degree (B, 2); 984 992 int d1= degAx + 1 + degBx; 985 int d2= tmax (deg ree (A, 2), degree (B, 2));993 int d2= tmax (degAy, degBy); 986 994 987 995 if (d1 > 128 && d2 > 160 && (degAy == degBy) && (2*degAy > degree (M))) … … 1004 1012 CanonicalForm& M, const Variable& alpha) 1005 1013 { 1006 int d1= tmax (degree (F, 1), degree (G, 1)) + 1; 1007 int d2= tmax (degree (F, 2), degree (G, 2)); 1014 int d1= degree (F, 1) + degree (G, 1) + 1; 1015 d1 /= 2; 1016 d1 += 1; 1008 1017 1009 1018 zz_pEX F1, F2; … … 1015 1024 MulTrunc (F1, F1, G1, (long) k); 1016 1025 1017 mul (F2, F2, G2); 1018 if (deg (F2) > k  2) 1019 F2 >>= (deg (F2)  k + 2); 1020 1021 CanonicalForm result= reverseSubst (F1, F2, d1, d2, alpha); 1022 1023 return result; 1026 int degtailF= degree (tailcoeff (F), 1); 1027 int degtailG= degree (tailcoeff (G), 1); 1028 int taildegF= taildegree (F); 1029 int taildegG= taildegree (G); 1030 int b= k + degtailF + degtailG  d1*(2+taildegF+taildegG); 1031 1032 reverse (F2, F2); 1033 reverse (G2, G2); 1034 MulTrunc (F2, F2, G2, b + 1); 1035 reverse (F2, F2, b); 1036 1037 int d2= tmax (deg (F2)/d1, deg (F1)/d1); 1038 return reverseSubst (F1, F2, d1, d2, alpha); 1024 1039 } 1025 1040 … … 1039 1054 int degBy= degree (B, 2); 1040 1055 int d1= degAx + degBx + 1; 1041 int d2= tmax (deg ree (A, 2), degree (B, 2));1056 int d2= tmax (degAy, degBy); 1042 1057 zz_p::init (getCharacteristic()); 1043 1058 zz_pX NTLMipo= convertFacCF2NTLzzpX (getMipo (alpha));
Note: See TracChangeset
for help on using the changeset viewer.