summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tablor
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-02-19 23:33:14 +0000
committerKarl Berry <karl@freefriends.org>2012-02-19 23:33:14 +0000
commitbac65ea3dad99f06db99a3605e1e7c0f2a4181b7 (patch)
tree7c4393e09fdf0953c73d957f50b59ace665c3932 /Master/texmf-dist/tex/latex/tablor
parent5d46fc5377a1bf0b28d0407d84963f015aaa393a (diff)
tablor (19feb12)
git-svn-id: svn://tug.org/texlive/trunk@25433 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tablor')
-rw-r--r--Master/texmf-dist/tex/latex/tablor/tablor-xetex.sty201
-rw-r--r--Master/texmf-dist/tex/latex/tablor/tablor.sty226
2 files changed, 162 insertions, 265 deletions
diff --git a/Master/texmf-dist/tex/latex/tablor/tablor-xetex.sty b/Master/texmf-dist/tex/latex/tablor/tablor-xetex.sty
index e8053508653..a41e846c597 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}[16/11/2010 v4.07-d la machine a creer des
+\ProvidesPackage{tablor-xetex}[08/05/2010 v4.07 la machine a creer des
tableaux de signes et variations compatible xetex]
% \copyleft Connan le Barbare (aka Guillaume Connan) \copyright
@@ -275,19 +275,18 @@ epstopdf $1.eps;
-%%%//
-%//
-%%%// LES SCRIPTS GIAC/XCAS
-%//
-%%%//
-
+%%%
+%
+%%% LES SCRIPTS GIAC/XCAS
+%
+%%%
-%%//
-%%// Code giac/Xcas pour les Tableaux de Variations
-%//
+%%
+%% Code giac/Xcas pour les Tableaux de Variations
+%%
\begin{VerbatimOut}{XcasTV.cxx}
@@ -357,8 +356,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;"}+
@@ -466,14 +465,14 @@ fclose(sortie);
-%%%%//
+%%%%
-%//
-%//
-%// TVPC : pour les fonctions prolongeables par continuité.
-%%//
-%%//
+%
+%
+% TVPC : pour les fonctions prolongeables par continuité.
+%%
+%%
@@ -526,11 +525,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;
@@ -539,86 +537,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;
- 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;
@@ -690,7 +645,7 @@ fprint(sortie,Unquoted,MetaLfc);
fclose(sortie);
- }:;
+ }:;
\end{VerbatimOut}
@@ -795,11 +750,17 @@ 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;"} }}}
+
+
+
+
+
+
// modif 3 avril 2010
if(nz>2){ for(r:=1; r<=nz-2;r++){
@@ -824,6 +785,9 @@ if(nz>2){ for(r:=1; r<=nz-2;r++){
+
+
+
lsf:=if(member(Z[nz-1],IMAX)!=0){if((member(Z[nz-1],F)==0) and (fp(Z[nz-1])!=undef)){"finNonDef;"}else{"finNonDefStrict;"}}else{if(member(Z[nz-1],F)==0){""}else{"nonDefBarre;
"}}
@@ -964,8 +928,13 @@ fclose(sortie);
\begin{VerbatimOut}{XcasTVapp.cxx}
-TVapp(L,F,nom,nomv,f,ftt,trigo,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;
+
+
+
+
+
+TVapp(L,F,nom,nomv,f,ftt,nmr):={
+
nl:=size(L);
f:=unapply(f,x);
@@ -975,11 +944,10 @@ nz:=size(z);
-S:=NULL;
-
+S:=op(fsolve(fp(x),x));
@@ -1000,6 +968,7 @@ 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]))}};
@@ -1038,7 +1007,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;
@@ -1711,6 +1680,7 @@ S:=op(fsolve(fp(x),x));
+
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;
@@ -1730,11 +1700,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]))}};
@@ -2633,7 +2598,6 @@ fclose(sortie);
\begin{VerbatimOut}{XcasTSc.cxx}
-
TSc(g,D,F,trigo,nmr):={
f:=unapply(g,x);
mini:=D[0]; maxi:=D[1];lm:=" ";
@@ -2744,6 +2708,7 @@ fprint(sortie,Unquoted,MetaLfc);
fclose(sortie);
}:;
+
\end{VerbatimOut}
@@ -2752,6 +2717,8 @@ fclose(sortie);
+
+
%%$
@@ -2759,6 +2726,8 @@ fclose(sortie);
+
+
%%%%
%%%
%%% Pour des tableaux de variations simples sans fonctions
@@ -2872,14 +2841,12 @@ fclose(sortie);
+%%
+%% traitement des fichiers produits par giac/xcas
+%%
+%%
-
-%%//
-%%// traitement des fichiers produits par giac/xcas
-%%//
-%%//
-
-%// pour l'échelle des tableaux taper \ech{facteur de réduction}
+% pour l'échelle des tableaux taper \ech{facteur de réduction}
\newcommand\echelle{1}
\newcommand\ech[1]{\renewcommand\echelle{#1}}
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 fvrier 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}