From 66177f74989fac44bc5003990547ae9fcb5e8b00 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Mon, 20 Apr 2009 00:11:54 +0000
Subject: tablor update (19apr09)

git-svn-id: svn://tug.org/texlive/trunk@12753 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/tablor/tablor.sty | 71 ++++++++++++++-------------
 1 file changed, 37 insertions(+), 34 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/tablor/tablor.sty')

diff --git a/Master/texmf-dist/tex/latex/tablor/tablor.sty b/Master/texmf-dist/tex/latex/tablor/tablor.sty
index d4aafbfcf0c..33e97a36a1b 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}[17/03/2009 v4.04-b la machine a creer des tableaux de signes et variations]
+\ProvidesPackage{tablor}[19/04/2009 v4.04-d 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
@@ -881,11 +881,19 @@ nz:=size(z);
 
 
 
-S:=NULL;
-if(L==[-infinity,+infinity]){j:=[seq(-100+k,k=0..200)]minus F;for k in j do S:=S,fsolve(fp(x),x,k/10,newton_solver);end_for}
-else{if(L[0]==-infinity){j:=[seq(k,k=100..floor(L[1]))] minus F;for k in j do S:=S,fsolve(fp(x),x,k/10,newton_solver);end_for}
-else{if(L[1]==+infinity){j:=[seq(k,k=floor(L[0])..100)] minus F;for k in j do S:=S,fsolve(fp(x),x,k/10,newton_solver);end_for;}
-else{ j:=[seq(k,k=floor(z[0])..floor(z[nz-1]))] minus F;for k in j do S:=S,fsolve(fp(x),x,k/10,newton_solver);end_for;  }}};
+S:=op(fsolve(fp(x),x));
+if(L==[-infinity,+infinity]){j:=[seq(-100+k,k=0..200)]minus F;
+  for k in j do for(m:=-5;m<=5;m++){S:=S,fsolve(fp(x),x,k+m*0.1,newton_solver)};end_for}
+else{if(L[0]==-infinity){j:=[seq(k,k=-100..floor(L[1]))] minus F;
+  for k in j do for(m:=-5;m<=5;m++){ S:=S,fsolve(fp(x),x,k+m*0.1,newton_solver)};end_for}
+else{if(L[1]==+infinity){j:=[seq(k,k=floor(L[0])..100)] minus F;
+  for k in j do for(m:=-5;m<=5;m++){ S:=S,fsolve(fp(x),x,k+m*0.1,newton_solver)};end_for;}
+else{ j:=[seq(k,k=floor(z[0])..floor(z[nz-1]))] minus F;
+  for               k                in               j               do
+  for(m:=-5;m<=5;m++){S:=S,fsolve(fp(x),x,k+m*0.1,newton_solver)};end_for; }}};
+
+
+
 
 
 
@@ -1590,11 +1598,19 @@ 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;  }}};
+
+
+S:=op(fsolve(fp(x),x));
+if(L==[-infinity,+infinity]){j:=[seq(-100+k,k=0..200)]minus F;
+  for k in j do for(m:=-5;m<=5;m++){S:=S,fsolve(fp(x),x,k+m*0.1,newton_solver)};end_for}
+else{if(L[0]==-infinity){j:=[seq(k,k=-100..floor(L[1]))] minus F;
+  for k in j do for(m:=-5;m<=5;m++){ S:=S,fsolve(fp(x),x,k+m*0.1,newton_solver)};end_for}
+else{if(L[1]==+infinity){j:=[seq(k,k=floor(L[0])..100)] minus F;
+  for k in j do for(m:=-5;m<=5;m++){ S:=S,fsolve(fp(x),x,k+m*0.1,newton_solver)};end_for;}
+else{ j:=[seq(k,k=floor(z[0])..floor(z[nz-1]))] minus F;
+  for               k                in               j               do
+  for(m:=-5;m<=5;m++){S:=S,fsolve(fp(x),x,k+m*0.1,newton_solver)};end_for; }}};
+
 
 
 
@@ -2279,7 +2295,7 @@ S:=concat(S,simplify(subst(SS[j],n_1=mm)));mm:=mm-1;
 }
 
 }else{
-S:=solve(L[k](x),x);
+S:=concat(S,solve(L[k](x),x));
 }
 
 
@@ -2313,7 +2329,7 @@ SF:=concat(SF,simplify(subst(SSF[j],n_1=mm)));mm:=mm-1;
 }
 
 }else{
-SF:=solve(Fo[k](x),x);
+SF:=concat(SF,solve(Fo[k](x),x));
 }
 
   si size(SF)>0 alors pour j de 0 jusque size(SF)-1 faire 
@@ -2325,7 +2341,7 @@ fpour;
 
 
 
-Z:=concat(Z,F);
+Z:=[Z,F];
 
 
 Z:=sort([op(set[op(Z)])]);
@@ -2352,12 +2368,8 @@ beginTableau("+nmr+")
 newLigneVariables(btex $ {x}$ etex);
    "+l0+li+
    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;"}+  lf+
-                               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;"}+"
+              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;"}+  lf+
+              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;
 
 "
@@ -2377,21 +2389,15 @@ l0:=l0+"val(btex $"+latex(D[1])+"$ etex);";
 
 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{"
-                              "}+ 
+           if(mini!=-infinity and L[p](mini)==0){" valBarre(btex 0 etex);"}else{" "}+ 
            if(L[p](Z[0]-0.01)>0){"plus;"}else{"moins;"};
                                
-                           for(r:=0; r<=nz-2;r++){  
-                             lp:=lp+if(simplify(L[p](Z[r]))==0){"
-                                valBarre(btex 0 etex);"}else{"barre;
-                              "}+ 
+     for(r:=0; r<=nz-2;r++){lp:=lp+if(simplify(L[p](Z[r]))==0){" valBarre(btex 0 etex);"}else{"barre;"}+ 
                              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(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{" "}
                               
     };  
 
@@ -2411,15 +2417,12 @@ newLigneVariables(btex $ {x}$ etex);
                      li
                      +
    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(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(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(member(maxi,FF)==0){if(maxi!=+infinity and product(L[s](maxi),s,0,n-1)==0){"
-                                valBarre(btex 0 etex);"}else{" "}}else{"nonDefBarre;"}+"
+                         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;
 
 "
-- 
cgit v1.2.3

