diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/tablor')
-rw-r--r-- | Master/texmf-dist/tex/latex/tablor/tablor-xetex.sty | 181 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tablor/tablor.sty | 181 |
2 files changed, 215 insertions, 147 deletions
diff --git a/Master/texmf-dist/tex/latex/tablor/tablor-xetex.sty b/Master/texmf-dist/tex/latex/tablor/tablor-xetex.sty index 9f689d30e2f..fc9b6e7a14c 100644 --- a/Master/texmf-dist/tex/latex/tablor/tablor-xetex.sty +++ b/Master/texmf-dist/tex/latex/tablor/tablor-xetex.sty @@ -1,5 +1,5 @@ \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{tablor-xetex}[24/11/2008 v4.02b la machine a creer des +\ProvidesPackage{tablor-xetex}[29/01/2009 v4.02c la machine a creer des tableaux de signes et variations compatible xetex] % \copyleft Connan le Barbare (aka Guillaume Connan) \copyright @@ -1149,31 +1149,38 @@ l0:=" newLigneVariables(btex $"+nomv+"$ etex);";lp:=" "; lf:=" ";lsp:=" "; LI:=limit(f(x),x,Z[0],1); LF:=limit(f(x),x,Z[nz-1],-1); LP:=NULL; -if(nz>2){ for(r:=1; r<=nz-2;r++){LP:=LP,if(member(Z[r],F)){limit(f(x),x,Z[r],-1),limit(f(x),x,Z[r],1)}else{f(Z[r])}}}; -if(nz>2){ LL:=[LI,LP,LF]}else{LL:=[LI,LF]}; +PB:=1; +if(nz>2){ for(r:=1; r<=nz-2;r++){LP:=LP,if(member(Z[r],F)){limit(f(x),x,Z[r],-1),limit(f(x),x,Z[r],1)}else{f(Z[r])};if(member(Z[r],F)){PB:=PB,0,1}}}; +if(nz>2){ LL:=[LI,LP,LF]; PB:=[PB,1]}else{LL:=[LI,LF];PB:=[1,1]}; NL:=size(LL); -A:=NULL;aa:=1;kk:=0; +A:=NULL;aa:=1; +kk:=0; -if(NL==nz){for(k:=0;k<nz-1;k++){TestS:=(sign(evalf(LL[k]-ao))==sign(evalf(LL[k+1]-ao))) or (sign(evalf(LL[k]-ao))==0.0)or (sign(evalf(LL[k+1]-ao))==0.0); + + +if(NL==nz){for(k:=0;k<nz-1;k++){TestS:=(evalf(sign(LL[k]-ao))==evalf(sign(LL[k+1]-ao))) or (evalf(sign(LL[k]-ao))==0.0)or (evalf(sign(LL[k+1]-ao))==0.0); if(TestS==0){A:=A,aa;l0:=l0+"val(btex $"+latex(Z[k])+"$ etex);"+"val(btex $\\alpha_"+aa+"$ etex);";aa:=aa+1;}else{l0:=l0+"val(btex $"+latex(Z[k])+"$ etex);"}} l0:=l0+"val(btex $"+latex(Z[nz-1])+"$ etex);"}; +//chgmt NL->nz +if(NL>nz){for(k:=0;k<NL-1;k++){TestS:=(evalf(sign(LL[k]-ao))==evalf(sign(LL[k+1]-ao))) or (evalf(sign(LL[k]-ao))==0.0)or (evalf(sign(LL[k+1]-ao))==0.0); + +if(PB[k]==1){if(TestS==0){ + A:=A,aa;l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);"+"val(btex $\\alpha_"+aa+"$ etex);";aa:=aa+1;kk:=kk+1} +else{l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);";kk:=kk+1}}; +} -if(NL>nz){for(k:=0;k<NL-1;k++){TestS:=(sign(evalf(LL[k]-ao))==sign(evalf(LL[k+1]-ao))) or (sign(evalf(LL[k]-ao))==0.0)or (sign(evalf(LL[k+1]-ao))==0.0); -TestL:=(abs(LL[k])==abs(LL[k+1])); -if(TestS==0){ if( TestL==1 ){l0:=l0}else{ -A:=A,aa;l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);"+"val(btex $\\alpha_"+aa+"$ etex);";aa:=aa+1;kk:=kk+1}}else{l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);";kk:=kk+1}} -l0:=l0+"val(btex $"+latex(Z[nz-1])+"$ etex); -"}; + l0:=l0+"val(btex $"+latex(Z[nz-1])+"$ etex);" + }; -TestS:=(sign(evalf(LL[0]-ao))==sign(evalf(LL[1]-ao))) or (sign(evalf(LL[0]-ao))==0.0) or (sign(evalf(LL[1]-ao))==0.0); +TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))==0.0) or (evalf(sign(LL[1]-ao))==0.0); k0:= evalf(limit(f(x),x=Z[0],1))> evalf(limit(f(x),x=Z[1],-1)); kz:=evalf(limit(f(x),x=Z[nz-1],-1))> evalf(limit(f(x),x=Z[nz-2],1)); lsi:=lsic+nom+"'("+nomv+")}$ etex);"+ - if(Z[0]==-infinity){if(sign(evalf(fp(if(Z[1]==+infinity){0}else{Z[1]-10^(-5)})))==1){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){ + if(Z[0]==-infinity){if(evalf(sign(fp(if(Z[1]==+infinity){0}else{Z[1]-10^(-5)})))==1){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){ if(fp(Z[0])==0){"valBarre(btex 0 etex);"}else{" "}+ if(sign(fp((Z[0]+10^(-3))))==1){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ if(sign(fp(10^(-3)+Z[0]))==1){"plus;"}else{"moins;"} }}+if(TestS==0){"valBarre(btex$ $ etex);"+ if(sign(fp(10^(-3)+Z[0]))==1){"plus;"}else{"moins;"}}else{" "}; @@ -1181,28 +1188,33 @@ lsi:=lsic+nom+"'("+nomv+")}$ etex);"+ - -if(nz>2){rr:=1; if(nz==NL){for(r:=1; r<=NL-2;r++){ TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0); +if(nz>2){rr:=1; if(nz==NL){for(r:=1; r<=NL-2;r++){ TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); ksp:=evalf(fp(Z[r]+0.01))>0; TestL:=(abs(LL[r])==abs(LL[r+1])); lsp:=lsp+if(member(Z[r],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ if(ksp==1){"plus;"}else{"moins;"}+if(TestS==0){"valBarre(btex $ $ etex);"}else{" "}+if(TestS==0){if(ksp==1){"plus;"}else{"moins;"}}else{" "}; - }} -else{for(r:=1; r<=NL-2;r++){kspp:=evalf(fp(Z[rr]+0.01))>0;TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0); - TestL:=(abs(LL[r])==abs(LL[r+1])); - if(TestS==0){if( TestL==1 ){lsp:=lsp}else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ + }} +else{for(r:=1; r<=NL-2;r++){kspp:=evalf(fp(Z[rr]+0.01))>0;TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); + + if(PB[r]==1){if(TestS==0){lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ if(kspp==1){"plus;"}else{"moins;"}+"valBarre(btex $ $ etex);"+if(kspp==1){"plus;"}else{"moins;"};rr:=rr+1;} - } else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ + else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ if(kspp==1){"plus;"}else{"moins;"};rr:=rr+1;} -}} - }; +}}}}; + + + + + lsf:=if(member(Z[nz-1],F)==0){" "}else{"nonDefBarre;"} -lsf:=if(member(Z[nz-1],F)==0){""}else{"nonDefBarre;"} lm0:=limit(f(x),x=Z[0],1)==-infinity; -TestS:=(sign(evalf(LL[0]-ao))==sign(evalf(LL[1]-ao))) or (sign(evalf(LL[0]-ao))==0.0) or (sign(evalf(LL[1]-ao))==0.0); + + + +TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))==0.0) or (evalf(sign(LL[1]-ao))==0.0); li:=lvic+nom+"}$ etex); "+ if(member(Z[0],F)==0){"valPos(btex $"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$ etex,"} @@ -1210,41 +1222,43 @@ TestS:=(sign(evalf(LL[0]-ao))==sign(evalf(LL[1]-ao))) or (sign(evalf(LL[0]-ao))= if(k0==1){"1);"}else{"0);"}+if(TestS==0){"valPos(btex $ "+ao+" $ etex,0.5);"}else{" "}; - if(nz>2){if(nz==NL){for(r:=1; r<=nz-2;r++){TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0); + if(nz>2){if(nz==NL){for(r:=1; r<=nz-2;r++){TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); krm:=evalf(limit(f(x),x=Z[r-1],1))< evalf(limit(f(x),x=Z[r],-1)); krp:=evalf(limit(f(x),x=Z[r],1))> evalf(limit(f(x),x=Z[r+1],-1)) ; lmrm:=limit(f(x),x=Z[r],-1)==-infinity;lmrp:=limit(f(x),x=Z[r],1)==-infinity; lp:=lp+if(member(Z[r],F)) { "limGauche(btex $"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],-1)))}+"$ etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex $"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],1)))}+"$ etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex $"+latex(simplify(f(Z[r])))+"$ - etex,"+if(sign(evalf(fp(Z[r]-0.01)))==sign(fp(Z[r]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+if(TestS==0){"valPos(btex + etex,"+if(evalf(sign(fp(Z[r]-0.01)))==sign(fp(Z[r]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+if(TestS==0){"valPos(btex $ "+ao+" $ etex,0.5);" }else{" "}; -};//for -}else{rr:=1;for(r:=1; r<=NL-2;r++){TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0); +};//for +}else{rr:=1;for(r:=1; r<=NL-2;r++){TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); krm:=evalf(limit(f(x),x=Z[rr-1],1))< evalf(limit(f(x),x=Z[rr],-1)); krp:=evalf(limit(f(x),x=Z[rr],1))> evalf(limit(f(x),x=Z[rr+1],-1)) ; lmrm:=limit(f(x),x=Z[rr],-1)==-infinity;lmrp:=limit(f(x),x=Z[rr],1)==-infinity; TestL:=(abs(LL[r])==abs(LL[r+1])); -if(TestS==0){if( TestL==1 ){lp:=lp}else{ lp:=lp+if(member(Z[rr],F)) { + +if(PB[r]==1){if(TestS==0){lp:=lp+if(member(Z[rr],F)){ "limGauche(btex $"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$ etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex $"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$ etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex $"+latex(simplify(f(Z[rr])))+"$ - etex,"+if(sign(evalf(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+"valPos(btex + etex,"+if(evalf(sign(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+"valPos(btex $ "+ao+" $ etex,0.5); ";rr:=rr+1; -}// else testL==1 -}//testS==0 +}// testS==0 else{lp:=lp+if(member(Z[rr],F)){ "limGauche(btex $"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$ etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex $"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$ etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex $"+latex(simplify(f(Z[rr])))+"$ - etex,"+if(sign(evalf(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0); + etex,"+if(evalf(sign(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0); "}}};rr:=rr+1; }//else testS==0 +}//PB[r]==1 }//for nz<NL }// else nz<NL //if nz=NL };//if nz>2 + lnz:=limit(f(x),x=Z[nz-1],-1)==-infinity; @@ -1254,7 +1268,10 @@ lf:=if(member(Z[nz-1],F)==0){"valPos(btex $"+ else{"limGauche(btex $"+ if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$ etex,"+ if(kz==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}}; - + + + + @@ -1308,6 +1325,10 @@ endTableau; + + + + sortie:=fopen("XCasmpfc.mp"); fprint(sortie,Unquoted,MetaLfc); fclose(sortie); @@ -1317,6 +1338,7 @@ fclose(sortie); + \end{VerbatimOut} @@ -1335,7 +1357,6 @@ fclose(sortie); \begin{VerbatimOut}{XcasTVIapp.cxx} - TVIapp(L,F,nom,nomv,f,ftt,ao,nmr):={ @@ -1350,10 +1371,10 @@ nz:=size(z); S:=NULL; -if(L==[-infinity,+infinity]){j:=[seq(-100+k,k=0..200)]minus F;for k in j do S:=S,fsolve(fp(x),x,k/10,newton_solver);end_for} -else{if(L[0]==-infinity){j:=[seq(k,k=100..floor(L[1]))] minus F;for k in j do S:=S,fsolve(fp(x),x,k/10,newton_solver);end_for} -else{if(L[1]==+infinity){j:=[seq(k,k=floor(L[0])..100)] minus F;for k in j do S:=S,fsolve(fp(x),x,k/10,newton_solver);end_for;} -else{ j:=[seq(k,k=floor(z[0])..floor(z[nz-1]))] minus F;for k in j do S:=S,fsolve(fp(x),x,k/10,newton_solver);end_for; }}}; +if(L==[-infinity,+infinity]){j:=[seq(-100+k,k=0..200)]minus F;for k in j do S:=S,resoudre_numerique(fp(x),x,k/10,newton_solver);end_for} +else{if(L[0]==-infinity){j:=[seq(k,k=100..floor(L[1]))] minus F;for k in j do S:=S,resoudre_numerique(fp(x),x,k/10,newton_solver);end_for} +else{if(L[1]==+infinity){j:=[seq(k,k=floor(L[0])..100)] minus F;for k in j do S:=S,resoudre_numerique(fp(x),x,k/10,newton_solver);end_for;} +else{ j:=[seq(k,k=floor(z[0])..floor(z[nz-1]))] minus F;for k in j do S:=S,resoudre_numerique(fp(x),x,k/10,newton_solver);end_for; }}}; @@ -1399,31 +1420,37 @@ l0:=" newLigneVariables(btex $"+nomv+"$ etex);";lp:=" "; lf:=" ";lsp:=" "; LI:=limit(f(x),x,Z[0],1); LF:=limit(f(x),x,Z[nz-1],-1); LP:=NULL; -if(nz>2){ for(r:=1; r<=nz-2;r++){LP:=LP,if(member(Z[r],F)){limit(f(x),x,Z[r],-1),limit(f(x),x,Z[r],1)}else{f(Z[r])}}}; -if(nz>2){ LL:=[LI,LP,LF]}else{LL:=[LI,LF]}; +PB:=1; +if(nz>2){ for(r:=1; r<=nz-2;r++){LP:=LP,if(member(Z[r],F)){limit(f(x),x,Z[r],-1),limit(f(x),x,Z[r],1)}else{f(Z[r])};if(member(Z[r],F)){PB:=PB,0,1}}}; +if(nz>2){ LL:=[LI,LP,LF]; PB:=[PB,1]}else{LL:=[LI,LF];PB:=[1,1]}; NL:=size(LL); -A:=NULL;aa:=1;kk:=0; +A:=NULL;aa:=1; +kk:=0; + -if(NL==nz){for(k:=0;k<nz-1;k++){TestS:=(sign(evalf(LL[k]-ao))==sign(evalf(LL[k+1]-ao))) or (sign(evalf(LL[k]-ao))==0.0)or (sign(evalf(LL[k+1]-ao))==0.0); +if(NL==nz){for(k:=0;k<nz-1;k++){TestS:=(evalf(sign(LL[k]-ao))==evalf(sign(LL[k+1]-ao))) or (evalf(sign(LL[k]-ao))==0.0)or (evalf(sign(LL[k+1]-ao))==0.0); if(TestS==0){A:=A,aa;l0:=l0+"val(btex $"+latex(Z[k])+"$ etex);"+"val(btex $\\alpha_"+aa+"$ etex);";aa:=aa+1;}else{l0:=l0+"val(btex $"+latex(Z[k])+"$ etex);"}} l0:=l0+"val(btex $"+latex(Z[nz-1])+"$ etex);"}; +//chgmt NL->nz +if(NL>nz){for(k:=0;k<NL-1;k++){TestS:=(evalf(sign(LL[k]-ao))==evalf(sign(LL[k+1]-ao))) or (evalf(sign(LL[k]-ao))==0.0)or (evalf(sign(LL[k+1]-ao))==0.0); + +if(PB[k]==1){if(TestS==0){ + A:=A,aa;l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);"+"val(btex $\\alpha_"+aa+"$ etex);";aa:=aa+1;kk:=kk+1} +else{l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);";kk:=kk+1}}; +} -if(NL>nz){for(k:=0;k<NL-1;k++){TestS:=(sign(evalf(LL[k]-ao))==sign(evalf(LL[k+1]-ao))) or (sign(evalf(LL[k]-ao))==0.0)or (sign(evalf(LL[k+1]-ao))==0.0); -TestL:=(abs(LL[k])==abs(LL[k+1])); -if(TestS==0){ if( TestL==1 ){l0:=l0}else{ -A:=A,aa;l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);"+"val(btex $\\alpha_"+aa+"$ etex);";aa:=aa+1;kk:=kk+1}}else{l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);";kk:=kk+1}} -l0:=l0+"val(btex $"+latex(Z[nz-1])+"$ etex); -"}; + l0:=l0+"val(btex $"+latex(Z[nz-1])+"$ etex);" + }; -TestS:=(sign(evalf(LL[0]-ao))==sign(evalf(LL[1]-ao))) or (sign(evalf(LL[0]-ao))==0.0) or (sign(evalf(LL[1]-ao))==0.0); +TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))==0.0) or (evalf(sign(LL[1]-ao))==0.0); k0:= evalf(limit(f(x),x=Z[0],1))> evalf(limit(f(x),x=Z[1],-1)); kz:=evalf(limit(f(x),x=Z[nz-1],-1))> evalf(limit(f(x),x=Z[nz-2],1)); lsi:=lsic+nom+"'("+nomv+")}$ etex);"+ - if(Z[0]==-infinity){if(sign(evalf(fp(if(Z[1]==+infinity){0}else{Z[1]-10^(-5)})))==1){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){ + if(Z[0]==-infinity){if(evalf(sign(fp(if(Z[1]==+infinity){0}else{Z[1]-10^(-5)})))==1){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){ if(fp(Z[0])==0){"valBarre(btex 0 etex);"}else{" "}+ if(sign(fp((Z[0]+10^(-3))))==1){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ if(sign(fp(10^(-3)+Z[0]))==1){"plus;"}else{"moins;"} }}+if(TestS==0){"valBarre(btex$ $ etex);"+ if(sign(fp(10^(-3)+Z[0]))==1){"plus;"}else{"moins;"}}else{" "}; @@ -1431,28 +1458,33 @@ lsi:=lsic+nom+"'("+nomv+")}$ etex);"+ - -if(nz>2){rr:=1; if(nz==NL){for(r:=1; r<=NL-2;r++){ TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0); +if(nz>2){rr:=1; if(nz==NL){for(r:=1; r<=NL-2;r++){ TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); ksp:=evalf(fp(Z[r]+0.01))>0; TestL:=(abs(LL[r])==abs(LL[r+1])); lsp:=lsp+if(member(Z[r],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ if(ksp==1){"plus;"}else{"moins;"}+if(TestS==0){"valBarre(btex $ $ etex);"}else{" "}+if(TestS==0){if(ksp==1){"plus;"}else{"moins;"}}else{" "}; - }} -else{for(r:=1; r<=NL-2;r++){kspp:=evalf(fp(Z[rr]+0.01))>0;TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0); - TestL:=(abs(LL[r])==abs(LL[r+1])); - if(TestS==0){if( TestL==1 ){lsp:=lsp}else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ + }} +else{for(r:=1; r<=NL-2;r++){kspp:=evalf(fp(Z[rr]+0.01))>0;TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); + + if(PB[r]==1){if(TestS==0){lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ if(kspp==1){"plus;"}else{"moins;"}+"valBarre(btex $ $ etex);"+if(kspp==1){"plus;"}else{"moins;"};rr:=rr+1;} - } else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ + else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ if(kspp==1){"plus;"}else{"moins;"};rr:=rr+1;} -}} - }; +}}}}; + + + + + lsf:=if(member(Z[nz-1],F)==0){" "}else{"nonDefBarre;"} -lsf:=if(member(Z[nz-1],F)==0){""}else{"nonDefBarre;"} lm0:=limit(f(x),x=Z[0],1)==-infinity; -TestS:=(sign(evalf(LL[0]-ao))==sign(evalf(LL[1]-ao))) or (sign(evalf(LL[0]-ao))==0.0) or (sign(evalf(LL[1]-ao))==0.0); + + + +TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))==0.0) or (evalf(sign(LL[1]-ao))==0.0); li:=lvic+nom+"}$ etex); "+ if(member(Z[0],F)==0){"valPos(btex $"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$ etex,"} @@ -1460,43 +1492,44 @@ TestS:=(sign(evalf(LL[0]-ao))==sign(evalf(LL[1]-ao))) or (sign(evalf(LL[0]-ao))= if(k0==1){"1);"}else{"0);"}+if(TestS==0){"valPos(btex $ "+ao+" $ etex,0.5);"}else{" "}; - if(nz>2){if(nz==NL){for(r:=1; r<=nz-2;r++){TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0); + if(nz>2){if(nz==NL){for(r:=1; r<=nz-2;r++){TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); krm:=evalf(limit(f(x),x=Z[r-1],1))< evalf(limit(f(x),x=Z[r],-1)); krp:=evalf(limit(f(x),x=Z[r],1))> evalf(limit(f(x),x=Z[r+1],-1)) ; lmrm:=limit(f(x),x=Z[r],-1)==-infinity;lmrp:=limit(f(x),x=Z[r],1)==-infinity; lp:=lp+if(member(Z[r],F)) { "limGauche(btex $"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],-1)))}+"$ etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex $"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],1)))}+"$ etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex $"+latex(simplify(f(Z[r])))+"$ - etex,"+if(sign(evalf(fp(Z[r]-0.01)))==sign(fp(Z[r]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+if(TestS==0){"valPos(btex + etex,"+if(evalf(sign(fp(Z[r]-0.01)))==sign(fp(Z[r]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+if(TestS==0){"valPos(btex $ "+ao+" $ etex,0.5);" }else{" "}; -};//for -}else{rr:=1;for(r:=1; r<=NL-2;r++){TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0); +};//for +}else{rr:=1;for(r:=1; r<=NL-2;r++){TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); krm:=evalf(limit(f(x),x=Z[rr-1],1))< evalf(limit(f(x),x=Z[rr],-1)); krp:=evalf(limit(f(x),x=Z[rr],1))> evalf(limit(f(x),x=Z[rr+1],-1)) ; lmrm:=limit(f(x),x=Z[rr],-1)==-infinity;lmrp:=limit(f(x),x=Z[rr],1)==-infinity; TestL:=(abs(LL[r])==abs(LL[r+1])); -if(TestS==0){if( TestL==1 ){lp:=lp}else{ lp:=lp+if(member(Z[rr],F)) { + +if(PB[r]==1){if(TestS==0){lp:=lp+if(member(Z[rr],F)){ "limGauche(btex $"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$ etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex $"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$ etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex $"+latex(simplify(f(Z[rr])))+"$ - etex,"+if(sign(evalf(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+"valPos(btex + etex,"+if(evalf(sign(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+"valPos(btex $ "+ao+" $ etex,0.5); ";rr:=rr+1; -}// else testL==1 -}//testS==0 +}// testS==0 else{lp:=lp+if(member(Z[rr],F)){ "limGauche(btex $"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$ etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex $"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$ etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex $"+latex(simplify(f(Z[rr])))+"$ - etex,"+if(sign(evalf(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0); + etex,"+if(evalf(sign(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0); "}}};rr:=rr+1; }//else testS==0 +}//PB[r]==1 }//for nz<NL }// else nz<NL //if nz=NL };//if nz>2 -lnz:=limit(f(x),x=Z[nz-1],-1)==-infinity; +lnz:=limit(f(x),x=Z[nz-1],-1)==-infinity; lf:=if(member(Z[nz-1],F)==0){"valPos(btex $"+ @@ -1505,7 +1538,7 @@ lf:=if(member(Z[nz-1],F)==0){"valPos(btex $"+ else{"limGauche(btex $"+ if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$ etex,"+ if(kz==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}}; - + @@ -1562,6 +1595,7 @@ endTableau; + sortie:=fopen("XCasmpfc.mp"); fprint(sortie,Unquoted,MetaLfc); fclose(sortie); @@ -1571,6 +1605,7 @@ fclose(sortie); + \end{VerbatimOut} diff --git a/Master/texmf-dist/tex/latex/tablor/tablor.sty b/Master/texmf-dist/tex/latex/tablor/tablor.sty index 60410882ba1..a8b81775251 100644 --- a/Master/texmf-dist/tex/latex/tablor/tablor.sty +++ b/Master/texmf-dist/tex/latex/tablor/tablor.sty @@ -1,5 +1,5 @@ \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{tablor}[24/11/2008 v4.02b la machine a creer des tableaux de signes et variations] +\ProvidesPackage{tablor}[29/01/2009 v4.02c la machine a creer des tableaux de signes et variations] % \copyleft Connan le Barbare (aka Guillaume Connan) \copyright % This work may be distributed and/or mofified under the conditions @@ -1112,31 +1112,38 @@ l0:=" newLigneVariables(btex $"+nomv+"$ etex);";lp:=" "; lf:=" ";lsp:=" "; LI:=limit(f(x),x,Z[0],1); LF:=limit(f(x),x,Z[nz-1],-1); LP:=NULL; -if(nz>2){ for(r:=1; r<=nz-2;r++){LP:=LP,if(member(Z[r],F)){limit(f(x),x,Z[r],-1),limit(f(x),x,Z[r],1)}else{f(Z[r])}}}; -if(nz>2){ LL:=[LI,LP,LF]}else{LL:=[LI,LF]}; +PB:=1; +if(nz>2){ for(r:=1; r<=nz-2;r++){LP:=LP,if(member(Z[r],F)){limit(f(x),x,Z[r],-1),limit(f(x),x,Z[r],1)}else{f(Z[r])};if(member(Z[r],F)){PB:=PB,0,1}}}; +if(nz>2){ LL:=[LI,LP,LF]; PB:=[PB,1]}else{LL:=[LI,LF];PB:=[1,1]}; NL:=size(LL); -A:=NULL;aa:=1;kk:=0; +A:=NULL;aa:=1; +kk:=0; -if(NL==nz){for(k:=0;k<nz-1;k++){TestS:=(sign(evalf(LL[k]-ao))==sign(evalf(LL[k+1]-ao))) or (sign(evalf(LL[k]-ao))==0.0)or (sign(evalf(LL[k+1]-ao))==0.0); + + +if(NL==nz){for(k:=0;k<nz-1;k++){TestS:=(evalf(sign(LL[k]-ao))==evalf(sign(LL[k+1]-ao))) or (evalf(sign(LL[k]-ao))==0.0)or (evalf(sign(LL[k+1]-ao))==0.0); if(TestS==0){A:=A,aa;l0:=l0+"val(btex $"+latex(Z[k])+"$ etex);"+"val(btex $\\alpha_"+aa+"$ etex);";aa:=aa+1;}else{l0:=l0+"val(btex $"+latex(Z[k])+"$ etex);"}} l0:=l0+"val(btex $"+latex(Z[nz-1])+"$ etex);"}; +//chgmt NL->nz +if(NL>nz){for(k:=0;k<NL-1;k++){TestS:=(evalf(sign(LL[k]-ao))==evalf(sign(LL[k+1]-ao))) or (evalf(sign(LL[k]-ao))==0.0)or (evalf(sign(LL[k+1]-ao))==0.0); + +if(PB[k]==1){if(TestS==0){ + A:=A,aa;l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);"+"val(btex $\\alpha_"+aa+"$ etex);";aa:=aa+1;kk:=kk+1} +else{l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);";kk:=kk+1}}; +} -if(NL>nz){for(k:=0;k<NL-1;k++){TestS:=(sign(evalf(LL[k]-ao))==sign(evalf(LL[k+1]-ao))) or (sign(evalf(LL[k]-ao))==0.0)or (sign(evalf(LL[k+1]-ao))==0.0); -TestL:=(abs(LL[k])==abs(LL[k+1])); -if(TestS==0){ if( TestL==1 ){l0:=l0}else{ -A:=A,aa;l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);"+"val(btex $\\alpha_"+aa+"$ etex);";aa:=aa+1;kk:=kk+1}}else{l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);";kk:=kk+1}} -l0:=l0+"val(btex $"+latex(Z[nz-1])+"$ etex); -"}; + l0:=l0+"val(btex $"+latex(Z[nz-1])+"$ etex);" + }; -TestS:=(sign(evalf(LL[0]-ao))==sign(evalf(LL[1]-ao))) or (sign(evalf(LL[0]-ao))==0.0) or (sign(evalf(LL[1]-ao))==0.0); +TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))==0.0) or (evalf(sign(LL[1]-ao))==0.0); k0:= evalf(limit(f(x),x=Z[0],1))> evalf(limit(f(x),x=Z[1],-1)); kz:=evalf(limit(f(x),x=Z[nz-1],-1))> evalf(limit(f(x),x=Z[nz-2],1)); lsi:=lsic+nom+"'("+nomv+")}$ etex);"+ - if(Z[0]==-infinity){if(sign(evalf(fp(if(Z[1]==+infinity){0}else{Z[1]-10^(-5)})))==1){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){ + if(Z[0]==-infinity){if(evalf(sign(fp(if(Z[1]==+infinity){0}else{Z[1]-10^(-5)})))==1){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){ if(fp(Z[0])==0){"valBarre(btex 0 etex);"}else{" "}+ if(sign(fp((Z[0]+10^(-3))))==1){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ if(sign(fp(10^(-3)+Z[0]))==1){"plus;"}else{"moins;"} }}+if(TestS==0){"valBarre(btex$ $ etex);"+ if(sign(fp(10^(-3)+Z[0]))==1){"plus;"}else{"moins;"}}else{" "}; @@ -1144,28 +1151,33 @@ lsi:=lsic+nom+"'("+nomv+")}$ etex);"+ - -if(nz>2){rr:=1; if(nz==NL){for(r:=1; r<=NL-2;r++){ TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0); +if(nz>2){rr:=1; if(nz==NL){for(r:=1; r<=NL-2;r++){ TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); ksp:=evalf(fp(Z[r]+0.01))>0; TestL:=(abs(LL[r])==abs(LL[r+1])); lsp:=lsp+if(member(Z[r],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ if(ksp==1){"plus;"}else{"moins;"}+if(TestS==0){"valBarre(btex $ $ etex);"}else{" "}+if(TestS==0){if(ksp==1){"plus;"}else{"moins;"}}else{" "}; - }} -else{for(r:=1; r<=NL-2;r++){kspp:=evalf(fp(Z[rr]+0.01))>0;TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0); - TestL:=(abs(LL[r])==abs(LL[r+1])); - if(TestS==0){if( TestL==1 ){lsp:=lsp}else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ + }} +else{for(r:=1; r<=NL-2;r++){kspp:=evalf(fp(Z[rr]+0.01))>0;TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); + + if(PB[r]==1){if(TestS==0){lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ if(kspp==1){"plus;"}else{"moins;"}+"valBarre(btex $ $ etex);"+if(kspp==1){"plus;"}else{"moins;"};rr:=rr+1;} - } else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ + else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ if(kspp==1){"plus;"}else{"moins;"};rr:=rr+1;} -}} - }; +}}}}; + + + + + lsf:=if(member(Z[nz-1],F)==0){" "}else{"nonDefBarre;"} -lsf:=if(member(Z[nz-1],F)==0){""}else{"nonDefBarre;"} lm0:=limit(f(x),x=Z[0],1)==-infinity; -TestS:=(sign(evalf(LL[0]-ao))==sign(evalf(LL[1]-ao))) or (sign(evalf(LL[0]-ao))==0.0) or (sign(evalf(LL[1]-ao))==0.0); + + + +TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))==0.0) or (evalf(sign(LL[1]-ao))==0.0); li:=lvic+nom+"}$ etex); "+ if(member(Z[0],F)==0){"valPos(btex $"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$ etex,"} @@ -1173,41 +1185,43 @@ TestS:=(sign(evalf(LL[0]-ao))==sign(evalf(LL[1]-ao))) or (sign(evalf(LL[0]-ao))= if(k0==1){"1);"}else{"0);"}+if(TestS==0){"valPos(btex $ "+ao+" $ etex,0.5);"}else{" "}; - if(nz>2){if(nz==NL){for(r:=1; r<=nz-2;r++){TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0); + if(nz>2){if(nz==NL){for(r:=1; r<=nz-2;r++){TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); krm:=evalf(limit(f(x),x=Z[r-1],1))< evalf(limit(f(x),x=Z[r],-1)); krp:=evalf(limit(f(x),x=Z[r],1))> evalf(limit(f(x),x=Z[r+1],-1)) ; lmrm:=limit(f(x),x=Z[r],-1)==-infinity;lmrp:=limit(f(x),x=Z[r],1)==-infinity; lp:=lp+if(member(Z[r],F)) { "limGauche(btex $"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],-1)))}+"$ etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex $"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],1)))}+"$ etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex $"+latex(simplify(f(Z[r])))+"$ - etex,"+if(sign(evalf(fp(Z[r]-0.01)))==sign(fp(Z[r]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+if(TestS==0){"valPos(btex + etex,"+if(evalf(sign(fp(Z[r]-0.01)))==sign(fp(Z[r]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+if(TestS==0){"valPos(btex $ "+ao+" $ etex,0.5);" }else{" "}; -};//for -}else{rr:=1;for(r:=1; r<=NL-2;r++){TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0); +};//for +}else{rr:=1;for(r:=1; r<=NL-2;r++){TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); krm:=evalf(limit(f(x),x=Z[rr-1],1))< evalf(limit(f(x),x=Z[rr],-1)); krp:=evalf(limit(f(x),x=Z[rr],1))> evalf(limit(f(x),x=Z[rr+1],-1)) ; lmrm:=limit(f(x),x=Z[rr],-1)==-infinity;lmrp:=limit(f(x),x=Z[rr],1)==-infinity; TestL:=(abs(LL[r])==abs(LL[r+1])); -if(TestS==0){if( TestL==1 ){lp:=lp}else{ lp:=lp+if(member(Z[rr],F)) { + +if(PB[r]==1){if(TestS==0){lp:=lp+if(member(Z[rr],F)){ "limGauche(btex $"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$ etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex $"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$ etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex $"+latex(simplify(f(Z[rr])))+"$ - etex,"+if(sign(evalf(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+"valPos(btex + etex,"+if(evalf(sign(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+"valPos(btex $ "+ao+" $ etex,0.5); ";rr:=rr+1; -}// else testL==1 -}//testS==0 +}// testS==0 else{lp:=lp+if(member(Z[rr],F)){ "limGauche(btex $"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$ etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex $"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$ etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex $"+latex(simplify(f(Z[rr])))+"$ - etex,"+if(sign(evalf(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0); + etex,"+if(evalf(sign(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0); "}}};rr:=rr+1; }//else testS==0 +}//PB[r]==1 }//for nz<NL }// else nz<NL //if nz=NL };//if nz>2 + lnz:=limit(f(x),x=Z[nz-1],-1)==-infinity; @@ -1217,7 +1231,10 @@ lf:=if(member(Z[nz-1],F)==0){"valPos(btex $"+ else{"limGauche(btex $"+ if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$ etex,"+ if(kz==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}}; - + + + + @@ -1271,6 +1288,10 @@ endTableau; + + + + sortie:=fopen("XCasmpfc.mp"); fprint(sortie,Unquoted,MetaLfc); fclose(sortie); @@ -1298,7 +1319,6 @@ fclose(sortie); \begin{VerbatimOut}{XcasTVIapp.cxx} - TVIapp(L,F,nom,nomv,f,ftt,ao,nmr):={ @@ -1313,10 +1333,10 @@ nz:=size(z); S:=NULL; -if(L==[-infinity,+infinity]){j:=[seq(-100+k,k=0..200)]minus F;for k in j do S:=S,fsolve(fp(x),x,k/10,newton_solver);end_for} -else{if(L[0]==-infinity){j:=[seq(k,k=100..floor(L[1]))] minus F;for k in j do S:=S,fsolve(fp(x),x,k/10,newton_solver);end_for} -else{if(L[1]==+infinity){j:=[seq(k,k=floor(L[0])..100)] minus F;for k in j do S:=S,fsolve(fp(x),x,k/10,newton_solver);end_for;} -else{ j:=[seq(k,k=floor(z[0])..floor(z[nz-1]))] minus F;for k in j do S:=S,fsolve(fp(x),x,k/10,newton_solver);end_for; }}}; +if(L==[-infinity,+infinity]){j:=[seq(-100+k,k=0..200)]minus F;for k in j do S:=S,resoudre_numerique(fp(x),x,k/10,newton_solver);end_for} +else{if(L[0]==-infinity){j:=[seq(k,k=100..floor(L[1]))] minus F;for k in j do S:=S,resoudre_numerique(fp(x),x,k/10,newton_solver);end_for} +else{if(L[1]==+infinity){j:=[seq(k,k=floor(L[0])..100)] minus F;for k in j do S:=S,resoudre_numerique(fp(x),x,k/10,newton_solver);end_for;} +else{ j:=[seq(k,k=floor(z[0])..floor(z[nz-1]))] minus F;for k in j do S:=S,resoudre_numerique(fp(x),x,k/10,newton_solver);end_for; }}}; @@ -1362,31 +1382,37 @@ l0:=" newLigneVariables(btex $"+nomv+"$ etex);";lp:=" "; lf:=" ";lsp:=" "; LI:=limit(f(x),x,Z[0],1); LF:=limit(f(x),x,Z[nz-1],-1); LP:=NULL; -if(nz>2){ for(r:=1; r<=nz-2;r++){LP:=LP,if(member(Z[r],F)){limit(f(x),x,Z[r],-1),limit(f(x),x,Z[r],1)}else{f(Z[r])}}}; -if(nz>2){ LL:=[LI,LP,LF]}else{LL:=[LI,LF]}; +PB:=1; +if(nz>2){ for(r:=1; r<=nz-2;r++){LP:=LP,if(member(Z[r],F)){limit(f(x),x,Z[r],-1),limit(f(x),x,Z[r],1)}else{f(Z[r])};if(member(Z[r],F)){PB:=PB,0,1}}}; +if(nz>2){ LL:=[LI,LP,LF]; PB:=[PB,1]}else{LL:=[LI,LF];PB:=[1,1]}; NL:=size(LL); -A:=NULL;aa:=1;kk:=0; +A:=NULL;aa:=1; +kk:=0; + -if(NL==nz){for(k:=0;k<nz-1;k++){TestS:=(sign(evalf(LL[k]-ao))==sign(evalf(LL[k+1]-ao))) or (sign(evalf(LL[k]-ao))==0.0)or (sign(evalf(LL[k+1]-ao))==0.0); +if(NL==nz){for(k:=0;k<nz-1;k++){TestS:=(evalf(sign(LL[k]-ao))==evalf(sign(LL[k+1]-ao))) or (evalf(sign(LL[k]-ao))==0.0)or (evalf(sign(LL[k+1]-ao))==0.0); if(TestS==0){A:=A,aa;l0:=l0+"val(btex $"+latex(Z[k])+"$ etex);"+"val(btex $\\alpha_"+aa+"$ etex);";aa:=aa+1;}else{l0:=l0+"val(btex $"+latex(Z[k])+"$ etex);"}} l0:=l0+"val(btex $"+latex(Z[nz-1])+"$ etex);"}; +//chgmt NL->nz +if(NL>nz){for(k:=0;k<NL-1;k++){TestS:=(evalf(sign(LL[k]-ao))==evalf(sign(LL[k+1]-ao))) or (evalf(sign(LL[k]-ao))==0.0)or (evalf(sign(LL[k+1]-ao))==0.0); + +if(PB[k]==1){if(TestS==0){ + A:=A,aa;l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);"+"val(btex $\\alpha_"+aa+"$ etex);";aa:=aa+1;kk:=kk+1} +else{l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);";kk:=kk+1}}; +} -if(NL>nz){for(k:=0;k<NL-1;k++){TestS:=(sign(evalf(LL[k]-ao))==sign(evalf(LL[k+1]-ao))) or (sign(evalf(LL[k]-ao))==0.0)or (sign(evalf(LL[k+1]-ao))==0.0); -TestL:=(abs(LL[k])==abs(LL[k+1])); -if(TestS==0){ if( TestL==1 ){l0:=l0}else{ -A:=A,aa;l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);"+"val(btex $\\alpha_"+aa+"$ etex);";aa:=aa+1;kk:=kk+1}}else{l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);";kk:=kk+1}} -l0:=l0+"val(btex $"+latex(Z[nz-1])+"$ etex); -"}; + l0:=l0+"val(btex $"+latex(Z[nz-1])+"$ etex);" + }; -TestS:=(sign(evalf(LL[0]-ao))==sign(evalf(LL[1]-ao))) or (sign(evalf(LL[0]-ao))==0.0) or (sign(evalf(LL[1]-ao))==0.0); +TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))==0.0) or (evalf(sign(LL[1]-ao))==0.0); k0:= evalf(limit(f(x),x=Z[0],1))> evalf(limit(f(x),x=Z[1],-1)); kz:=evalf(limit(f(x),x=Z[nz-1],-1))> evalf(limit(f(x),x=Z[nz-2],1)); lsi:=lsic+nom+"'("+nomv+")}$ etex);"+ - if(Z[0]==-infinity){if(sign(evalf(fp(if(Z[1]==+infinity){0}else{Z[1]-10^(-5)})))==1){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){ + if(Z[0]==-infinity){if(evalf(sign(fp(if(Z[1]==+infinity){0}else{Z[1]-10^(-5)})))==1){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){ if(fp(Z[0])==0){"valBarre(btex 0 etex);"}else{" "}+ if(sign(fp((Z[0]+10^(-3))))==1){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ if(sign(fp(10^(-3)+Z[0]))==1){"plus;"}else{"moins;"} }}+if(TestS==0){"valBarre(btex$ $ etex);"+ if(sign(fp(10^(-3)+Z[0]))==1){"plus;"}else{"moins;"}}else{" "}; @@ -1394,28 +1420,33 @@ lsi:=lsic+nom+"'("+nomv+")}$ etex);"+ - -if(nz>2){rr:=1; if(nz==NL){for(r:=1; r<=NL-2;r++){ TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0); +if(nz>2){rr:=1; if(nz==NL){for(r:=1; r<=NL-2;r++){ TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); ksp:=evalf(fp(Z[r]+0.01))>0; TestL:=(abs(LL[r])==abs(LL[r+1])); lsp:=lsp+if(member(Z[r],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ if(ksp==1){"plus;"}else{"moins;"}+if(TestS==0){"valBarre(btex $ $ etex);"}else{" "}+if(TestS==0){if(ksp==1){"plus;"}else{"moins;"}}else{" "}; - }} -else{for(r:=1; r<=NL-2;r++){kspp:=evalf(fp(Z[rr]+0.01))>0;TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0); - TestL:=(abs(LL[r])==abs(LL[r+1])); - if(TestS==0){if( TestL==1 ){lsp:=lsp}else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ + }} +else{for(r:=1; r<=NL-2;r++){kspp:=evalf(fp(Z[rr]+0.01))>0;TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); + + if(PB[r]==1){if(TestS==0){lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ if(kspp==1){"plus;"}else{"moins;"}+"valBarre(btex $ $ etex);"+if(kspp==1){"plus;"}else{"moins;"};rr:=rr+1;} - } else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ + else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ if(kspp==1){"plus;"}else{"moins;"};rr:=rr+1;} -}} - }; +}}}}; + + + + + lsf:=if(member(Z[nz-1],F)==0){" "}else{"nonDefBarre;"} -lsf:=if(member(Z[nz-1],F)==0){""}else{"nonDefBarre;"} lm0:=limit(f(x),x=Z[0],1)==-infinity; -TestS:=(sign(evalf(LL[0]-ao))==sign(evalf(LL[1]-ao))) or (sign(evalf(LL[0]-ao))==0.0) or (sign(evalf(LL[1]-ao))==0.0); + + + +TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))==0.0) or (evalf(sign(LL[1]-ao))==0.0); li:=lvic+nom+"}$ etex); "+ if(member(Z[0],F)==0){"valPos(btex $"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$ etex,"} @@ -1423,43 +1454,44 @@ TestS:=(sign(evalf(LL[0]-ao))==sign(evalf(LL[1]-ao))) or (sign(evalf(LL[0]-ao))= if(k0==1){"1);"}else{"0);"}+if(TestS==0){"valPos(btex $ "+ao+" $ etex,0.5);"}else{" "}; - if(nz>2){if(nz==NL){for(r:=1; r<=nz-2;r++){TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0); + if(nz>2){if(nz==NL){for(r:=1; r<=nz-2;r++){TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); krm:=evalf(limit(f(x),x=Z[r-1],1))< evalf(limit(f(x),x=Z[r],-1)); krp:=evalf(limit(f(x),x=Z[r],1))> evalf(limit(f(x),x=Z[r+1],-1)) ; lmrm:=limit(f(x),x=Z[r],-1)==-infinity;lmrp:=limit(f(x),x=Z[r],1)==-infinity; lp:=lp+if(member(Z[r],F)) { "limGauche(btex $"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],-1)))}+"$ etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex $"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],1)))}+"$ etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex $"+latex(simplify(f(Z[r])))+"$ - etex,"+if(sign(evalf(fp(Z[r]-0.01)))==sign(fp(Z[r]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+if(TestS==0){"valPos(btex + etex,"+if(evalf(sign(fp(Z[r]-0.01)))==sign(fp(Z[r]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+if(TestS==0){"valPos(btex $ "+ao+" $ etex,0.5);" }else{" "}; -};//for -}else{rr:=1;for(r:=1; r<=NL-2;r++){TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0); +};//for +}else{rr:=1;for(r:=1; r<=NL-2;r++){TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); krm:=evalf(limit(f(x),x=Z[rr-1],1))< evalf(limit(f(x),x=Z[rr],-1)); krp:=evalf(limit(f(x),x=Z[rr],1))> evalf(limit(f(x),x=Z[rr+1],-1)) ; lmrm:=limit(f(x),x=Z[rr],-1)==-infinity;lmrp:=limit(f(x),x=Z[rr],1)==-infinity; TestL:=(abs(LL[r])==abs(LL[r+1])); -if(TestS==0){if( TestL==1 ){lp:=lp}else{ lp:=lp+if(member(Z[rr],F)) { + +if(PB[r]==1){if(TestS==0){lp:=lp+if(member(Z[rr],F)){ "limGauche(btex $"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$ etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex $"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$ etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex $"+latex(simplify(f(Z[rr])))+"$ - etex,"+if(sign(evalf(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+"valPos(btex + etex,"+if(evalf(sign(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+"valPos(btex $ "+ao+" $ etex,0.5); ";rr:=rr+1; -}// else testL==1 -}//testS==0 +}// testS==0 else{lp:=lp+if(member(Z[rr],F)){ "limGauche(btex $"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$ etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex $"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$ etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex $"+latex(simplify(f(Z[rr])))+"$ - etex,"+if(sign(evalf(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0); + etex,"+if(evalf(sign(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0); "}}};rr:=rr+1; }//else testS==0 +}//PB[r]==1 }//for nz<NL }// else nz<NL //if nz=NL };//if nz>2 -lnz:=limit(f(x),x=Z[nz-1],-1)==-infinity; +lnz:=limit(f(x),x=Z[nz-1],-1)==-infinity; lf:=if(member(Z[nz-1],F)==0){"valPos(btex $"+ @@ -1468,7 +1500,7 @@ lf:=if(member(Z[nz-1],F)==0){"valPos(btex $"+ else{"limGauche(btex $"+ if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$ etex,"+ if(kz==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}}; - + @@ -1525,6 +1557,7 @@ endTableau; + sortie:=fopen("XCasmpfc.mp"); fprint(sortie,Unquoted,MetaLfc); fclose(sortie); @@ -1534,8 +1567,8 @@ fclose(sortie); -\end{VerbatimOut} +\end{VerbatimOut} |