diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/tablor/tablor.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/tablor/tablor.sty | 226 |
1 files changed, 78 insertions, 148 deletions
diff --git a/Master/texmf-dist/tex/latex/tablor/tablor.sty b/Master/texmf-dist/tex/latex/tablor/tablor.sty index 50ca9ca3242..1221170e0ae 100644 --- a/Master/texmf-dist/tex/latex/tablor/tablor.sty +++ b/Master/texmf-dist/tex/latex/tablor/tablor.sty @@ -1,5 +1,8 @@ +% Last modified: <tablor.sty modifié par Guillaume Connan le dimanche 19 février 2012 à 18h 02min 15s> + + \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{tablor}[16/11/2010 v4.07-e la machine a creer des tableaux de signes et variations] +\ProvidesPackage{tablor}[19/02/2012 v4.07b 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 @@ -138,7 +141,7 @@ \ifthenelse{\boolean{windows}}% {\newcommand{\rem}{DEL } \newcommand{\cat}{TYPE } \newcommand{\cp}{COPY } \newcommand{\echod}{ECHO } - \newcommand{echof}{}}% + \newcommand{\echof}{ }}% {\newcommand{\rem}{rm }\newcommand{\cat}{cat } \newcommand{\cp}{cp } \newcommand{\echod}{echo "} \newcommand{\echof}{"}} @@ -318,8 +321,8 @@ pour m de 0 jusque nz-1 faire l0:=l0+"val(btex $"+latex(Z[m])+"$ etex); lsi:=lsic+nom+"'("+nomv+")}$ etex);"+ if(Z[0]==-infinity){if(sign(evalf(fp(if(Z[1]==+infinity){0}else{Z[1]-10^(-5)})))==1.0){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){ if(fp(Z[0])==0){"valBarre(btex 0 etex);"}else{" "}+ - if(evalf(sign(fp(Z[0]+10^(-5))))==1.0 or ((evalf(sign(fp(Z[0]+10^(-5))))==0.0)and (evalf(sign(fp(Z[0]+10^(-1))))==1.0))){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ - if(evalf(sign(fp(Z[0]+10^(-5))))==1.0 or ((evalf(sign(fp(Z[0]+10^(-5))))==0.0)and (evalf(sign(fp(Z[0]+10^(-1))))==1.0))){"plus;"}else{"moins;"} }} + if(evalf(sign(fp(Z[0]+10^(-5))))==1.0){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ + if(evalf(sign(fp((Z[0]+10^(-5)))))==1.0){"plus;"}else{"moins;"} }} if(nz>2){ for(r:=1; r<=nz-2;r++){ ksp:=evalf(fp(Z[r]+0.1))>0; lsp:=lsp+if(member(Z[r],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ @@ -330,54 +333,33 @@ lsf:=if(member(Z[nz-1],F)==0){""}else{"nonDefBarre; "} lm0:=limit(f(x),x=Z[0],1)==-infinity; 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,"} - else{"nonDefBarre;limDroite(btex $"+ - if(lm0==1){"-\\infty"} - else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$ etex,"}+ -if(k0==1){"1"}else{"0"}+");"; + if(member(Z[0],F)==0){"valPos(btex $"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$ etex,"} + else{"nonDefBarre;limDroite(btex $"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$ etex,"}+ + if(k0==1){"1"}else{"0"}+ + ");"; -if(nz>2){ for(r:=1; r<=nz-2;r++){ - 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(nz>2){ for(r:=1; r<=nz-2;r++){ 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); +"}}} + }; } lnz:=limit(f(x),x=Z[nz-1],-1)==-infinity; lf:=if(member(Z[nz-1],F)==0){"valPos(btex $"+ - if(lnz==1){"-\\infty"} - else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$ etex,"+ - if(kz==1){"1);"} - else{"0);"} -} - 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;"}}; + if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$ etex,"+ + if(kz==1){"1);"}else{"0);"}} + 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;"}}; @@ -448,14 +430,14 @@ fclose(sortie); -%%%%// +%%%% -%// -%// -%// TVPC : pour les fonctions prolongeables par continuité. -%%// -%%// +% +% +% TVPC : pour les fonctions prolongeables par continuité. +%% +%% @@ -508,11 +490,10 @@ nz:=size(Z); - si size(S)>0 alors - pour j de 0 jusque size(S)-1 faire - kk:=(evalf(S[j])>=evalf(L[0])) and (evalf(S[j])<=evalf(L[nl-1])); - if(kk==1){Z:=append(Z,simplify(S[j]))}; - fpour + si size(S)>0 alors pour j de 0 jusque size(S)-1 faire + kk:=(evalf(S[j])>=evalf(L[0])) and (evalf(S[j])<=evalf(L[nl-1])); + if(kk==1){Z:=append(Z,simplify(S[j]))}; + fpour fsi; @@ -521,88 +502,43 @@ Z:=sort([op(set[op(Z)])]); nz:=size(Z); l0:=" newLigneVariables(btex $"+nomv+"$ etex);";lp:=" "; lf:=" ";lsp:=" "; pour m de 0 jusque nz-1 faire l0:=l0+"val(btex $"+latex(Z[m])+"$ etex); -"; -fpour; +";fpour; -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)); - Deriv0:=type(evalf(limit((f(x)-limit(f(x),x=Z[0],1))/(x-Z[0]),x=Z[0],1)))==DOM_FLOAT; -Derivf:=type(evalf(limit((f(x)-limit(f(x),x=Z[nz-1],-1))/(x-Z[nz-1]),x=Z[nz-1],-1)))==DOM_FLOAT; -lsi:=lsic+nom+"'("+nomv+")}$ etex); -"+ - -if(Z[0]==-infinity){ - if(sign(evalf(fp( - if(Z[1]==+infinity){0} - else{Z[1]-10^(-5)})))==1.0){"plus; -"} - else{"moins;"}} - else{ - if(member(Z[0],FP)==0){ - if(fp(Z[0])==0){"valBarre(btex 0 etex); -"} - else{" "}+ - if(evalf(sign(fp(Z[0]+10^(-5))))==1.0 or ((evalf(sign(fp(Z[0]+10^(-5))))==0.0)and (evalf(sign(fp(Z[0]+10^(-1))))==1.0))){"plus; -"} - else{"moins; -"}} - else{ - if(Deriv0){"valBarre(btex $"+latex(limit((f(x)-limit(f(x),x=Z[0],1))/(x-Z[0]),x=Z[0],1))+"$ etex); -"}else{"nonDefBarre; -"}+ - if(evalf(sign(fp(Z[0]+10^(-5))))==1.0 or ((evalf(sign(fp(Z[0]+10^(-5))))==0.0)and (evalf(sign(fp(Z[0]+10^(-1))))==1.0))){"plus; -"} - else{"moins; -"} - } - } + 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.0){"plus;"}else{"moins;"}}else{if(member(Z[0],FP)==0){ + if(fp(Z[0])==0){"valBarre(btex 0 etex);"}else{" "}+ + if(evalf(sign(fp(Z[0]+10^(-5))))==1.0){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ + if(evalf(sign(fp((Z[0]+10^(-5)))))==1.0){"plus;"}else{"moins;"} }} -if(nz>2) { for(r:=1; r<=nz-2;r++){ - Derivr:=(type(evalf(limit((f(x)-limit(f(x),x=Z[r],1))/(x-Z[r]),x=Z[r],1)))==DOM_FLOAT) and (evalf(limit((f(x)-limit(f(x),x=Z[r],1))/(x-Z[r]),x=Z[r],1))==evalf(limit((f(x)-limit(f(x),x=Z[r],-1))/(x-Z[r]),x=Z[r],-1))); - ksp:=evalf(fp(Z[r]+0.1))>0; - lsp:=lsp+if(member(Z[r],FP)==0){"valBarre(btex 0 etex); -"}else{ - if(Derivr){"valBarre(btex $"+latex(limit((f(x)-limit(f(x),x=Z[r],1))/(x-Z[r]),x=Z[r],1))+"$ etex); -"}else{"nonDefBarre; -"}}+if(ksp==1){"plus; -"}else{"moins; -"} - }} +if(nz>2){ for(r:=1; r<=nz-2;r++){ ksp:=evalf(fp(Z[r]+0.1))>0; + lsp:=lsp+if(member(Z[r],FP)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ + if(ksp==1){"plus;"}else{"moins;"} + }; } -lsf:=if(member(Z[nz-1],FP)==0){""}else{ - if(Derivf){"valBarre(btex $"+latex(limit((f(x)-limit(f(x),x=Z[nz-1],-1))/(x-Z[nz-1]),x=Z[nz-1],-1))+"$ etex); -"}else{"nonDefBarre; +lsf:=if(member(Z[nz-1],FP)==0){""}else{"nonDefBarre; "} -} - lm0:=limit(f(x),x=Z[0],1)==-infinity; -li:=lvic+nom+"}$ etex); -"+ -if(member(Z[0],F)==0 or member(Z[0],FP)==1){"valPos(btex $"+ - if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$ etex,"} - else{"limDroite(btex $"+ - if(lm0==1){"-\\infty"} - else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$ etex,"}+ -if(k0==1){"1"}else{"0"}+");"; - -if(nz>2){ for(r:=1; r<=nz-2;r++){ - 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)){"valPos(btex $"+ - if(lmrm==1){"-\\infty"} - else{latex(simplify(limit(f(x),x=Z[r],-1)))}+"$ etex,"+ - if(sign(evalf(fp(Z[r]-0.01)))==sign(fp(Z[r]+0.01))){"0.5);"} - else{if(krm==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);"}}} + 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,"} + else{"limDroite(btex $"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$ etex,"}+ + if(k0==1){"1"}else{"0"}+ + ");"; + + if(nz>2){ for(r:=1; r<=nz-2;r++){ 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)){ + "valPos(btex + $"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],-1)))}+"$ + etex,"+if(krm==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); +"}}} }; } - lnz:=limit(f(x),x=Z[nz-1],-1)==-infinity; @@ -674,7 +610,7 @@ fprint(sortie,Unquoted,MetaLfc); fclose(sortie); - }:; + }:; \end{VerbatimOut} @@ -779,7 +715,7 @@ pour m de 0 jusque nz-1 faire l0:=l0+"val(btex $"+latex(Z[m])+"$ etex); lsi:=lsic+nom+"'("+nomv+")}$ etex);"+ if(member(Z[0],IMIN)!=0){if((member(Z[0],F)==0) and (fp(Z[0])!=undef)){"debutNonDef;"}else{"debutNonDefStrict;"}}else{if(Z[0]==-infinity){if(sign(evalf(fp(if(Z[1]==+infinity){0}else{Z[1]-10^(-5)})))==1.0){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){ if(fp(Z[0])==0){"valBarre(btex 0 etex);"}else{" "}+ - if(evalf(sign(fp(Z[0]+10^(-5))))==1.0 or ((evalf(sign(fp(Z[0]+10^(-5))))==0.0)and (evalf(sign(fp(Z[0]+10^(-1))))==1.0))){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ + if(evalf(sign(fp(Z[0]+10^(-5))))==1.0){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ if(evalf(sign(fp((Z[0]+10^(-5)))))==1.0){"plus;"}else{"moins;"} }}} @@ -948,7 +884,7 @@ fclose(sortie); \begin{VerbatimOut}{XcasTVapp.cxx} -TVapp(L,F,nom,nomv,f,ftt,trigo,nmr):={ +TVapp(L,F,nom,nomv,f,ftt,nmr):={ local nl,fp,z0,z,nz,S,k,j,m,kk,kok,Z,l0,lp,lf,lsp,k0,kz,lsi,r,ksp,lsf,lm0,li,krm,krp,lmrm,lmrp,lnz; nl:=size(L); @@ -963,10 +899,6 @@ S:=NULL; - - - - if(L==[-infinity,+infinity]){j:=[seq(-50+2*k,k=0..50)]minus F; for k in j do for(m:=-5;m<=5;m++){S:=S,resoudre_numerique(fp(y),y,k+m*0.1,k+(m+1)*0.1,bisection_solver)};end_for} else{if(L[0]==-infinity){j:=[seq(2*k,k=-25..0.5*floor(L[1]))] minus F; @@ -982,8 +914,6 @@ else{ j:=[seq(2*k,k=0.5*floor(z[0])..0.5*floor(z[nz-1]))] minus F; - - si size(S)>0 alors pour j de 0 jusque size(S)-1 faire kk:=(re(S[j])==S[j]);kok:=(evalf(S[j])>=L[0]) and (evalf(S[j])<=L[1]); if(kk==1){if(kok==1){z:=append(z,simplify(S[j]))}}; @@ -1022,7 +952,7 @@ pour m de 0 jusque nz-1 faire l0:=l0+"val(btex $"+latex(Z[m])+"$ etex); lsi:=lsic+nom+"'("+nomv+")}$ etex);"+ if(Z[0]==-infinity){if(sign(evalf(fp(if(Z[1]==+infinity){0}else{Z[1]-10^(-5)})))==1.0){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){ if(fp(Z[0])==0){"valBarre(btex 0 etex);"}else{" "}+ - if(evalf(sign(fp(Z[0]+10^(-5))))==1.0 or ((evalf(sign(fp(Z[0]+10^(-5))))==0.0)and (evalf(sign(fp(Z[0]+10^(-1))))==1.0))){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ + if(evalf(sign(fp(Z[0]+10^(-5))))==1.0){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ if(evalf(sign(fp((Z[0]+10^(-5)))))==1.0){"plus;"}else{"moins;"} }} if(nz>2){ for(r:=1; r<=nz-2;r++){ ksp:=evalf(fp(Z[r]+0.01))>0; @@ -2337,9 +2267,9 @@ newLigneVariables(btex $ {x}$ etex); if(mini!=-infinity and product(L[s](mini),s,0,n-1)==0){" valBarre(btex 0 etex);"}else{" "}+ - if(product(L[s](Z[0]-0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+"valBarre(btex 0 etex);"+ + if(product(L[s](evalf(Z[0])-0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+"valBarre(btex 0 etex);"+ lr+ - if(product(L[s](Z[nz-1]+0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+ + if(product(L[s](evalf(Z[nz-1])+0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+ if(maxi!=+infinity and product(L[s](maxi),s,0,n-1)==0){" valBarre(btex 0 etex);"}else{" "}+" @@ -2498,7 +2428,7 @@ for(p:=0;p<=n-1;p++){lp:=""; if(L[p]((Z[r]+Z[r+1])*.5)>0){"plus;"}else{"moins;"}}; li:=li+lp+ if(simplify(L[p](Z[nz-1]))==0){"valBarre(btex 0 etex);"}else{"barre;"}+ - if(L[p](Z[nz-1]+1.0)>0){"plus;"}else{"moins; + if(L[p](evalf(Z[nz-1])+1.0)>0){"plus;"}else{"moins; "}+if(maxi!=+infinity and L[p](maxi)==0){"valBarre(btex 0 etex);"}else{" "} }; @@ -2520,10 +2450,10 @@ newLigneVariables(btex $ {x}$ etex); + lsic+nomf+"(x)}$ etex);"+ if(member(mini,FF)==0){if((mini!=-infinity) and (product(L[s](mini),s,0,n-1)==0)){" valBarre(btex 0 etex);"}else{" "}}else{"nonDefBarre;"}+ - if(product(L[s](Z[0]-0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+ + if(product(L[s](evalf(Z[0])-0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+ if(member(Z[0],FF)==0){"valBarre(btex 0 etex);"}else{ "nonDefBarre;"}+ lr+ - if(product(L[s](Z[nz-1]+0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+ + if(product(L[s](evalf(Z[nz-1])+0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+ if(member(maxi,FF)==0){if((maxi!=+infinity) and (product(L[s](maxi),s,0,n-1)==0)){"valBarre(btex 0 etex);"}else{" "}}else{"nonDefBarre;"}+" endTableau; @@ -2939,7 +2869,7 @@ fclose(sortie); \immediate\write18{\echod drawoptions(withcolor(#1));\echof >> \nomtravail_Tab#2.mp} \immediate\write18{\echod initTableau;\echof >> \nomtravail_Tab#2.mp} \immediate\write18{\echod enddef;\echof >> \nomtravail_Tab#2.mp} -\immediate\write18{\cat XCasmpfc.mp >> \nomtravail_Tab#2.mp} % Inclusion du +\immediate\write18{\cat XCasmpfc.mp >> \nomtravail_Tab#2.mp}} % Inclusion du % source dans le % fichier % Tableaux @@ -2948,7 +2878,7 @@ fclose(sortie); % et creation du dernier. L'option % pallie l'absence de end en fin de % fichier -\immediate\write18{\rem \nomtravail_Tab#2.mp}} +\immediate\write18{\rem \nomtravail_Tab#2.mp} \begin{center} \includegraphics[scale=\echelle]{\nomtravail_Tab.\theTVn} |