From 44fd9c60eecdeb03f545d4c6199921b9ea71fa28 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 19 Mar 2009 16:39:05 +0000 Subject: tablor update (17mar09) git-svn-id: svn://tug.org/texlive/trunk@12434 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/tablor/tablor.html | 755 ++++++++++----------- Master/texmf-dist/doc/latex/tablor/tablor.pdf | Bin 391589 -> 391365 bytes Master/texmf-dist/doc/latex/tablor/tablor.tex | 4 +- .../texmf-dist/tex/latex/tablor/tablor-xetex.sty | 100 +-- Master/texmf-dist/tex/latex/tablor/tablor.sty | 91 +-- 5 files changed, 409 insertions(+), 541 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/tablor/tablor.html b/Master/texmf-dist/doc/latex/tablor/tablor.html index 46298e680db..82dfd03264f 100644 --- a/Master/texmf-dist/doc/latex/tablor/tablor.html +++ b/Master/texmf-dist/doc/latex/tablor/tablor.html @@ -87,7 +87,7 @@
 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesPackage{tablor}[07/03/2009 v4.04 la machine a creer des tableaux de signes et variations]
+\ProvidesPackage{tablor}[17/03/2009 v4.04-b 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
@@ -95,7 +95,7 @@
 % any later version. The latest version is in
 %   http://www.latex-project.org/lppl/
 % This work consists of the files tablor.sty, tablor-xetex.sty,  tablor.cfg, tablor.tex,
-% tablor.pdf and tablor.html
+% tablor.pdf and tablor.html
 
 
 %% Cree 16 environnements :
@@ -132,14 +132,14 @@
 % \end{TVZ}
 %
 %
-% tableau avec valeurs intermediares
+% tableau avec valeurs intermediares
 %\begin{TVI}
-%TVI([-1,+infinity],[-1],"f","x",x2/sqrt(x+1)-1,1,2,n,\tv)
+%TVI([-1,+infinity],[-1],"f","x",x2/sqrt(x+1)-1,1,2,n,\tv)
 %\end{TVI}
 %%%
-% tableau avec valeurs intermediares et racines exactes
+% tableau avec valeurs intermediares et racines exactes
 %\begin{TVIex}
-%TVIex([-1,+infinity],[-1],"f","x",x2/sqrt(x+1)-1,1,2,n,\tv)
+%TVIex([-1,+infinity],[-1],"f","x",x2/sqrt(x+1)-1,1,2,n,\tv)
 %\end{TVIex}
 %%%
 %
@@ -152,7 +152,7 @@
 %
 % tableau de variations avec f' sans zero formel
 %\begin{TVIapp}
-% TVIapp([0,+infinity],[0],"g","x",ln(x)-x*exp(2-x),1,0,\tv)
+% TVIapp([0,+infinity],[0],"g","x",ln(x)-x*exp(2-x),1,0,\tv)
 % \end{TVIapp}
 %
 %
@@ -161,7 +161,7 @@
 % fichier metapost pour le modifier
 %
 %
-% Courbes parametrees
+% Courbes parametrees
 %  \begin{TVP}
 %  TVP([-infinity,+infinity],[[-1,2],[-1]],["x","y"],"t",[t^2/((t+1)*(t-2)),t^2*(t+2)/(t+1)],1,n,\tv)
 %  \end{TVP}
@@ -189,18 +189,18 @@
 %% ne l'avez pas de base 
 
 
-\RequirePackage{filecontents}
+\RequirePackage{filecontents}
 \RequirePackage{ifthen}
 \RequirePackage{fancyvrb}
-\RequirePackage{ifpdf}
+\RequirePackage{ifpdf}
 
-\fvset{gobble=0}
+\fvset{gobble=0}
 
 % option xcas present 
 
 
-\newboolean{xcas}\setboolean{xcas}{false}
-\DeclareOption{xcas}{\setboolean{xcas}{true}}
+\newboolean{xcas}\setboolean{xcas}{false}
+\DeclareOption{xcas}{\setboolean{xcas}{true}}
 
 
 \ProcessOptions\relax
@@ -209,22 +209,22 @@
 
 
 %% Initialisation du choix d'OS
-\newboolean{windows}\setboolean{windows}{false}
+\newboolean{windows}\setboolean{windows}{false}
 
 
 
-%% on configure  tablor  dans un fichier exterieur pour la plateforme
+%% on configure  tablor  dans un fichier exterieur pour la plateforme
 %% et l'editeur
 
-\IfFileExists{tablor.cfg}{\input{tablor.cfg}}%\typeout{pas de fichier tablor.cfg}}
+\IfFileExists{tablor.cfg}{\input{tablor.cfg}}%\typeout{pas de fichier tablor.cfg}}
 
 
 %% Definit des commandes disque selon l'OS utilise
 \ifthenelse{\boolean{windows}}%
     {\newcommand{\rem}{DEL } \newcommand{\cat}{TYPE }
       \newcommand{\cp}{COPY }}%
-    {\newcommand{\rem}{rm }\newcommand{\cat}{cat }
-      \newcommand{\cp}{cp }}
+    {\newcommand{\rem}{rm }\newcommand{\cat}{cat }
+      \newcommand{\cp}{cp }}
 
 
 
@@ -235,18 +235,18 @@
 %% pour ceux compilant via pdflatex
 
 \ifpdf
-\DeclareGraphicsRule{*}{mps}{*}{}
+\DeclareGraphicsRule{*}{mps}{*}{}
 \fi
 
 %% pour nettoyer les fichiers auxiliaires
 
-\AtEndDocument{\immediate\write18{\rem *.user XCas* Xcas* *.mpx}
+\AtEndDocument{\immediate\write18{\rem *.user XCas* Xcas* *.mpx}
                          }
 
 
 
 
-%% Pour clore les fichiers metapost 
+%% Pour clore les fichiers metapost 
 
 
   \begin{VerbatimOut}{queue.mp}
@@ -264,7 +264,7 @@
 
 
 \newcommand{\nettoyer}[1][\jobname]%
-{\immediate\write18{\rem #1.Tab.log  queue.mp enteteMP.cfg session.tex config.cxx}
+{\immediate\write18{\rem #1.Tab.log  queue.mp enteteMP.cfg session.tex config.cxx}
 }
 
 
@@ -277,7 +277,7 @@
 
 %% initialise les compteurs
 
-\newcounter{TVn}
+\newcounter{TVn}
 \newcommand{\tv}{\theTVn}
 
 \newcounter{TVnbis}
@@ -285,7 +285,7 @@
 
 
 
-%% permet de donner un prefixe aux tableaux produits (\jobname par defaut)
+%% permet de donner un prefixe aux tableaux produits (\jobname par defaut)
 %% effectue quelques verifications :
 
 
@@ -294,16 +294,16 @@
 \setcounter{TVn}{0}%     Initialisation du compteur de tableaux.
 \ifthenelse{\boolean{xcas}}%    Avec l'option XCas
 {\IfFileExists{\nomtravail.Tab.mp}%      Si Tableaux.mp est present...
-        {\immediate\write18{\rem \nomtravail.Tab.mp}}%  le detruire
+        {\immediate\write18{\rem \nomtravail.Tab.mp}}%  le detruire
         {}%   
- \immediate\write18{\cp  enteteMP.cfg \nomtravail.Tab.mp}% Reconstituer l'entête de Tableaux.mp
+ \immediate\write18{\cp  enteteMP.cfg \nomtravail.Tab.mp}% Reconstituer l'entête de Tableaux.mp
 } 
 {\IfFileExists{\nomtravail.Tab.mp}%      Sans l'option XCas, si
                                 %      Tableaux.mp existe
 {\immediate\write18{mpost -interaction=batchmode \nomtravail.Tab}}% l'executer pour reconstituer les figures
 {\PackageWarning{tablor}{Pas de source metapost pour creer les tableaux.}}% sinon message d'erreur
                                 % (mais pas d'arret car les tableaux
-                                % peuvent être presents )
+                                % peuvent être presents )
 }}%
 
 
@@ -312,7 +312,7 @@
 
 \makeatletter
 \newcommand{\executGiacmp}[1]{%
-\ifthenelse{\boolean{windows}}%
+\ifthenelse{\boolean{windows}}%
 {\immediate\write18{giac #1 }}%
 {\immediate\write18{giac  <#1 }}}
 \makeatother
@@ -335,7 +335,7 @@
 
 
 \begin{VerbatimOut}{XcasTV.cxx}
-TV(L,F,nom,nomv,f,ftt,trigo,nmr):={
+TV(L,F,nom,nomv,f,ftt,trigo,nmr):={
 nl:=size(L);
 f:=unapply(f,x);
 fp:=function_diff(f);
@@ -347,13 +347,13 @@ if(trigo==t){
 all_trig_solutions:=1;
 reset_solve_counter(-1,-1);
 SS:=solve(factor(simplify(fp(x))),x);
-ns:=size(SS);
+ns:=size(SS);
 for(k:=0;k<ns;k++){
 m:=0;
 while(evalf(simplify(subst(SS[k],n_1=m)))<=evalf(L[nl-1])){
 S:=concat(S,simplify(subst(SS[k],n_1=m)));m:=m+1;
 };m:=-1;
-while(evalf(subst(SS[k],n_1=m))>=L[0]){
+while(evalf(subst(SS[k],n_1=m))>=L[0]){
 S:=concat(S,simplify(subst(SS[k],n_1=m)));m:=m-1;
 }
 }
@@ -366,14 +366,14 @@ S:=solve(fp(x),x);
                              qq:=member(simplify(S[j]),Z)==0;
                              kk:=(evalf(S[j])>=evalf(L[0])) and (evalf(S[j])<=evalf(L[nl-1]));
                           if(kk==1){if(qq==1){Z:=append(Z,simplify(S[j]))}};
-                          fpour
+                          fpour
   fsi;
 Z:=sort(Z);
 nz:=size(Z);
 
 
  tantque evalf(Z[0])==evalf(Z[1]) faire Z:=Z[1..nz-1];nz:=size(Z);
-     ftantque;
+     ftantque;
 
 
 
@@ -385,20 +385,15 @@ nz:=size(Z);
                              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;
+  fsi;
+
+
+Z:=sort([op(set[op(Z)])]);
 
-Z:=sort(Z); 
-nz:=size(Z);
- si Z[0]==Z[1] alors Z:=augment(Z[0],Z[2..nz-1]);nz:=nz-1; 
-     fsi;
-pour u de 1 jusque nz-2 faire 
-     si Z[u]==Z[u+1] alors Z:=augment(Z[0..u-1],Z[u+1..nz-1]);nz:=nz-1; 
-     fsi;
-fpour;
 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));
@@ -435,16 +430,16 @@ lm0:=limit(f(x),x=Z[0],1)==-infinity;
 "}}}
                                                    }; }
 
-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 $"+
+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 $"+
+    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(kz==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}};    
     
 
 
@@ -452,15 +447,15 @@ lf:=if(member(Z[nz-1],F)==0){"valPos(btex $"+
 
 MetaLfc:=if(ftt==2){if(nz>2){"
 
-beginTableau("+nmr+")"+
+beginTableau("+nmr+")"+
         l0+lsi+lsp+lsf+"
-endTableau;
+endTableau;
 
 ";}else{
-intro+"beginTableau("+nmr+")"+
+intro+"beginTableau("+nmr+")"+
         l0+
 lsi+lsf+"
-endTableau;
+endTableau;
 
 ";
 }
@@ -470,39 +465,39 @@ li+
 lp+
 lf
 +"
-endTableau;
+endTableau;
 
 ";}else{"beginTableau("+nmr+")"+
         l0+
 li+
-lf
+lf
 +"
-endTableau;
+endTableau;
 
 ";}}else{
 if(nz>2){"beginTableau("+nmr+")"+
         l0+
-lsi+lsp+lsf+
+lsi+lsp+lsf+
 li+
-lp+
+lp+
 lf
 +"
-endTableau;
+endTableau;
 
-";}else{"beginTableau("+nmr+")"+
+";}else{"beginTableau("+nmr+")"+
         l0+
 lsi+lsf+
 li+
-lf
+lf
 +"
-endTableau;
+endTableau;
 
 ";}
 }}
 
 
 sortie:=fopen("XCasmpfc.mp");
-fprint(sortie,Unquoted,MetaLfc);
+fprint(sortie,Unquoted,MetaLfc);
 fclose(sortie);
 
 
@@ -538,13 +533,13 @@ S:=[];
 
 
 if(trigo==t){
-all_trig_solutions:=1;
+all_trig_solutions:=1;
 reset_solve_counter(-1,-1);
 SS:=solve(factor(simplify(fp(x))),x);
 ns:=size(SS);
 for(k:=0;k<ns;k++){
 m:=0;
-while(evalf(simplify(subst(SS[k],n_1=m)))<=evalf(L[nl-1])){
+while(evalf(simplify(subst(SS[k],n_1=m)))<=evalf(L[nl-1])){
 S:=concat(S,simplify(subst(SS[k],n_1=m)));m:=m+1;
 };m:=-1;
 while(evalf(subst(SS[k],n_1=m))>=L[0]){
@@ -560,14 +555,14 @@ S:=solve(fp(x),x);
                              qq:=member(simplify(S[j]),Z)==0;
                              kk:=(evalf(S[j])>=evalf(L[0])) and (evalf(S[j])<=evalf(L[nl-1]));
                           if(kk==1){if(qq==1){Z:=append(Z,simplify(S[j]))}};
-                          fpour
+                          fpour
   fsi;
 Z:=sort(Z);
 nz:=size(Z);
 
 
  tantque evalf(Z[0])==evalf(Z[1]) faire Z:=Z[1..nz-1];nz:=size(Z);
-     ftantque;
+     ftantque;
 
 
 
@@ -579,20 +574,15 @@ nz:=size(Z);
                              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;
+  fsi;
 
-Z:=sort(Z); 
-nz:=size(Z);
- si Z[0]==Z[1] alors Z:=augment(Z[0],Z[2..nz-1]);nz:=nz-1; 
-     fsi;
-pour u de 1 jusque nz-2 faire 
-     si Z[u]==Z[u+1] alors Z:=augment(Z[0..u-1],Z[u+1..nz-1]);nz:=nz-1; 
-     fsi;
-fpour;
-nz:=size(Z);
+
+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));
@@ -624,72 +614,72 @@ lm0:=limit(f(x),x=Z[0],1)==-infinity;
                                     "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])))+"$
+                                          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;
+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 $"+
+    else{"limGauche(btex $"+
          if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$ etex,"+ 
-           if(kz==1){"1);"}else{"0);"}};    
+           if(kz==1){"1);"}else{"0);"}};    
     
 
 
 
 
-MetaLfc:=if(ftt==2){if(nz>2){"
+MetaLfc:=if(ftt==2){if(nz>2){"
 
 beginTableau("+nmr+")"+
         l0+lsi+lsp+lsf+"
-endTableau;
+endTableau;
 
 ";}else{
-intro+"beginTableau("+nmr+")"+
+intro+"beginTableau("+nmr+")"+
         l0+
 lsi+lsf+"
-endTableau;
+endTableau;
 
 ";
 }
 }else{ if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+
         l0+
 li+
-lp+
-lf
+lp+
+lf
 +"
 endTableau;
 
-";}else{"beginTableau("+nmr+")"+
+";}else{"beginTableau("+nmr+")"+
         l0+
 li+
-lf
+lf
 +"
-endTableau;
+endTableau;
 
 ";}}else{
-if(nz>2){"beginTableau("+nmr+")"+
+if(nz>2){"beginTableau("+nmr+")"+
         l0+
 lsi+lsp+lsf+
 li+
 lp+
-lf
+lf
 +"
-endTableau;
+endTableau;
 
 ";}else{"beginTableau("+nmr+")"+
         l0+
-lsi+lsf+
+lsi+lsf+
 li+
-lf
+lf
 +"
-endTableau;
+endTableau;
 
 ";}
 }}
@@ -697,7 +687,7 @@ endTableau;
 
 sortie:=fopen("XCasmpfc.mp");
 fprint(sortie,Unquoted,MetaLfc);
-fclose(sortie);
+fclose(sortie);
 
 
  }:;
@@ -726,7 +716,7 @@ fclose(sortie);
 
 TVZ(L,F,FF,nom,nomv,f,ftt,trigo,nmr):={
 nl:=size(L);
-nf:=size(FF);
+nf:=size(FF);
  Ff:=NULL;IMIN:=NULL;IMAX:=NULL;
 for(k:=0;k<nf;k++){
 if(FF[k][0]>L[0]){Imin[k]:=FF[k][0];LL:=L}else{Imin[k]:=L[0];LL:=[L[1]]};
@@ -739,7 +729,7 @@ if(FF[k][1]<L[1]){Imax[k]:=FF[k][1];LL:=L}else{Imax[k]:=L[1];LL:=[L[0]]};
  IMIN:=[IMIN];
  IMAX:=[IMAX];
  f:=unapply(f,x);
-fp:=function_diff(f);
+fp:=function_diff(f);
 Z:=concat(LL,F);
 
 for(k:=0;k<nf;k++){
@@ -751,7 +741,7 @@ S:=[];
 
 if(trigo==t){
 all_trig_solutions:=1;
-reset_solve_counter(-1,-1);
+reset_solve_counter(-1,-1);
 SS:=solve(factor(simplify(fp(x))),x);
 ns:=size(SS);
 for(k:=0;k<ns;k++){
@@ -780,19 +770,11 @@ S:=solve(fp(x),x);
                           if(Kk==1){Z:=append(Z,simplify(S[j]))};
                           }
                         fpour
-  fsi;
+  fsi;
 
-Z:=sort(Z); 
-nz:=size(Z);
 
+Z:=sort([op(set[op(Z)])]);
 
-
- si Z[0]==Z[1] alors Z:=augment(Z[0],Z[2..nz-1]);nz:=nz-1; 
-     fsi;
-pour u de 1 jusque nz-2 faire 
-     si Z[u]==Z[u+1] alors Z:=augment(Z[0..u-1],Z[u+1..nz-1]);nz:=nz-1; 
-     fsi;
-fpour;
 nz:=size(Z);
 
 for(j:=0;j<nf;j++){
@@ -801,14 +783,14 @@ for(j:=0;j<nf;j++){
    }
   }
 }
-nz:=size(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));
+       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(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){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){
@@ -820,7 +802,7 @@ if(member(Z[0],IMIN)!=0){if((member(Z[0],F)==0) and (fp(Z[0])!=undef)){"debutNon
 
 if(nz>2){ for(r:=1; r<=nz-2;r++){ ksp:=evalf(fp(Z[r]+0.01))>0; 
                                                lsp:=lsp+if(member(Z[r],IMIN)!=0){if((member(Z[r],F)==0) and (fp(Z[r])!=undef)){"debutNonDef;"}else{"debutNonDefStrict;"}}else{
-                                                       if(member(Z[r],IMAX)!=0){if((member(Z[r],F)==0) and (fp(Z[r])!=undef)){"finNonDef;"}else{"finNonDefStrict;"}+
+                                                       if(member(Z[r],IMAX)!=0){if((member(Z[r],F)==0) and (fp(Z[r])!=undef)){"finNonDef;"}else{"finNonDefStrict;"}+
                                                 if(ksp==1){"plus;"}else{"moins;"}}else{
                                                  if(member(Z[r],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+
                                                 if(ksp==1){"plus;"}else{"moins;"}
@@ -828,7 +810,7 @@ if(nz>2){ for(r:=1; r<=nz-2;r++){ ksp:=evalf(fp(Z[r]+0.01))>0;
 
 
 
-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;
+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;
 "}}
 
 
@@ -849,48 +831,48 @@ if(nz>2){
              "-\\infty"}else{
                 latex(simplify(limit(f(x),x=Z[r],-1)))}
          +"$ etex,"+if(krm==1){
-             "1);"}else{"0);"} 
+             "1);"}else{"0);"} 
          +if(member(Z[r],F)==0){"debutNonDef;"}else{"debutNonDefStrict;"}
-       }//fsi Zr=Imin
+       }//fsi Zr=Imin
       else{
         if (member(Z[r],IMAX)!=0){if(member(Z[r],F)==0){"finNonDef;"}else{"finNonDefStrict;"}+"limDroite(btex $"+if(lmrp==1){
              "-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],1)))}
          +"$ etex,"+if(krp==1){
-             "1);"}else{"0);"}          
+             "1);"}else{"0);"}          
        }else{
           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){
+         +"$ 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){
+         +"$ etex,"+if(krp==1){
              "1);"}else{"0);"}
          }//fsi (member Zr F)
           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){
+                    if(krp==1){
                        "1);"}else{"0);"}//felse(krp)
-                    }//felse(valpos)
+                    }//felse(valpos)
                }//felse(member Zr F)
                } //felse(Zr=Imax)
               }//felse(Zr=Imin)
-           };//ffor 
+           };//ffor 
          }//fsi nz
 
-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 $"+
-           if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$ etex,"+
+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(kz==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}};    
     
 
 
@@ -898,32 +880,32 @@ lf:=if(member(Z[nz-1],F)==0){"valPos(btex $"+
 
 MetaLfc:=if(ftt==2){if(nz>2){"
 
-beginTableau("+nmr+")"+
+beginTableau("+nmr+")"+
         l0+lsi+lsp+lsf+"
-endTableau;
+endTableau;
 
 ";}else{
 intro+"beginTableau("+nmr+")"+
         l0+
-lsi+lsf+"
-endTableau;
+lsi+lsf+"
+endTableau;
 
 ";
 }
-}else{ if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+
+}else{ if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+
         l0+
 li+
-lp+
+lp+
 lf
 +"
-endTableau;
+endTableau;
 
-";}else{"beginTableau("+nmr+")"+
+";}else{"beginTableau("+nmr+")"+
         l0+
 li+
 lf
 +"
-endTableau;
+endTableau;
 
 ";}}else{
 if(nz>2){"beginTableau("+nmr+")"+
@@ -931,17 +913,17 @@ if(nz>2){"beginTableau("+nmr+")"+
 lsi+lsp+lsf+
 li+
 lp+
-lf
+lf
 +"
-endTableau;
+endTableau;
 
 ";}else{"beginTableau("+nmr+")"+
         l0+
-lsi+lsf+
+lsi+lsf+
 li+
 lf
 +"
-endTableau;
+endTableau;
 
 ";}
 }}
@@ -949,7 +931,7 @@ endTableau;
 
 sortie:=fopen("XCasmpfc.mp");
 fprint(sortie,Unquoted,MetaLfc);
-fclose(sortie);
+fclose(sortie);
 
  }
 :;
@@ -965,7 +947,7 @@ fclose(sortie);
 
 
 
-\begin{VerbatimOut}{XcasTVapp.cxx}
+\begin{VerbatimOut}{XcasTVapp.cxx}
 
 
 
@@ -973,7 +955,7 @@ fclose(sortie);
 
 
 
-TVapp(L,F,nom,nomv,f,ftt,nmr):={
+TVapp(L,F,nom,nomv,f,ftt,nmr):={
 
 
 nl:=size(L);
@@ -988,20 +970,20 @@ 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}
+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;  }}};
+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;  }}};
 
 
 
 
 
 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]);
+                             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]))}};
                           fpour;
-fsi;
+fsi;
 
 
 S:=NULL;
@@ -1026,8 +1008,8 @@ Z:=[S];
 
 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; 
+pour m de 0 jusque nz-1 faire l0:=l0+"val(btex $"+latex(Z[m])+"$ etex);
+";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));
@@ -1045,7 +1027,7 @@ if(nz>2){ for(r:=1; r<=nz-2;r++){      ksp:=evalf(fp(Z[r]+0.01))>0;
 
 lsf:=if(member(Z[nz-1],F)==0){""}else{"nonDefBarre;
 "}
-lm0:=limit(f(x),x=Z[0],1)==-infinity;
+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,"}+                               
@@ -1062,29 +1044,29 @@ lm0:=limit(f(x),x=Z[0],1)==-infinity;
 "}}}
                                                    }; }
 
-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 $"+
+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,"+ 
+    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;"}};    
     
 
 
-MetaLfc:=if(ftt==2){if(nz>2){"
+MetaLfc:=if(ftt==2){if(nz>2){"
 
-beginTableau("+nmr+")"+
+beginTableau("+nmr+")"+
         l0+lsi+lsp+lsf+"
 endTableau;
 
 ";}else{
-intro+"beginTableau("+nmr+")"+
+intro+"beginTableau("+nmr+")"+
         l0+
 lsi+lsf+"
-endTableau;
+endTableau;
 
 ";
 }
@@ -1092,34 +1074,34 @@ endTableau;
         l0+
 li+
 lp+
-lf
+lf
 +"
-endTableau;
+endTableau;
 
 ";}else{"beginTableau("+nmr+")"+
         l0+
 li+
-lf
+lf
 +"
 endTableau;
 
 ";}}else{
-if(nz>2){"beginTableau("+nmr+")"+
+if(nz>2){"beginTableau("+nmr+")"+
         l0+
-lsi+lsp+lsf+
+lsi+lsp+lsf+
 li+
 lp+
 lf
 +"
-endTableau;
+endTableau;
 
 ";}else{"beginTableau("+nmr+")"+
         l0+
 lsi+lsf+
 li+
-lf
+lf
 +"
-endTableau;
+endTableau;
 
 ";}
 }}
@@ -1148,32 +1130,32 @@ fclose(sortie);
 
 %%
 %% Code giac/Xcas pour les Tableaux de Variations avec 
-%% Valeurs intermediaires
+%% Valeurs intermediaires
 %%
 
 
 
 
 
-\begin{VerbatimOut}{XcasTVI.cxx}
+\begin{VerbatimOut}{XcasTVI.cxx}
 
 
 TVI(L,F,nom,nomv,f,ftt,ao,trigo,nmr):={
-nl:=size(L);
+nl:=size(L);
 f:=unapply(f,x);
-fp:=function_diff(f);
+fp:=function_diff(f);
 Z:=concat(L,F);
 S:=[];
 
 
 if(trigo==t){
-all_trig_solutions:=1;
+all_trig_solutions:=1;
 reset_solve_counter(-1,-1);
 SS:=solve(factor(simplify(fp(x))),x);
 ns:=size(SS);
 for(k:=0;k<ns;k++){
 m:=0;
-while(evalf(simplify(subst(SS[k],n_1=m)))<=evalf(L[nl-1])){
+while(evalf(simplify(subst(SS[k],n_1=m)))<=evalf(L[nl-1])){
 S:=concat(S,simplify(subst(SS[k],n_1=m)));m:=m+1;
 };m:=-1;
 while(evalf(subst(SS[k],n_1=m))>=L[0]){
@@ -1185,38 +1167,35 @@ S:=solve(fp(x),x);
 }
 
   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]));
+                            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;
+  fsi;
 
-Z:=sort(Z); 
-nz:=size(Z);
- si Z[0]==Z[1] alors Z:=augment(Z[0],Z[2..nz-1]);nz:=nz-1; 
-     fsi;
-pour u de 1 jusque nz-2 faire 
-     si Z[u]==Z[u+1] alors Z:=augment(Z[0..u-1],Z[u+1..nz-1]);nz:=nz-1; 
-     fsi;
-fpour;
-nz:=size(Z);
-l0:=" newLigneVariables(btex $"+nomv+"$ etex);";lp:=" "; lf:=" ";lsp:=" ";
+
+Z:=sort([op(set[op(Z)])]);
+
+
+
+nz:=size(Z);
+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);
+LF:=limit(f(x),x,Z[nz-1],-1);
 LP:=NULL;
-PB:=1;
-if(nz>2){                                                       for(r:=1;
+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}else{PB:=PB,1};
+if(member(Z[r],F)){PB:=PB,0,1}else{PB:=PB,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;
+kk:=0;
 
 
 
@@ -1224,7 +1203,7 @@ if(NL==nz){for(k:=0;k<nz-1;k++){TestS:=(evalf(sign(LL[k]-ao))==evalf(sign(LL[
 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(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}
@@ -1236,7 +1215,7 @@ else{l0:=l0+"val(btex $"+latex(Z[kk])+"$ et
  };
 
 
-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);
+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));
                           
@@ -1255,27 +1234,27 @@ if(nz>2){rr:=1; if(nz==NL){for(r:=1; r<=NL-2;r++){ TestS:=(evalf(sign(LL[r
                                  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:=(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);
+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;"}+
+                      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;"}+
                                   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;
+lm0:=limit(f(x),x=Z[0],1)==-infinity;
 
 
 
 
-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);
+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,"}
@@ -1300,33 +1279,33 @@ TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))=
                          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(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);"}}
+                                    "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(evalf(sign(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;
 }//  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{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(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;
+                                            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=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 $"+
+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 $"+
+    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;"}};    
 
@@ -1338,7 +1317,7 @@ lf:=if(member(Z[nz-1],F)==0){"valPos(btex $"+
 
 MetaLfc:= if(ftt==2){if(nz>2){"beginTableau("+nmr+")"+
         l0+lsi+lsp+lsf+"
-endTableau;
+endTableau;
 
 ";}else{
 "beginTableau("+nmr+")"+
@@ -1349,31 +1328,31 @@ lsi+lsf+"
 ";
 }
 }else{
-if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+
+if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+
         l0+
 li+
 lp+
 lf
 +"
-endTableau;
+endTableau;
 
 ";}else{"beginTableau("+nmr+")"+
         l0+
 li+
 lf
 +"
-endTableau;
+endTableau;
 ";}}else{
 if(nz>2){"beginTableau("+nmr+")"+
         l0+
 lsi+lsp+lsf+
 li+
-lp+
+lp+
 lf
 +"
 endTableau;
 
-";}else{"beginTableau("+nmr+")"+
+";}else{"beginTableau("+nmr+")"+
         l0+
 lsi+lsf+
 li+
@@ -1392,7 +1371,7 @@ li+
 
 sortie:=fopen("XCasmpfc.mp");
 fprint(sortie,Unquoted,MetaLfc);
-fclose(sortie);
+fclose(sortie);
 
 
  }:;
@@ -1414,24 +1393,24 @@ fclose(sortie);
 %%%%%%%%%
 
 
-\begin{VerbatimOut}{XcasTVIex.cxx}
+\begin{VerbatimOut}{XcasTVIex.cxx}
 
 
 
-TVIex(L,F,nom,nomv,f,ftt,ao,trigo,nmr):={
-nl:=size(L);
+TVIex(L,F,nom,nomv,f,ftt,ao,trigo,nmr):={
+nl:=size(L);
 f:=unapply(f,x);
 fp:=function_diff(f);
 Z:=concat(L,F);
 S:=[];
 
-Sex:=NULL;
-Zex:=solve(f(x)=ao);
+Sex:=NULL;
+Zex:=solve(f(x)=ao);
 Zex:=sort(Zex);
 for(j:=0;j<size(Zex);j++){
 if((evalf(Zex[j])>=evalf(L[0])) and (evalf(Zex[j])<=evalf(L[nl-1]))){Sex:=Sex,Zex[j]};
 };
-Sex:=[Sex];
+Sex:=[Sex];
 
 
 
@@ -1443,7 +1422,7 @@ Sex:=[Sex];
 if(trigo==t){
 all_trig_solutions:=1;
 reset_solve_counter(-1,-1);
-SS:=solve(factor(simplify(fp(x))),x);
+SS:=solve(factor(simplify(fp(x))),x);
 ns:=size(SS);
 for(k:=0;k<ns;k++){
 m:=0;
@@ -1459,38 +1438,35 @@ S:=solve(fp(x),x);
 }
 
   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]));
+                            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;
+  fsi;
 
-Z:=sort(Z); 
-nz:=size(Z);
- si Z[0]==Z[1] alors Z:=augment(Z[0],Z[2..nz-1]);nz:=nz-1; 
-     fsi;
-pour u de 1 jusque nz-2 faire 
-     si Z[u]==Z[u+1] alors Z:=augment(Z[0..u-1],Z[u+1..nz-1]);nz:=nz-1; 
-     fsi;
-fpour;
-nz:=size(Z);
+
+
+ Z:=sort([op(set[op(Z)])]);
+
+
+nz:=size(Z);
 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);
+LF:=limit(f(x),x,Z[nz-1],-1);
 LP:=NULL;
 PB:=1;
-if(nz>2){                                                       for(r:=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}else{PB:=PB,1};
+if(member(Z[r],F)){PB:=PB,0,1}else{PB:=PB,1};
 }
 };
 if(nz>2){ LL:=[LI,LP,LF]; PB:=[PB,1]}else{LL:=[LI,LF];PB:=[1,1]};
       
 NL:=size(LL);
 A:=NULL;aa:=0;
-kk:=0;
+kk:=0;
 
 
 
@@ -1498,11 +1474,11 @@ if(NL==nz){for(k:=0;k<nz-1;k++){TestS:=(evalf(sign(LL[k]-ao))==evalf(sign(LL[
 if(TestS==0){A:=A,aa;l0:=l0+"val(btex $"+latex(Z[k])+"$ etex);"+"val(btex $"+latex(simplify(Sex[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(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 $"+latex(simplify(Sex[aa]))+"$ etex);";aa:=aa+1;kk:=kk+1}
-else{l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);";kk:=kk+1}};
+else{l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);";kk:=kk+1}};
 }
 
  l0:=l0+"val(btex $"+latex(Z[nz-1])+"$ etex);"
@@ -1510,7 +1486,7 @@ else{l0:=l0+"val(btex $"+latex(Z[kk])+"$ et
  };
 
 
-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);
+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));
                           
@@ -1526,15 +1502,15 @@ lsi:=lsic+nom+"'("+nomv+")}$ etex);"+
 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;"}+
+                                 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:=(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);
+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;"}+
-                                  if(kspp==1){"plus;"}else{"moins;"};rr:=rr+1;}        
+                                    else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+
+                                  if(kspp==1){"plus;"}else{"moins;"};rr:=rr+1;}        
 }}}}; 
 
 
@@ -1544,12 +1520,12 @@ else{for(r:=1; r<=NL-2;r++){kspp:=evalf(fp(Z[rr]+0.01))>0;TestS:=(evalf(si
 
 
 
-lm0:=limit(f(x),x=Z[0],1)==-infinity;
+lm0:=limit(f(x),x=Z[0],1)==-infinity;
 
 
 
 
-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);
+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,"}
@@ -1562,7 +1538,7 @@ TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))=
                                                  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);"}}
+                                    "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(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);"
@@ -1576,7 +1552,7 @@ TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))=
 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(evalf(sign(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;
 }//  testS==0
@@ -1598,10 +1574,10 @@ 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(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(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$ etex,"+ 
            if(kz==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}};    
 
 
@@ -1610,12 +1586,12 @@ lf:=if(member(Z[nz-1],F)==0){"valPos(btexMetaLfc:= if(ftt==2){if(nz>2){"beginTableau("+nmr+")"+
         l0+lsi+lsp+lsf+"
-endTableau;
+endTableau;
 
 ";}else{
-"beginTableau("+nmr+")"+
+"beginTableau("+nmr+")"+
         l0+
 lsi+lsf+"
 endTableau;
@@ -1626,32 +1602,32 @@ lsi+lsf+"
 if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+
         l0+
 li+
-lp+
-lf
+lp+
+lf
 +"
 endTableau;
 
-";}else{"beginTableau("+nmr+")"+
+";}else{"beginTableau("+nmr+")"+
         l0+
 li+
-lf
+lf
 +"
 endTableau;
 ";}}else{
 if(nz>2){"beginTableau("+nmr+")"+
         l0+
-lsi+lsp+lsf+
+lsi+lsp+lsf+
 li+
 lp+
-lf
+lf
 +"
-endTableau;
+endTableau;
 
 ";}else{"beginTableau("+nmr+")"+
         l0+
 lsi+lsf+
 li+
-lf
+lf
 +"
 endTableau;
 
@@ -1664,7 +1640,7 @@ lf
 
 
 sortie:=fopen("XCasmpfc.mp");
-fprint(sortie,Unquoted,MetaLfc);
+fprint(sortie,Unquoted,MetaLfc);
 fclose(sortie);
 
 
@@ -1687,14 +1663,14 @@ fclose(sortie);
 
 
 
-\begin{VerbatimOut}{XcasTVIapp.cxx}
+\begin{VerbatimOut}{XcasTVIapp.cxx}
 
-TVIapp(L,F,nom,nomv,f,ftt,ao,nmr):={
+TVIapp(L,F,nom,nomv,f,ftt,ao,nmr):={
 
 
 nl:=size(L);
 f:=unapply(f,x);
-fp:=function_diff(f);
+fp:=function_diff(f);
 z0:=concat(L,F);z:=sort(z0);
 nz:=size(z);
 
@@ -1704,9 +1680,9 @@ 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,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;  }}};
+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;  }}};
 
 
 
@@ -1716,7 +1692,7 @@ else{if(L[0]==-infinity){j:=[seq(k,k=100..floor(L[1]))] minus F;for k in j do S:
 
 
 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]);
+                             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]))}};
                           fpour;
 fsi;
@@ -1753,27 +1729,27 @@ LI:=limit(f(x),x,Z[0],1);
 LF:=limit(f(x),x,Z[nz-1],-1);
 LP:=NULL;
 PB:=1;
-if(nz>2){                                                       for(r:=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}else{PB:=PB,1};
+if(member(Z[r],F)){PB:=PB,0,1}else{PB:=PB,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;
+kk:=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);"}}
+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}};
+else{l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);";kk:=kk+1}};
 }
 
  l0:=l0+"val(btex $"+latex(Z[nz-1])+"$ etex);"
@@ -1781,7 +1757,7 @@ else{l0:=l0+"val(btex $"+latex(Z[kk])+"$ et
  };
 
 
-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);
+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));
                           
@@ -1797,15 +1773,15 @@ lsi:=lsic+nom+"'("+nomv+")}$ etex);"+
 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;"}+
+                                 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:=(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);
+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;"}+
-                                  if(kspp==1){"plus;"}else{"moins;"};rr:=rr+1;}        
+                                    else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+
+                                  if(kspp==1){"plus;"}else{"moins;"};rr:=rr+1;}        
 }}}}; 
 
 
@@ -1815,12 +1791,12 @@ else{for(r:=1; r<=NL-2;r++){kspp:=evalf(fp(Z[rr]+0.01))>0;TestS:=(evalf(si
 
 
 
-lm0:=limit(f(x),x=Z[0],1)==-infinity;
+lm0:=limit(f(x),x=Z[0],1)==-infinity;
 
 
 
 
-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);
+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,"}
@@ -1833,7 +1809,7 @@ TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))=
                                                  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);"}}
+                                    "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(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);"
@@ -1848,11 +1824,11 @@ 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(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);
+                                            $ "+ao+" $ etex,0.5);
                                                                  ";rr:=rr+1;
 }//  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);"}}
+                                    "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(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;
@@ -1861,7 +1837,7 @@ else{lp:=lp+if(member(Z[rr],F)){
 }//for nz<NL
 }// else nz<NL
 //if nz=NL
-};//if nz>2
+};//if nz>2
 
 
 
@@ -1869,11 +1845,11 @@ 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(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(kz==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}};    
 
 
 
@@ -1881,14 +1857,14 @@ lf:=if(member(Z[nz-1],F)==0){"valPos(btex $"+
 
 
 
-MetaLfc:= if(ftt==2){if(nz>2){"beginTableau("+nmr+")"+
+MetaLfc:= if(ftt==2){if(nz>2){"beginTableau("+nmr+")"+
         l0+lsi+lsp+lsf+"
 endTableau;
 
 ";}else{
 "beginTableau("+nmr+")"+
         l0+
-lsi+lsf+"
+lsi+lsf+"
 endTableau;
 
 ";
@@ -1900,12 +1876,12 @@ li+
 lp+
 lf
 +"
-endTableau;
+endTableau;
 
 ";}else{"beginTableau("+nmr+")"+
         l0+
 li+
-lf
+lf
 +"
 endTableau;
 ";}}else{
@@ -1916,7 +1892,7 @@ li+
 lp+
 lf
 +"
-endTableau;
+endTableau;
 
 ";}else{"beginTableau("+nmr+")"+
         l0+
@@ -1924,7 +1900,7 @@ lsi+lsf+
 li+
 lf
 +"
-endTableau;
+endTableau;
 
 ";}
 }};
@@ -1951,7 +1927,7 @@ fclose(sortie);
 
 
 %%
-%% Code giac/Xcas pour les Tableaux de variations de courbes parametrees
+%% Code giac/Xcas pour les Tableaux de variations de courbes parametrees
 %%
 
 
@@ -1972,7 +1948,7 @@ LLL:=[];
 
 
 all_trig_solutions:=1;
-reset_solve_counter(-1,-1);
+reset_solve_counter(-1,-1);
 
 for(d:=0;d<=1;d++){
 f:=subst(f,f[d]=unapply(f[d],t));
@@ -1990,7 +1966,7 @@ while(evalf(simplify(subst(SS[k],n_1=m)))<=evalf(L[nl-1])){
 S:=concat(S,simplify(subst(SS[k],n_1=m)));m:=m+1;
 
 };m:=-1;
-while(evalf(subst(SS[k],n_1=m))>=L[0]){
+while(evalf(subst(SS[k],n_1=m))>=L[0]){
 
 S:=concat(S,simplify(subst(SS[k],n_1=m)));m:=m-1;
 
@@ -2008,11 +1984,11 @@ S:=concat(S,SS);
                           fpour
   fsi;
 Z:=sort(Z);
-nz:=size(Z);
+nz:=size(Z);
 
 
  tantque evalf(Z[0])==evalf(Z[1]) faire Z:=Z[1..nz-1];nz:=size(Z);
-     ftantque;
+     ftantque;
 
 
 
@@ -2024,7 +2000,7 @@ u:=1;
          Z:=augment(Z[0..u-1],Z[u+1..nz-1]);nz:=size(Z);
      ftantque;
   u:=u+1;
- ftantque;
+ ftantque;
 
 
  };
@@ -2036,30 +2012,30 @@ 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;
 
  lsi:="","";
 
 FFF:=[[],[]];
 
 for(d:=0;d<=1;d++){
-FFF[d]:=concat(F[d],[-infinity,+infinity]);
+FFF[d]:=concat(F[d],[-infinity,+infinity]);
        k0:= evalf(limit(f[d](x),x=Z[0],1))> evalf(limit(f[d](x),x=Z[1],-1));
        kz:=evalf(limit(f[d](x),x=Z[nz-1],-1))> evalf(limit(f[d](x),x=Z[nz-2],1));
 //}
 //$
- lsi[d]:=lsic+nom[d]+"'("+nomv+")}$ etex);"+if(member(Z[0],FFF[d])==0){"valBarre(btex $"+latex(simplify(fp[d](Z[0])))+"$ etex);"}else{if(Z[0]==-infinity){" "}else{"nonDefBarre;
+ lsi[d]:=lsic+nom[d]+"'("+nomv+")}$ etex);"+if(member(Z[0],FFF[d])==0){"valBarre(btex $"+latex(simplify(fp[d](Z[0])))+"$ etex);"}else{if(Z[0]==-infinity){" "}else{"nonDefBarre;
 "}}+
      if(Z[0]==-infinity){if(sign(evalf(fp[d](if(Z[1]==+infinity){0}else{Z[1]-10^(-5)})))==1){"plus;"}else{"moins;"}}else{if(member(Z[0],F[d])==0){
                                                     if(sign(fp[d](Z[0]+10^(-5)))==1){"plus;"}else{"moins;"}}else{
-                                                         if(sign(fp[d]((Z[0]+10^(-5))))==1){"plus;"}else{"moins;"} }}
+                                                         if(sign(fp[d]((Z[0]+10^(-5))))==1){"plus;"}else{"moins;"} }}
 
 if(nz>2){ for(r:=1; r<=nz-2;r++){      ksp:=evalf(fp[d](Z[r]+0.01))>0;
                                                lsp[d]:=lsp[d]+if(member(Z[r],F[d])==0){"valBarre(btex $"+latex(simplify(fp[d](Z[r])))+"$ etex);"}else{"nonDefBarre;"}+
                                                 if(ksp==1){"plus;"}else{"moins;"}
                                                   }; }
 
-lsf[d]:=if(member(Z[nz-1],FFF[d])==0){"valBarre(btex $"+latex(simplify(fp[d](Z[nz-1])))+"$ etex);"}else{if(Z[nz-1]==+infinity){" "}else{"nonDefBarre;"}}
+lsf[d]:=if(member(Z[nz-1],FFF[d])==0){"valBarre(btex $"+latex(simplify(fp[d](Z[nz-1])))+"$ etex);"}else{if(Z[nz-1]==+infinity){" "}else{"nonDefBarre;"}}
 
 
 
@@ -2088,7 +2064,7 @@ lm0[d]:=limit(f[d](x),x,Z[0],1)==-infinity;
      li[d]:=lvic+nom[d]+"}$ etex);"+
            if(member(Z[0],F[d])==0){"valPos(btex $"+if(lm0[d]==1){"-\\infty"}else{latex(simplify(limit(f[d](x),x,Z[0],1)))}+"$ etex,"}
              else{"nonDefBarre;limDroite(btex $"+if(lm0[d]==1){"-\\infty"}else{latex(simplify(limit(f[d](x),x,Z[0],1)))}+"$ etex,"}+
-           if(K0[d]==1){"1"}else{"0"}+
+           if(K0[d]==1){"1"}else{"0"}+
                          ");";
 
                      if(nz>2){ for(r:=1; r<=nz-2;r++){ krm[d]:=evalf(limit(f[d](x),x=Z[r-1],1))< evalf(limit(f[d](x),x=Z[r],-1));
@@ -2099,19 +2075,19 @@ lm0[d]:=limit(f[d](x),x,Z[0],1)==-infinity;
                                     $"+if(lmrm[d]==1){"-\\infty"}else{latex(simplify(limit(f[d](x),x,Z[r],-1)))}+"$
                                     etex,"+if(krm[d]==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex $"+if(lmrp[d]==1){"-\\infty"}else{latex(simplify(limit(f[d](x),x,Z[r],1)))}+"$ etex,"+if(krp[d]==1){"1);"}else{"0);"}}
                                           else{"valPos(btex          $"+latex(simplify(f[d](Z[r])))+"$
-                                            etex,"+if(sign(evalf(fp[d](Z[r]-0.001)))==sign(evalf((fp[d](Z[r]+0.001))) )){"0.5);"}else{if(krp[d]==1){"1);"}else{"0);
+                                            etex,"+if(sign(evalf(fp[d](Z[r]-0.001)))==sign(evalf((fp[d](Z[r]+0.001))) )){"0.5);"}else{if(krp[d]==1){"1);"}else{"0);
 "}}}
                                                    }; }
 
 lnz[d]:=limit(f[d](x),x=Z[nz-1],-1)==-infinity;
 
 
-lf[d]:=if(member(Z[nz-1],F[d])==0){"valPos(btex $"+
+lf[d]:=if(member(Z[nz-1],F[d])==0){"valPos(btex $"+
            if(lnz[d]==1){"-\\infty"}else{latex(simplify(limit(f[d](x),x=Z[nz-1],-1)))}+"$ etex,"+
              if(Kz[d]==1){"1);"}else{"0);"}}
     else{"limGauche(btex $"+
          if(lnz[d]==1){"-\\infty"}else{latex(simplify(limit(f[d](x),x=Z[nz-1],-1)))}+"$ etex,"+ 
-           if(Kz[d]==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}};    
+           if(Kz[d]==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}};    
     
 
 
@@ -2129,26 +2105,26 @@ lf[d]:=if(member(Z[nz-1],F[d])==0){"valPos(btex $"
 
 MetaLfc:=if(ftt==2){if(nz>2){"
 
-beginTableau("+nmr+")"+
+beginTableau("+nmr+")"+
         l0+lsi[0]+lsp[0]+lsf[0]+lsi[1]+lsp[1]+lsf[1]+"
 endTableau;
 
 ";}else{
 intro+"beginTableau("+nmr+")"+
         l0+
-lsi[0]+lsf[0]+lsi[1]+lsf[1]+"
+lsi[0]+lsf[0]+lsi[1]+lsf[1]+"
 endTableau;
 
 ";
 }
-}else{ if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+
+}else{ if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+
         l0+
 li[0]+
 lp[0]+
 lf[0]+
 li[1]+
 lp[1]+
-lf[1]
+lf[1]
 +"
 endTableau;
 
@@ -2159,19 +2135,19 @@ lf[0]+
 li[1]+
 lf[1]
 +"
-endTableau;
+endTableau;
 
 ";}}else{
 if(nz>2){"beginTableau("+nmr+")"+
         l0+
 lsi[0]+lsp[0]+lsf[0]+
 li[0]+
-lp[0]+
+lp[0]+
 lf[0]+
 lsi[1]+lsp[1]+lsf[1]+
 li[1]+
 lp[1]+
-lf[1]
+lf[1]
 +"
 endTableau;
 
@@ -2184,7 +2160,7 @@ lsi[1]+lsf[1]+
 li[1]+
 lf[1]
 +"
-endTableau;
+endTableau;
 
 ";}
 }
@@ -2207,14 +2183,14 @@ fclose(sortie);
 
 
 
-\begin{VerbatimOut}{XcasTabSignL.cxx}
+\begin{VerbatimOut}{XcasTabSignL.cxx}
 
 
 TS(nomf,L,D,trigo,nmr):={
 L:=apply(f->unapply(f,x),L)
 n:=size(L);
 Z:=NULL;
-nl:=size(L);
+nl:=size(L);
 S:=[];
 mini:=D[0]; maxi:=D[1];
 
@@ -2226,7 +2202,7 @@ pour k de 0 jusque n-1 faire
 if(trigo==t){
 all_trig_solutions:=1;
 reset_solve_counter(-1,-1);
-SS:=solve(factor(simplify(L[k](x))),x);
+SS:=solve(factor(simplify(L[k](x))),x);
 ns:=size(SS);
 for(j:=0;j<ns;j++){
 m:=0;
@@ -2259,13 +2235,9 @@ Z:=sort(Z);
 nz:=size(Z);
 
 
+ Z:=sort([op(set[op(Z)])]);
 
 
-
-if(nz>2){pour u de 1 jusque nz-2 faire 
-     si Z[u]==Z[u+1] alors Z:=Z[0..u-1],Z[u+1..nz-1];nz:=nz-1;
-     fsi;
-fpour;};
 nz:=size(Z);
 
 if(nz==0){li:="";l0:="val(btex $"+latex(D[0])+"$ etex);val(btex $"+latex(D[1])+"$ etex);";
@@ -2282,7 +2254,7 @@ if(L[p]((mini+maxi)*0.5>0)){"plus;"}else{"moins;"}+if(maxi!=+infinity and L[p
 
 
 MetaLfc:="    beginTableau("+nmr+")
-newLigneVariables(btex $ {x}$ etex);
+newLigneVariables(btex $ {x}$ etex);
    "+l0+li+ lsic+nomf+"(x)}$ etex);"+
                if(mini!=-infinity and product(L[s](mini),s,0,n-1)==0){"
                                 valBarre(btex 0 etex);"}else{"
@@ -2299,7 +2271,7 @@ endTableau;
 l0:="val(btex $"+latex(D[0])+"$ etex);";li:=" ";lr:=" "; 
 pour m de 0 jusque nz-1 faire l0:=l0+"val(btex $"+latex(Z[m])+"$ etex);
 ";fpour; 
-l0:=l0+"val(btex $"+latex(D[1])+"$ etex);";
+l0:=l0+"val(btex $"+latex(D[1])+"$ etex);";
 
 
 for(p:=0;p<=n-1;p++){lp:="";                                     
@@ -2318,7 +2290,7 @@ for(p:=0;p<=n-1;p++){lp:="";
                 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(maxi!=+infinity and L[p](maxi)==0){"
-                                valBarre(btex 0 etex);"}else{"
+                                valBarre(btex 0 etex);"}else{"
                               "}
     };  
 
@@ -2365,7 +2337,7 @@ fclose(sortie);
 \begin{VerbatimOut}{XcasTabSignQ.cxx}
 TSq(nomf,L,Fo,D,trigo,nmr):={
 L:=apply(f->unapply(f,x),L);
-Fo:=apply(f->unapply(f,x),Fo);
+Fo:=apply(f->unapply(f,x),Fo);
 L:=concat(L,Fo);
 n:=size(L);
 Z:=NULL;
@@ -2383,13 +2355,13 @@ if(trigo==t){
 all_trig_solutions:=1;
 reset_solve_counter(-1,-1);
 SS:=solve(factor(simplify(L[k](x))),x);
-ns:=size(SS);
+ns:=size(SS);
 for(j:=0;j<ns;j++){
 mm:=0;
 while(evalf(simplify(subst(SS[j],n_1=mm)))<=evalf(maxi)){
 S:=concat(S,simplify(subst(SS[j],n_1=mm)));mm:=mm+1;
 };mm:=-1;
-while(evalf(subst(SS[j],n_1=mm))>=evalf(mini)){
+while(evalf(subst(SS[j],n_1=mm))>=evalf(mini)){
 S:=concat(S,simplify(subst(SS[j],n_1=mm)));mm:=mm-1;
 }
 }
@@ -2404,9 +2376,9 @@ S:=solve(L[k](x),x);
 
   si size(S)>0 alors   pour j de 0 jusque size(S)-1 faire 
                           if(S[j]>mini and S[j]<maxi){Z:=Z,simplify(S[j]);}
-                      fpour;
+                      fpour;
   fsi;
-fpour;
+fpour;
 
 
 pour k de 0 jusque m-1 faire 
@@ -2416,20 +2388,20 @@ pour k de 0 jusque m-1 faire
 if(trigo==t){
 all_trig_solutions:=1;
 reset_solve_counter(-1,-1);
-SSF:=solve(factor(simplify(Fo[k](x))),x);
-nsf:=size(SSF);
+SSF:=solve(factor(simplify(Fo[k](x))),x);
+nsf:=size(SSF);
 for(j:=0;j<nsf;j++){
 mm:=0;
 while(evalf(simplify(subst(SSF[j],n_1=mm)))<=evalf(maxi)){
-SF:=concat(SF,simplify(subst(SSF[j],n_1=mm)));mm:=mm+1;
+SF:=concat(SF,simplify(subst(SSF[j],n_1=mm)));mm:=mm+1;
 };mm:=-1;
-while(evalf(subst(SSF[j],n_1=mm))>=evalf(mini)){
+while(evalf(subst(SSF[j],n_1=mm))>=evalf(mini)){
 SF:=concat(SF,simplify(subst(SSF[j],n_1=mm)));mm:=mm-1;
 }
 }
 
 }else{
-SF:=solve(Fo[k](x),x);
+SF:=solve(Fo[k](x),x);
 }
 
   si size(SF)>0 alors pour j de 0 jusque size(SF)-1 faire 
@@ -2437,27 +2409,18 @@ SF:=solve(Fo[k](x),x);
                           if(SF[j]>mini and SF[j]<maxi){F:=F,simplify(SF[j]);}
                       fpour;
   fsi;
-fpour;
+fpour;
 
 
 
-Z:=sort(Z); // on classe les zeros dans l'ordre croissant 
-nz:=size(Z);
-if(nz>2){pour u de 1 jusque nz-2 faire 
-     si Z[u]==Z[u+1] alors Z:=Z[0..u-1],Z[u+1..nz-1];nz:=nz-1; // pour les zeros en double
-     fsi;
-fpour;}
+Z:=concat(Z,F);
 
 
-Z:=sort(Z);
-nz:=size(Z);
-if(nz>2){pour u de 1 jusque nz-2 faire 
-     si Z[u]==Z[u+1] alors Z:=Z[0..u-1],Z[u+1..nz-1];nz:=nz-1;
-     fsi;
-fpour;};
+Z:=sort([op(set[op(Z)])]);
+
 nz:=size(Z);
 
-if(nz==0){li:="";l0:="val(btex $"+latex(D[0])+"$ etex);val(btex $"+latex(D[1])+"$ etex);";
+if(nz==0){li:="";l0:="val(btex $"+latex(D[0])+"$ etex);val(btex $"+latex(D[1])+"$ etex);";
           for(p:=0;p<=n-1;p++){li:=li+lsic+latex(L[p](x))+"}$ etex);"+
 if(mini!=-infinity and L[p](mini)==0){"
                                 valBarre(btex 0 etex);"}else{"
@@ -2472,7 +2435,7 @@ if(L[p]((mini+maxi)*0.5>0)){"plus;"}else{"moins;"}+if(maxi!=+infinity and L[p
 
 
 
-MetaLfc:=" 
+MetaLfc:=" 
 beginTableau("+nmr+")
 newLigneVariables(btex $ {x}$ etex);
    "+l0+li+
@@ -2491,16 +2454,16 @@ endTableau;
 
 
 
-}else{
+}else{
 
 
 l0:="val(btex $"+latex(D[0])+"$ etex);";li:=" ";lr:=" "; 
 pour m de 0 jusque nz-1 faire l0:=l0+"val(btex $"+latex(Z[m])+"$ etex);
 ";fpour; 
-l0:=l0+"val(btex $"+latex(D[1])+"$ etex);";
+l0:=l0+"val(btex $"+latex(D[1])+"$ etex);";
 
 
-for(p:=0;p<=n-1;p++){lp:="";                                     
+for(p:=0;p<=n-1;p++){lp:="";                                     
      li:=li+lsic+latex(L[p](x))+"}$ etex);"+
            if(mini!=-infinity and L[p](mini)==0){"
                                 valBarre(btex 0 etex);"}else{"
@@ -2515,23 +2478,23 @@ for(p:=0;p<=n-1;p++){lp:="";
  
                 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(maxi!=+infinity and L[p](maxi)==0){"
-                                valBarre(btex 0 etex);"}else{" "}
+    "}+if(maxi!=+infinity and L[p](maxi)==0){"
+                                valBarre(btex 0 etex);"}else{" "}
                               
     };  
 
 
 pour t de 0 jusque nz-2 faire 
                            lr:=lr+if(product(L[s]((Z[t]+Z[t+1])*.5),s,0,n-1)>0){"plus;"}else{"moins;"}+
-                                      if(member(Z[t+1],FF)==0){"valBarre(btex 0 etex);"}else{ "nonDefBarre;"}                   
-                         fpour
+                                      if(member(Z[t+1],FF)==0){"valBarre(btex 0 etex);"}else{ "nonDefBarre;"}                   
+                         fpour
 
 
 
 
-MetaLfc:="
+MetaLfc:="
 beginTableau("+nmr+")
-newLigneVariables(btex $ {x}$ etex);
+newLigneVariables(btex $ {x}$ etex);
    "+l0+
                      li
                      +
@@ -2556,7 +2519,7 @@ endTableau;
 
 
 sortie:=fopen("XCasmpfc.mp");
-fprint(sortie,Unquoted,MetaLfc);
+fprint(sortie,Unquoted,MetaLfc);
 fclose(sortie);
 
 
@@ -2580,12 +2543,12 @@ fclose(sortie);
 \begin{VerbatimOut}{XcasTabSigna.cxx}
 TSa(a,b,c,d,nmr):={
 zA:=solve(a*x+b=0,x)[0];
-zB:=solve(c*x+d=0,x)[0];
+zB:=solve(c*x+d=0,x)[0];
 zmin:=min(zA,zB);
-zmax:=max(zA,zB);
+zmax:=max(zA,zB);
   Meta:= " 
           beginTableau("+nmr+")
-   newLigneVariables(btex $ {x}$ etex);
+   newLigneVariables(btex $ {x}$ etex);
    val(btex $-\\infty$ etex);val(btex $"+latex(zmin)+"$ etex);
 val(btex $"+latex(zmax)+"$etex);
 val(btex $+\\infty$ etex); 
@@ -2599,9 +2562,9 @@ val(btex $+\\infty$ etex);
      +lsic+if(c==1){"x+"}else{if(c==-1){"-x+"}else{c+"x+"}}+d+"}$ etex);"
         +     if(c>0){"moins"}else{"plus"}+";"+
                                  if(zmin==zB){"valBarre(btex 0 etex);"}else{"barre;"}+
-                                 if(zmin==zB){si c>0 alors "plus;"; sinon "moins;";fsi}
+                                 if(zmin==zB){si c>0 alors "plus;"; sinon "moins;";fsi}
                                              else{si c>0 alors "moins;"; sinon "plus;"; fsi}+
-                                 if(zmin==zB){"barre;"}else{"valBarre(btex 0 etex);"}+
+                                 if(zmin==zB){"barre;"}else{"valBarre(btex 0 etex);"}+
                                  if(c>0){"plus;"}else{"moins;"}  
      
    +lsic+"{("+if(a==1){"x+"}else{if(a==-1){"-x+"}else{a+"x+"}}+b+")("+if(c==1){"x+"}else{if(c==-1){"-x+"}else{c+"x+"}}+d+")}}$ etex);"
@@ -2617,7 +2580,7 @@ endTableau;
 
 
 sortie:=fopen("XCasmpfc.mp");
-fprint(sortie,Unquoted,Meta);
+fprint(sortie,Unquoted,Meta);
 fclose(sortie);
 
 
@@ -2637,7 +2600,7 @@ fclose(sortie);
 
 
 \begin{VerbatimOut}{XcasTSc.cxx}
-TSc(g,D,F,trigo,nmr):={
+TSc(g,D,F,trigo,nmr):={
 f:=unapply(g,x);
 mini:=D[0]; maxi:=D[1];lm:=" ";
 Z:=mini,maxi;
@@ -2647,15 +2610,15 @@ S:=[];
 
 if(trigo==t){
 all_trig_solutions:=1;
-reset_solve_counter(-1,-1);
+reset_solve_counter(-1,-1);
 SS:=solve(factor(simplify(f(x))),x);
-ns:=size(SS);
+ns:=size(SS);
 for(j:=0;j<ns;j++){
 m:=0;
 while(evalf(simplify(subst(SS[j],n_1=m)))<=evalf(maxi)){
 S:=concat(S,simplify(subst(SS[j],n_1=m)));m:=m+1;
 };m:=-1;
-while(evalf(subst(SS[j],n_1=m))>=evalf(mini)){
+while(evalf(subst(SS[j],n_1=m))>=evalf(mini)){
 S:=concat(S,simplify(subst(SS[j],n_1=m)));m:=m-1;
 }
 }
@@ -2671,11 +2634,11 @@ S:=solve(f(x),x);
 if(size(S)==0){
 l0:="val(btex $"+latex(D[0])+"$ etex);val(btex $"+latex(D[1])+"$ etex);";
 li:=if(member(mini,F)!=0){"nonDefBarre;"}else{if(mini!=-infinity and f(mini)==0){"
-                                valBarre(btex 0 etex);"}else{"
+                                valBarre(btex 0 etex);"}else{"
                               "}}+ 
 if(mini!=-infinity or maxi!=+infinity){if(f((mini+maxi)*0.5>0)){"plus;"}else{"moins;"}}else{if(f(0)>0){"plus;"}else{"moins;"}};
-lf:=if(member(maxi,F)!=0){"nonDefBarre;"}else{if(maxi!=+infinity and f(maxi)==0){"
-                                valBarre(btex 0 etex);"}else{"
+lf:=if(member(maxi,F)!=0){"nonDefBarre;"}else{if(maxi!=+infinity and f(maxi)==0){"
+                                valBarre(btex 0 etex);"}else{"
                               "}};
 }
 else{pour j de 0 jusque size(S)-1 faire 
@@ -2683,15 +2646,9 @@ else{pour j de 0 jusque size(S)-1 faire
                       fpour;
 
 Z:=concat([Z],F);
-Z:=sort(Z);
-nz:=size(Z);
-if(nz>2){pour u de 1 jusque nz-2 faire 
-     si Z[u]==Z[u+1] alors Z:=concat(Z[0..u-1],Z[u+1..nz-1]);nz:=nz-1;
-     fsi;
-fpour;}
 
-if(Z[0]==Z[1]){Z:=Z[1..nz-1];nz:=nz-1;}
-if(Z[nz-2]==Z[nz-1]){Z:=Z[0..nz-2];nz:=nz-1;}
+ Z:=sort([op(set[op(Z)])]);
+
 
 nz:=size(Z);
 l0:=" ";li:=" ";lr:=" "; 
@@ -2702,40 +2659,40 @@ li:=if(mini!=-infinity and f(mini)==0){"
 if(f((mini+maxi)*0.5)>0){"plus;"}else{"moins;"};
 lf:=if(maxi!=+infinity and f(maxi)==0){"
                                 valBarre(btex 0 etex);"}else{if(member(maxi,F)==0){"
-                              "}else{"nonDefBarre;"}
+                              "}else{"nonDefBarre;"}
                               };
 
 }else{
 l0:="val(btex $"+latex(Z[0])+"$ etex);";li:=" ";
 pour m de 1 jusque nz-1 faire l0:=l0+"val(btex $"+latex(Z[m])+"$ etex);
 ";
-fpour; 
+fpour; 
 
                                      
 li:= if(mini!=-infinity and f(mini)==0){"
                                 valBarre(btex 0 etex);"}else{if(member(mini,F)==0){"
-                              "}else{"nonDefBarre;"}
+                              "}else{"nonDefBarre;"}
                               }                         
 
 lm:=if(nz>2){for(r:=0; r<nz-2;r++){lm:=lm+if(Z[r]==-infinity){
 if(f((Z[r+1]-1))>0){"plus;"}else{"moins;"}
 }else{if(f((Z[r]+Z[r+1])*.5)>0){"plus;"}else{"moins;"}}
 +
-            if(member(Z[r+1],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"} 
+            if(member(Z[r+1],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"} 
                            }}else{" "}; 
 
-lf:=if(f(Z[nz-2]+0.1)>0){"plus;"}else{"moins;"}+if(maxi!=+infinity and f(maxi)==0){"valBarre(btex 0 etex);"}else{if(member(maxi,F)==0){"
-                              "}else{"nonDefBarre;"}
+lf:=if(f(Z[nz-2]+0.1)>0){"plus;"}else{"moins;"}+if(maxi!=+infinity and f(maxi)==0){"valBarre(btex 0 etex);"}else{if(member(maxi,F)==0){"
+                              "}else{"nonDefBarre;"}
                               };
 }};  
 
 
 
 
-MetaLfc:="
+MetaLfc:="
 
 beginTableau("+nmr+")
-newLigneVariables(btex $\\displaystyle  {x}$ etex);
+newLigneVariables(btex $\\displaystyle  {x}$ etex);
    "+l0+lsic+latex(f(x))+"}$ etex);"+
                      li+lm+lf
                      +"
@@ -2748,7 +2705,7 @@ endTableau;
 
 
 sortie:=fopen("XCasmpfc.mp");
-fprint(sortie,Unquoted,MetaLfc);
+fprint(sortie,Unquoted,MetaLfc);
 fclose(sortie);
  }:;
 
@@ -3061,7 +3018,7 @@ read("XCasTVI.user");
 {\setcounter{TVnbis}{\theTVn}
 \setcounter{TVn}{#1}
 \VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\??]{XCasTVI.user}}%
-{\end{VerbatimOut}\dressetoile{TVI}}
+{\end{VerbatimOut}\dressetoile{TVI}}
 
 
 
@@ -3083,7 +3040,7 @@ read("XCasTVIex.user");
 {\setcounter{TVnbis}{\theTVn}
 \setcounter{TVn}{#1}
 \VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\??]{XCasTVIex.user}}%
-{\end{VerbatimOut}\dressetoile{TVIex}}
+{\end{VerbatimOut}\dressetoile{TVIex}}
 
 
 
@@ -3109,7 +3066,7 @@ read("XCasTVIapp.user");
 {\setcounter{TVnbis}{\theTVn}
 \setcounter{TVn}{#1}
 \VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\??]{XCasTVIapp.user}}%
-{\end{VerbatimOut}\dressetoile{TVIapp}}
+{\end{VerbatimOut}\dressetoile{TVIapp}}
 
 
 
@@ -3118,7 +3075,7 @@ read("XCasTVIapp.user");
 \begin{VerbatimOut}{XCasTVPC.giac}
 maple_mode(0);
 read("config.cxx");
-read("XcasTVPC.cxx");
+read("XcasTVPC.cxx");
 read("XCasTVPC.user");
 \end{VerbatimOut}
 
@@ -3129,9 +3086,9 @@ read("XCasTVPC.user");
 
 \newenvironment{TVPC*}[1]{%
 \setcounter{TVnbis}{\theTVn}
-\setcounter{TVn}{#1}
+\setcounter{TVn}{#1}
 \VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\??]{XCasTVPC.user}}%
-{\end{VerbatimOut}\dressetoile{TVPC}}
+{\end{VerbatimOut}\dressetoile{TVPC}}
 
 
 
@@ -3146,14 +3103,14 @@ read("XCasTVPC.user");
 
 %% pour nettoyer les fichiers auxiliaires
 
-\AtEndDocument{\immediate\write18{\cat  queue.mp >> \nomtravail.Tab.mp}
+\AtEndDocument{\immediate\write18{\cat  queue.mp >> \nomtravail.Tab.mp}
                          }
 
 
 
 
 %%
-%% Zi end -> enjoy :)
+%% Zi end -> enjoy :)
 
diff --git a/Master/texmf-dist/doc/latex/tablor/tablor.pdf b/Master/texmf-dist/doc/latex/tablor/tablor.pdf index 1c5b39b2bd2..3d9a5a1476f 100644 Binary files a/Master/texmf-dist/doc/latex/tablor/tablor.pdf and b/Master/texmf-dist/doc/latex/tablor/tablor.pdf differ diff --git a/Master/texmf-dist/doc/latex/tablor/tablor.tex b/Master/texmf-dist/doc/latex/tablor/tablor.tex index 3eb0c0dfbdd..880cfd34a20 100644 --- a/Master/texmf-dist/doc/latex/tablor/tablor.tex +++ b/Master/texmf-dist/doc/latex/tablor/tablor.tex @@ -86,7 +86,7 @@ keywordstyle =\color{0.2white}\usefont{OT1}{cmtt}{b}{n},basicstyle=\ttfamily,com avec l'efficace participation de Jean-Michel \textsc{Boucart}\\ Forum d'aide ~:~\href{http://gconnan.free.fr/punbb/upload/index.php}{http://gconnan.free.fr/punbb/upload/index.php}} -\date{7 mars 2009 - Version 4.04} +\date{17 mars 2009 - Version 4.04-b} @@ -174,6 +174,8 @@ valeurs interm Un bug dans tous les TVI est corrigé.(Version 4.04) +Un bug dû à une mise à jour de XCAS (version 4.04-b compatible avec les précédentes). + \subsection{Professor.sty} diff --git a/Master/texmf-dist/tex/latex/tablor/tablor-xetex.sty b/Master/texmf-dist/tex/latex/tablor/tablor-xetex.sty index 482b6f7a360..f836d5061d1 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}[07/03/2009 v4.04 la machine a creer des +\ProvidesPackage{tablor-xetex}[17/03/2009 v4.04-b la machine a creer des tableaux de signes et variations compatible xetex] % \copyleft Connan le Barbare (aka Guillaume Connan) \copyright @@ -276,14 +276,11 @@ epstopdf $1.eps; - - %% %% Code giac/Xcas pour les Tableaux de Variations %% - \begin{VerbatimOut}{XcasTV.cxx} TV(L,F,nom,nomv,f,ftt,trigo,nmr):={ nl:=size(L); @@ -337,14 +334,9 @@ nz:=size(Z); fpour fsi; -Z:=sort(Z); -nz:=size(Z); - si Z[0]==Z[1] alors Z:=augment(Z[0],Z[2..nz-1]);nz:=nz-1; - fsi; -pour u de 1 jusque nz-2 faire - si Z[u]==Z[u+1] alors Z:=augment(Z[0..u-1],Z[u+1..nz-1]);nz:=nz-1; - fsi; -fpour; + +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); @@ -531,14 +523,9 @@ nz:=size(Z); fpour fsi; -Z:=sort(Z); -nz:=size(Z); - si Z[0]==Z[1] alors Z:=augment(Z[0],Z[2..nz-1]);nz:=nz-1; - fsi; -pour u de 1 jusque nz-2 faire - si Z[u]==Z[u+1] alors Z:=augment(Z[0..u-1],Z[u+1..nz-1]);nz:=nz-1; - fsi; -fpour; + +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); @@ -673,6 +660,7 @@ fclose(sortie); \begin{VerbatimOut}{XcasTVZ.cxx} + TVZ(L,F,FF,nom,nomv,f,ftt,trigo,nmr):={ nl:=size(L); nf:=size(FF); @@ -731,17 +719,9 @@ S:=solve(fp(x),x); fpour fsi; -Z:=sort(Z); -nz:=size(Z); - +Z:=sort([op(set[op(Z)])]); - si Z[0]==Z[1] alors Z:=augment(Z[0],Z[2..nz-1]);nz:=nz-1; - fsi; -pour u de 1 jusque nz-2 faire - si Z[u]==Z[u+1] alors Z:=augment(Z[0..u-1],Z[u+1..nz-1]);nz:=nz-1; - fsi; -fpour; nz:=size(Z); for(j:=0;j2){pour u de 1 jusque nz-2 faire - si Z[u]==Z[u+1] alors Z:=Z[0..u-1],Z[u+1..nz-1];nz:=nz-1; - fsi; -fpour;}; nz:=size(Z); if(nz==0){li:="";l0:="val(btex $"+latex(D[0])+"$ etex);val(btex $"+latex(D[1])+"$ etex);"; @@ -2403,12 +2368,10 @@ if(nz>2){pour u de 1 jusque nz-2 faire fpour;} -Z:=sort(Z); -nz:=size(Z); -if(nz>2){pour u de 1 jusque nz-2 faire - si Z[u]==Z[u+1] alors Z:=Z[0..u-1],Z[u+1..nz-1];nz:=nz-1; - fsi; -fpour;}; +Z:=concat(Z,F); + +Z:=sort([op(set[op(Z)])]); + nz:=size(Z); if(nz==0){li:="";l0:="val(btex $"+latex(D[0])+"$ etex);val(btex $"+latex(D[1])+"$ etex);"; @@ -2637,15 +2600,9 @@ else{pour j de 0 jusque size(S)-1 faire fpour; Z:=concat([Z],F); -Z:=sort(Z); -nz:=size(Z); -if(nz>2){pour u de 1 jusque nz-2 faire - si Z[u]==Z[u+1] alors Z:=concat(Z[0..u-1],Z[u+1..nz-1]);nz:=nz-1; - fsi; -fpour;} -if(Z[0]==Z[1]){Z:=Z[1..nz-1];nz:=nz-1;} -if(Z[nz-2]==Z[nz-1]){Z:=Z[0..nz-2];nz:=nz-1;} + Z:=sort([op(set[op(Z)])]); + nz:=size(Z); l0:=" ";li:=" ";lr:=" "; @@ -2715,11 +2672,6 @@ fclose(sortie); -%%$ - - - - %%$ %% %% traitement des fichiers produits par giac/xcas diff --git a/Master/texmf-dist/tex/latex/tablor/tablor.sty b/Master/texmf-dist/tex/latex/tablor/tablor.sty index 0c084de0fa0..d4aafbfcf0c 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}[07/03/2009 v4.04 la machine a creer des tableaux de signes et variations] +\ProvidesPackage{tablor}[17/03/2009 v4.04-b 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 @@ -299,14 +299,9 @@ nz:=size(Z); fpour fsi; -Z:=sort(Z); -nz:=size(Z); - si Z[0]==Z[1] alors Z:=augment(Z[0],Z[2..nz-1]);nz:=nz-1; - fsi; -pour u de 1 jusque nz-2 faire - si Z[u]==Z[u+1] alors Z:=augment(Z[0..u-1],Z[u+1..nz-1]);nz:=nz-1; - fsi; -fpour; + +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); @@ -493,14 +488,9 @@ nz:=size(Z); fpour fsi; -Z:=sort(Z); -nz:=size(Z); - si Z[0]==Z[1] alors Z:=augment(Z[0],Z[2..nz-1]);nz:=nz-1; - fsi; -pour u de 1 jusque nz-2 faire - si Z[u]==Z[u+1] alors Z:=augment(Z[0..u-1],Z[u+1..nz-1]);nz:=nz-1; - fsi; -fpour; + +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); @@ -694,17 +684,9 @@ S:=solve(fp(x),x); fpour fsi; -Z:=sort(Z); -nz:=size(Z); - +Z:=sort([op(set[op(Z)])]); - si Z[0]==Z[1] alors Z:=augment(Z[0],Z[2..nz-1]);nz:=nz-1; - fsi; -pour u de 1 jusque nz-2 faire - si Z[u]==Z[u+1] alors Z:=augment(Z[0..u-1],Z[u+1..nz-1]);nz:=nz-1; - fsi; -fpour; nz:=size(Z); for(j:=0;j2){pour u de 1 jusque nz-2 faire - si Z[u]==Z[u+1] alors Z:=Z[0..u-1],Z[u+1..nz-1];nz:=nz-1; - fsi; -fpour;}; nz:=size(Z); if(nz==0){li:="";l0:="val(btex $"+latex(D[0])+"$ etex);val(btex $"+latex(D[1])+"$ etex);"; @@ -2353,20 +2325,11 @@ fpour; -Z:=sort(Z); // on classe les zeros dans l'ordre croissant -nz:=size(Z); -if(nz>2){pour u de 1 jusque nz-2 faire - si Z[u]==Z[u+1] alors Z:=Z[0..u-1],Z[u+1..nz-1];nz:=nz-1; // pour les zeros en double - fsi; -fpour;} +Z:=concat(Z,F); -Z:=sort(Z); -nz:=size(Z); -if(nz>2){pour u de 1 jusque nz-2 faire - si Z[u]==Z[u+1] alors Z:=Z[0..u-1],Z[u+1..nz-1];nz:=nz-1; - fsi; -fpour;}; +Z:=sort([op(set[op(Z)])]); + nz:=size(Z); if(nz==0){li:="";l0:="val(btex $"+latex(D[0])+"$ etex);val(btex $"+latex(D[1])+"$ etex);"; @@ -2595,15 +2558,9 @@ else{pour j de 0 jusque size(S)-1 faire fpour; Z:=concat([Z],F); -Z:=sort(Z); -nz:=size(Z); -if(nz>2){pour u de 1 jusque nz-2 faire - si Z[u]==Z[u+1] alors Z:=concat(Z[0..u-1],Z[u+1..nz-1]);nz:=nz-1; - fsi; -fpour;} -if(Z[0]==Z[1]){Z:=Z[1..nz-1];nz:=nz-1;} -if(Z[nz-2]==Z[nz-1]){Z:=Z[0..nz-2];nz:=nz-1;} + Z:=sort([op(set[op(Z)])]); + nz:=size(Z); l0:=" ";li:=" ";lr:=" "; -- cgit v1.2.3