diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/tablor/tablor.html |
Initial commit
Diffstat (limited to 'macros/latex/contrib/tablor/tablor.html')
-rw-r--r-- | macros/latex/contrib/tablor/tablor.html | 3321 |
1 files changed, 3321 insertions, 0 deletions
diff --git a/macros/latex/contrib/tablor/tablor.html b/macros/latex/contrib/tablor/tablor.html new file mode 100644 index 0000000000..1d5c91754d --- /dev/null +++ b/macros/latex/contrib/tablor/tablor.html @@ -0,0 +1,3321 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> +<!-- Created by htmlize-1.34 in css mode. --> +<html> + <head> + <title>tablor.sty</title> + <style type="text/css"> + <!-- + body { + color: #cdba96; + background-color: #0d0d0d; + font-weight: bold; + } + .comment { + /* font-lock-comment-face */ + color: #ffd700; + background-color: #525252; + } + .comment-delimiter { + /* font-lock-comment-delimiter-face */ + color: #ffd700; + background-color: #525252; + } + .constant { + /* font-lock-constant-face */ + color: #9932cc; + font-weight: bold; + } + .font-latex-math { + /* font-latex-math-face */ + color: #436eee; + } + .font-latex-sedate { + /* font-latex-sedate-face */ + color: #d3d3d3; + } + .font-latex-subscript { + /* font-latex-subscript-face */ + font-size: 80%; + } + .font-latex-superscript { + /* font-latex-superscript-face */ + font-size: 80%; + } + .font-latex-warning { + /* font-latex-warning-face */ + color: #8b0000; + font-weight: bold; + } + .function-name { + /* font-lock-function-name-face */ + color: #87ceeb; + } + .keyword { + /* font-lock-keyword-face */ + color: #6495ed; + font-weight: bold; + } + .variable-name { + /* font-lock-variable-name-face */ + color: #98fb98; + } + + a { + color: inherit; + background-color: inherit; + font: inherit; + text-decoration: inherit; + } + a:hover { + text-decoration: underline; + } + --> + </style> + </head> + <body> + <pre> +<span class="font-latex-sedate">\NeedsTeXFormat</span>{LaTeX2e}[1995/12/01] +<span class="font-latex-sedate">\ProvidesPackage</span>{tablor}[09/05/2010 v4.07 la machine a creer des tableaux de signes et variations] + +<span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\copyleft</span></span><span class="comment"> Connan le Barbare (aka Guillaume Connan) </span><span class="font-latex-sedate"><span class="comment">\copyright</span></span><span class="comment"> +</span><span class="comment-delimiter">% </span><span class="comment">This work may be distributed and/or mofified under the conditions +</span><span class="comment-delimiter">% </span><span class="comment">or the LaTeX Project Public Licence, either v1.3 or (at your option) +</span><span class="comment-delimiter">% </span><span class="comment">any later version. The latest version is in +</span><span class="comment-delimiter">% </span><span class="comment">http://www.latex-project.org/lppl/ +</span><span class="comment-delimiter">% </span><span class="comment">This work consists of the files tablor.sty, tablor-xetex.sty, tablor.cfg, tablor.tex, +</span><span class="comment-delimiter">% </span><span class="comment">tablor.pdf and tablor.html +</span> + +<span class="comment-delimiter">%% </span><span class="comment">Cree 16 environnements : +</span><span class="comment-delimiter">%% </span><span class="comment">tableau de signes de 2 facteurs affines +</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TSa} +</span><span class="comment-delimiter">% </span><span class="comment">TSa(-2,3,-1,5,</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">); +</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TSa} +</span><span class="comment-delimiter">% </span><span class="comment">%%%%%% Pour des tableaux de plus de 2 facteurs +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TS} +</span><span class="comment-delimiter">% </span><span class="comment">TS("P",[-2*x+3,x^2-1,x^2+1,x-1,x^2-2],[a,b],n,</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">); +</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TS} +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">% </span><span class="comment">pour les tableaux de signes avec quotient +</span><span class="comment-delimiter">%</span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TSq} +</span><span class="comment-delimiter">%</span><span class="comment">TSq("Q",[-2*x+3,-4*x+5],[x^2-16,x-2],[a,b],n,</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">) +</span><span class="comment-delimiter">%%</span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TSq} +</span><span class="comment-delimiter">% </span><span class="comment">un tableau de variation : +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">% </span><span class="comment">pour les tableaux de signes à une seule ligne +</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TSc} +</span><span class="comment-delimiter">% </span><span class="comment">TSc((x+10)/((x-5)*(x-2)),[-10,5],[2,5],n,0) +</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TSc} +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TV} +</span><span class="comment-delimiter">% </span><span class="comment">TV([0,+infinity],[0],"h","x",ln(x)-(ln(x))^2,1,n,</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">) +</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TV} +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">% </span><span class="comment">tableau de variation avec liste de valeurs +</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TVS} +</span><span class="comment-delimiter">% </span><span class="comment">TVS([1,2,3,4],[-1,-infinity,+infinity,2,9],[2],"f","x",</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">) +</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TVS} +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">% </span><span class="comment">tableau de variation avec zones interdites +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TVZ} +</span><span class="comment-delimiter">% </span><span class="comment">TVZ([-infinity,+infinity],[],[[-1,1]],"f","x",sqrt(x^2-1),1,n,</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">) +</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TVZ} +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">% </span><span class="comment">tableau avec valeurs intermediares +</span><span class="comment-delimiter">%</span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TVI} +</span><span class="comment-delimiter">%</span><span class="comment">TVI([-1,+infinity],[-1],"f","x",x2/sqrt(x+1)-1,1,2,n,</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">) +</span><span class="comment-delimiter">%</span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TVI} +</span><span class="comment-delimiter">%%%</span><span class="comment"> +</span><span class="comment-delimiter">% </span><span class="comment">tableau avec valeurs intermediares et racines exactes +</span><span class="comment-delimiter">%</span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TVIex} +</span><span class="comment-delimiter">%</span><span class="comment">TVIex([-1,+infinity],[-1],"f","x",x2/sqrt(x+1)-1,1,2,n,</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">) +</span><span class="comment-delimiter">%</span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TVIex} +</span><span class="comment-delimiter">%%%</span><span class="comment"> +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">% </span><span class="comment">tableau de variations avec f' sans zero formel +</span><span class="comment-delimiter">%</span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TVapp} +</span><span class="comment-delimiter">% </span><span class="comment">TVapp([0,+infinity],[0],"g","x",ln(x)-x*exp(2-x),1,</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">) +</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TVapp} +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">% </span><span class="comment">tableau de variations avec f' sans zero formel +</span><span class="comment-delimiter">%</span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TVIapp} +</span><span class="comment-delimiter">% </span><span class="comment">TVIapp([0,+infinity],[0],"g","x",ln(x)-x*exp(2-x),1,0,</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">) +</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TVIapp} +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">%%%</span><span class="comment"> +</span><span class="comment-delimiter">% </span><span class="comment">et leurs pendants etoiles qui permettent l'affichage intermediaire du +</span><span class="comment-delimiter">% </span><span class="comment">fichier metapost pour le modifier +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">% </span><span class="comment">Courbes parametrees +</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TVP} +</span><span class="comment-delimiter">% </span><span class="comment">TVP([-infinity,+infinity],[[-1,2],[-1]],["x","y"],"t",[t^2/((t+1)*(t-2)),t^2*(t+2)/(t+1)],1,n,</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">) +</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TVP} +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TVP} +</span><span class="comment-delimiter">% </span><span class="comment">TVP([0,pi/2],[[],[]],["x","y"],"t",[2*cos(t),sin(2*t)],1,t,</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">) +</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TVP} +</span><span class="comment-delimiter">% </span><span class="comment">% +</span> +<span class="comment-delimiter">% </span><span class="comment">Fonctions prolongeables par continuité +</span><span class="comment-delimiter">% </span><span class="comment">TVP([intervalles d'étude],[valeurs prolongeables],[valeurs interdites pour f'],"g","t",e^(-1/x^2),1,n,</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">); +</span> + +<span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TVPC} +</span><span class="comment-delimiter">% </span><span class="comment">TVPC([-infinity,+infinity],[0],[0],"g","t",e^(-1/x^2),1,n,</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">); +</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TVPC} +</span> + + + + +<span class="comment-delimiter">%% </span><span class="comment">extensions requises +</span><span class="comment-delimiter">%% </span><span class="comment">Il faudra rajouter dans le preambule </span><span class="font-latex-sedate"><span class="comment">\usepackage</span></span><span class="comment">{graphicx} si vous +</span><span class="comment-delimiter">%% </span><span class="comment">ne l'avez pas de base +</span> + +<span class="font-latex-sedate">\RequirePackage</span>{filecontents} +<span class="font-latex-sedate">\RequirePackage</span>{ifthen} +<span class="font-latex-sedate">\RequirePackage</span>{fancyvrb} +<span class="font-latex-sedate">\RequirePackage</span>{ifpdf} + +<span class="font-latex-sedate">\fvset</span>{gobble=0} + +<span class="comment-delimiter">% </span><span class="comment">option xcas present +</span> + +<span class="font-latex-sedate">\newboolean</span>{xcas}<span class="font-latex-sedate">\setboolean</span>{xcas}{false} +<span class="font-latex-sedate">\DeclareOption</span>{xcas}{<span class="font-latex-sedate">\setboolean</span>{xcas}{true}} + +<span class="comment-delimiter">%% </span><span class="comment">Initialisation du choix d'OS +</span><span class="font-latex-sedate">\newboolean</span>{windows}<span class="font-latex-sedate">\setboolean</span>{windows}{false} +<span class="font-latex-sedate">\DeclareOption</span>{windows}{<span class="font-latex-sedate">\setboolean</span>{windows}{true}} + +<span class="font-latex-sedate">\ProcessOptions</span><span class="font-latex-sedate">\relax</span> + + + +<span class="comment-delimiter">%% </span><span class="comment">on configure tablor dans un fichier exterieur pour la plateforme +</span><span class="comment-delimiter">%% </span><span class="comment">et l'editeur +</span> +<span class="font-latex-sedate">\IfFileExists</span>{tablor.cfg}{<span class="font-latex-sedate"><span class="keyword">\input</span></span><span class="constant">{tablor.cfg}</span>}<span class="comment">%</span><span class="font-latex-sedate"><span class="comment">\typeout</span></span><span class="comment">{pas de fichier tablor.cfg}} +</span> + +<span class="comment-delimiter">%% </span><span class="comment">Definit des commandes disque selon l'OS utilise +</span><span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{windows}}<span class="comment">% +</span> {<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\rem</span></span><span class="function-name">}</span>{DEL } <span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\cat</span></span><span class="function-name">}</span>{TYPE } + <span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\cp</span></span><span class="function-name">}</span>{COPY } <span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\echod</span></span><span class="function-name">}</span>{ECHO } + <span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\echof</span></span><span class="function-name">}</span>{ }}<span class="comment">% +</span> {<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\rem</span></span><span class="function-name">}</span>{rm }<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\cat</span></span><span class="function-name">}</span>{cat } + <span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\cp</span></span><span class="function-name">}</span>{cp } <span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\echod</span></span><span class="function-name">}</span>{echo "} + <span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\echof</span></span><span class="function-name">}</span>{"}} + + + + + + + +<span class="comment-delimiter">%% </span><span class="comment">pour ceux compilant via pdflatex +</span> +<span class="font-latex-sedate">\ifpdf</span> +<span class="font-latex-sedate">\DeclareGraphicsRule</span>{*}{mps}{*}{} +<span class="font-latex-sedate">\fi</span> + +<span class="comment-delimiter">%% </span><span class="comment">pour nettoyer les fichiers auxiliaires +</span> +<span class="font-latex-sedate">\AtEndDocument</span>{<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\rem</span> *.user XCas* Xcas* *.mpx} + } + + + + +<span class="comment-delimiter">%% </span><span class="comment">Pour clore les fichiers metapost +</span> + + <span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{queue.mp} + + end + + <span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + + + +<span class="comment-delimiter">%% </span><span class="comment">Nettoie les fichiers log dont le nom depend du choix de l'utilisateur +</span><span class="comment-delimiter">%% </span><span class="comment">Par defaut, c'est le nom du fichier tex courant (</span><span class="font-latex-sedate"><span class="comment">\jobname</span></span><span class="comment">) +</span><span class="comment-delimiter">%% </span><span class="comment">Clôt le fichier metapost contenant le recapitulatif de tous les tableaux +</span> + + +<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\nettoyer</span></span><span class="function-name">}</span>[1][<span class="font-latex-sedate">\jobname</span>]<span class="comment">% +</span>{<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\rem</span> #1.Tab.log queue.mp enteteMP.cfg session.tex config.cxx} +} + + + + +<span class="comment-delimiter">%% </span><span class="comment">Donne comme prefixe aux tableaux le prefixe courant +</span><span class="comment-delimiter">%% </span><span class="comment">Peut-être modifie par </span><span class="font-latex-sedate"><span class="comment">\initablor</span></span><span class="comment"> +</span> +<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\nomtravail</span></span><span class="function-name">}</span>{<span class="font-latex-sedate">\jobname</span>} + +<span class="comment-delimiter">%% </span><span class="comment">initialise les compteurs +</span> +<span class="font-latex-sedate"><span class="keyword">\newcounter</span></span><span class="function-name">{TVn}</span> +<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\tv</span></span><span class="function-name">}</span>{<span class="font-latex-sedate">\theTVn</span>} + +<span class="font-latex-sedate"><span class="keyword">\newcounter</span></span><span class="function-name">{TVnbis}</span> +<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\tvbis</span></span><span class="function-name">}</span>{<span class="font-latex-sedate">\theTVnbis</span>} + + + +<span class="comment-delimiter">%% </span><span class="comment">permet de donner un prefixe aux tableaux produits (</span><span class="font-latex-sedate"><span class="comment">\jobname</span></span><span class="comment"> par defaut) +</span><span class="comment-delimiter">%% </span><span class="comment">effectue quelques verifications : +</span> + +<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\initablor</span></span><span class="function-name">}</span>[1][<span class="font-latex-sedate">\jobname</span>]{<span class="comment">% +</span><span class="font-latex-sedate"><span class="keyword">\renewcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\nomtravail</span></span><span class="function-name">}</span>{#1}<span class="comment">% Arret du nom des tableaux +</span><span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVn}{0}</span><span class="comment">% Initialisation du compteur de tableaux. +</span><span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{xcas}}<span class="comment">% Avec l'option XCas +</span>{<span class="font-latex-sedate">\IfFileExists</span>{<span class="font-latex-sedate">\nomtravail</span>_Tab.mp}<span class="comment">% Si Tableaux.mp est present... +</span> {<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\rem</span> <span class="font-latex-sedate">\nomtravail</span>_Tab.mp}}<span class="comment">% le detruire +</span> {}<span class="comment">% +</span> <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\cp</span> enteteMP.cfg <span class="font-latex-sedate">\nomtravail</span>_Tab.mp}<span class="comment">% Reconstituer l'entête de Tableaux.mp +</span>} +{<span class="font-latex-sedate">\IfFileExists</span>{<span class="font-latex-sedate">\nomtravail</span>_Tab.mp}<span class="comment">% Sans l'option XCas, si +</span> <span class="comment">% Tableaux.mp existe +</span>{<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{mpost -interaction=batchmode <span class="font-latex-sedate">\nomtravail</span>_Tab}}<span class="comment">% l'executer pour reconstituer les figures +</span>{<span class="font-latex-sedate">\PackageWarning</span>{tablor}{Pas de source metapost pour creer les tableaux.}}<span class="comment">% sinon message d'erreur +</span> <span class="comment">% (mais pas d'arret car les tableaux +</span> <span class="comment">% peuvent être presents ) +</span>}}<span class="comment">% +</span> + + +<span class="comment-delimiter">%% </span><span class="comment">commande pour lancer giac selon l'OS +</span> +<span class="font-latex-sedate">\makeatletter</span> +<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\executGiacmp</span></span><span class="function-name">}</span>[1]{<span class="comment">% +</span><span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{windows}}<span class="comment">% +</span>{<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{giac #1 }}<span class="comment">% +</span>{<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{giac <#1 }}} +<span class="font-latex-sedate">\makeatother</span> + + + + +<span class="comment-delimiter">%%%</span><span class="comment"> +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">%%% </span><span class="comment">LES SCRIPTS GIAC/XCAS +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">%%%</span><span class="comment"> +</span> + + + +<span class="comment-delimiter">%%</span><span class="comment"> +</span><span class="comment-delimiter">%% </span><span class="comment">Code giac/Xcas pour les Tableaux de Variations +</span><span class="comment-delimiter">%%</span><span class="comment"> +</span> + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTV.cxx} +TV(L,F,nom,nomv,f,ftt,trigo,nmr):={ +nl:=size(L); +f:=unapply(f,x); +fp:=function_diff(f); +Z:=concat(L,F); +S:=[]; + + +if(trigo==t){ +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])){ +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]){ +S:=concat(S,simplify(subst(SS[k],n_1=m)));m:=m-1; +} +} +}else{ +S:=solve(factor(simplify(fp(x))),x); +} + + + si size(S)>0 alors pour j de 0 jusque size(S)-1 faire + 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 + fsi; +Z:=sort(Z); +nz:=size(Z); + + + tantque evalf(Z[0])==evalf(Z[1]) faire Z:=Z[1..nz-1];nz:=size(Z); + ftantque; + + + + + + + + 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; + + +Z:=sort([op(set[op(Z)])]); + +nz:=size(Z); +l0:=" newLigneVariables(btex <span class="font-latex-math">$"+nomv+"$</span> etex);";lp:=" "; lf:=" ";lsp:=" "; +pour m de 0 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[m])+"$</span> 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)); + +lsi:=lsic+nom+"'("+nomv+")}<span class="font-latex-math">$ etex);"+ + if(Z[0]==-infinity){if(sign(evalf(fp(if(Z[1]==+infinity){0}else{Z[1]-10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-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^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-5))))==1.0){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ + if(evalf(sign(fp((Z[0]+10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-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;"}+ + if(ksp==1){"plus;"}else{"moins;"} + }; } + +lsf:=if(member(Z[nz-1],F)==0){""}else{"nonDefBarre; +"} +lm0:=limit(f(x),x=Z[0],1)==-infinity; + li:=lvic+nom+"}$</span> etex);"+ + if(member(Z[0],F)==0){"valPos(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$</span> etex,"} + else{"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$</span> 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 + <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],-1)))}+"$</span> + etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} + else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f(Z[r])))+"$</span> + 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 <span class="font-latex-math">$"+ + if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ + if(kz==1){"1);"}else{"0);"}} + else{"limGauche(btex <span class="font-latex-math">$"+ + if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ + if(kz==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}}; + + + + + +MetaLfc:=if(ftt==2){if(nz>2){" + +beginTableau("+nmr+")"+ + l0+lsi+lsp+lsf+" +endTableau; + +";}else{ +"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+" +endTableau; + +"; +} +}else{ if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+ + l0+ +li+ +lp+ +lf ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +li+ +lf ++" +endTableau; + +";}}else{ +if(nz>2){"beginTableau("+nmr+")"+ + l0+ +lsi+lsp+lsf+ +li+ +lp+ +lf ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+ +li+ +lf ++" +endTableau; + +";} +}} + + +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); + + + }:; + +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + + + + + + +<span class="comment-delimiter">%%%%</span><span class="comment"> +</span> + +<span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">% </span><span class="comment">TVPC : pour les fonctions prolongeables par continuité. +</span><span class="comment-delimiter">%%</span><span class="comment"> +</span><span class="comment-delimiter">%%</span><span class="comment"> +</span> + + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTVPC.cxx} +TVPC(L,F,FP,nom,nomv,f,ftt,trigo,nmr):={ +nl:=size(L); +f:=unapply(f,x); +fp:=function_diff(f); +Z:=concat(L,F); +Z:=concat(Z,FP); +S:=[]; + + +if(trigo==t){ +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])){ +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]){ +S:=concat(S,simplify(subst(SS[k],n_1=m)));m:=m-1; +} +} +}else{ +S:=solve(factor(simplify(fp(x))),x); +} + + + si size(S)>0 alors pour j de 0 jusque size(S)-1 faire + 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 + fsi; +Z:=sort(Z); +nz:=size(Z); + + + tantque evalf(Z[0])==evalf(Z[1]) faire Z:=Z[1..nz-1];nz:=size(Z); + ftantque; + + + + + + + + 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; + + +Z:=sort([op(set[op(Z)])]); + +nz:=size(Z); +l0:=" newLigneVariables(btex <span class="font-latex-math">$"+nomv+"$</span> etex);";lp:=" "; lf:=" ";lsp:=" "; +pour m de 0 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[m])+"$</span> 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)); + +lsi:=lsic+nom+"'("+nomv+")}<span class="font-latex-math">$ etex);"+ + if(Z[0]==-infinity){if(sign(evalf(fp(if(Z[1]==+infinity){0}else{Z[1]-10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-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^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-5))))==1.0){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ + if(evalf(sign(fp((Z[0]+10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-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],FP)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ + if(ksp==1){"plus;"}else{"moins;"} + }; } + +lsf:=if(member(Z[nz-1],FP)==0){""}else{"nonDefBarre; +"} +lm0:=limit(f(x),x=Z[0],1)==-infinity; + li:=lvic+nom+"}$</span> etex);"+ + if(member(Z[0],F)==0){"valPos(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$</span> etex,"} + else{"limDroite(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$</span> 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 + <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],-1)))}+"$</span> + etex,"+if(krm==1){"1);"}else{"0);"} } + else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f(Z[r])))+"$</span> + 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 <span class="font-latex-math">$"+ + if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ + if(kz==1){"1);"}else{"0);"}} + else{"limGauche(btex <span class="font-latex-math">$"+ + if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ + if(kz==1){"1);"}else{"0);"}}; + + + + + +MetaLfc:=if(ftt==2){if(nz>2){" + +beginTableau("+nmr+")"+ + l0+lsi+lsp+lsf+" +endTableau; + +";}else{ +"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+" +endTableau; + +"; +} +}else{ if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+ + l0+ +li+ +lp+ +lf ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +li+ +lf ++" +endTableau; + +";}}else{ +if(nz>2){"beginTableau("+nmr+")"+ + l0+ +lsi+lsp+lsf+ +li+ +lp+ +lf ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+ +li+ +lf ++" +endTableau; + +";} +}} + + +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); + + + }:; + +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + + + + + + + + + + + + +<span class="comment-delimiter">%%</span><span class="comment"> +</span><span class="comment-delimiter">%%</span><span class="comment"> +</span><span class="comment-delimiter">%% </span><span class="comment">TV avec une zone interdite : on rajoute comme argument la liste des intervalles interdits +</span><span class="comment-delimiter">%% </span><span class="comment">par exemple, pour sqrt(x^2-1) : TVZ([-infinity,100],[],[[-1,1]],"f","x",sqrt(x^2-1),1,1) +</span><span class="comment-delimiter">%%</span><span class="comment"> +</span> +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTVZ.cxx} + + +TVZ(L,F,FF,nom,nomv,f,ftt,trigo,nmr):={ +nl:=size(L); +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]]}; +if(FF[k][1]<L[1]){Imax[k]:=FF[k][1];LL:=L}else{Imax[k]:=L[1];LL:=[L[0]]}; + Ff:=Ff,[Imin[k],Imax[k]]; + IMIN:=IMIN,Imin[k]; + IMAX:=IMAX,Imax[k]; + } + FF:=[Ff]; + IMIN:=[IMIN]; + IMAX:=[IMAX]; + f:=unapply(f,x); +fp:=function_diff(f); +Z:=concat(LL,F); + +for(k:=0;k<nf;k++){ +Z:=concat(Z,FF[k]); +} + +S:=[]; + + +if(trigo==t){ +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])){ +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]){ +S:=concat(S,simplify(subst(SS[k],n_1=m)));m:=m-1; +} +} +}else{ +S:=solve(factor(simplify(fp(x))),x); +} + + + + + + + si size(S)>0 alors pour j de 0 jusque size(S)-1 faire + for(k:=0;k<nf;k++){ + kk:=(evalf(S[j])>=evalf(L[0])) and (evalf(S[j])<=evalf(L[nl-1])); + kK:=(evalf(S[j])<evalf(Imin[k])) or (evalf(S[j])>evalf(Imax[k])); + Kk:=(kk) and kK; + if(Kk==1){Z:=append(Z,simplify(S[j]))}; + } + fpour + fsi; + + +Z:=sort([op(set[op(Z)])]); + +nz:=size(Z); + +for(j:=0;j<nf;j++){ + for(k:=1;k<nz;k++){ + if ((Z[k]>Imin[j])and(Z[k]<Imax[j])){Z:=augment(Z[0..k-1],Z[k+1..nz-1]);nz:=nz-1; + } + } +} +nz:=size(Z); + +l0:=" newLigneVariables(btex <span class="font-latex-math">$"+nomv+"$</span> etex);";lp:=" "; lf:=" ";lsp:=" "; +pour m de 0 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[m])+"$</span> 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)); + +lsi:=lsic+nom+"'("+nomv+")}<span class="font-latex-math">$ 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^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-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^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-5))))==1.0){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ + if(evalf(sign(fp((Z[0]+10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-5)))))==1.0){"plus;"}else{"moins;"} }}} + + + +// modif 3 avril 2010 + +if(nz>2){ for(r:=1; r<=nz-2;r++){ + 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(evalf(fp(Z[r]+0.01))>0){"plus;"} + else{"moins;"}} + else{if(member(Z[r],F)==0){"valBarre(btex 0 etex);"} + else{"nonDefBarre;"}+ + if(evalf(fp(Z[r]+0.01))>0){"plus;"} + else{"moins;"} + }} + }}; + +// fin modif + + + + + +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; +"}} + + +lm0:=limit(f(x),x=Z[0],1)==-infinity; + li:=lvic +nom+"}$</span> etex);"+ + if(member(Z[0],F)==0){"valPos(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$</span> etex,"} + else{"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$</span> 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],IMIN)!=0){"limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){ + "-\\infty"}else{ + latex(simplify(limit(f(x),x=Z[r],-1)))} + +"$</span> etex,"+if(krm==1){ + "1);"}else{"0);"} + +if(member(Z[r],F)==0){"debutNonDef;"}else{"debutNonDefStrict;"} + }//fsi Zr=Imin + else{ + if (member(Z[r],IMAX)!=0){if(member(Z[r],F)==0){"finNonDef;"}else{"finNonDefStrict;"}+"limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){ + "-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],1)))} + +"$</span> etex,"+if(krp==1){ + "1);"}else{"0);"} + }else{ + if(member(Z[r],F)){ + "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){ + "-\\infty"}else{ + latex(simplify(limit(f(x),x=Z[r],-1)))} + +"$</span> etex,"+if(krm==1){ + "1);"}else{"0);"} + +"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){ + "-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],1)))} + +"$</span> etex,"+if(krp==1){ + "1);"}else{"0);"} + }//fsi (member Zr F) + else{"valPos(btex<span class="font-latex-math">$"+latex(simplify(f(Z[r])))+"$</span>etex,"+ + if(sign(evalf(fp(Z[r]-0.01)))==sign(fp(Z[r]+0.01))){ + "0.5);"}else{ + if(krp==1){ + "1);"}else{"0);"}//felse(krp) + }//felse(valpos) + }//felse(member Zr F) + } //felse(Zr=Imax) + }//felse(Zr=Imin) + };//ffor + }//fsi nz + +lnz:=limit(f(x),x=Z[nz-1],-1)==-infinity; + + + +lf:=if(member(Z[nz-1],F)==0){"valPos(btex <span class="font-latex-math">$"+ + if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ + if(kz==1){"1);"}else{"0);"}} + else{"limGauche(btex <span class="font-latex-math">$"+ + if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ + if(kz==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}}; + + + + + +MetaLfc:=if(ftt==2){if(nz>2){" + +beginTableau("+nmr+")"+ + l0+lsi+lsp+lsf+" +endTableau; + +";}else{ +"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+" +endTableau; + +"; +} +}else{ if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+ + l0+ +li+ +lp+ +lf ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +li+ +lf ++" +endTableau; + +";}}else{ +if(nz>2){"beginTableau("+nmr+")"+ + l0+ +lsi+lsp+lsf+ +li+ +lp+ +lf ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+ +li+ +lf ++" +endTableau; + +";} +}} + + +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); + + } +:; + + +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + + +<span class="comment-delimiter">%%</span><span class="comment"> +</span><span class="comment-delimiter">%%</span><span class="comment"> +</span><span class="comment-delimiter">%% </span><span class="comment">Quand les solutions formelles de f'(x)=0 ne sont pas calculables +</span><span class="comment-delimiter">%%</span><span class="comment"> +</span> + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTVapp.cxx} + + +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); +f:=unapply(f,x); +fp:=function_diff(f); +z0:=concat(L,F);z:=sort(z0); +nz:=size(z); + + + +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; + 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[1]==+infinity){ +j:=[seq(2*k,k=floor(0.5*L[0])..0.5*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{ j:=[seq(2*k,k=0.5*floor(z[0])..0.5*floor(z[nz-1]))] 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 } + }}; + + + + +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]))}}; + fpour; +fsi; + + +S:=NULL; +S:=S,z[0]; +for(j:=1;j<size(z);j++){ + if(z[j]!=undef and (abs(z[j])>1e-15 or z[j]==0)){ + S:=S,z[j]}; +} +z:=[S]; + +Z:=sort(z); +nz:=size(Z); + +S:=NULL; +S:=S,Z[0]; +for(j:=1;j<nz;j++){ + if(Z[j]!=S[size(S)-1]){ + S:=S,Z[j]}; +} +Z:=[S]; + + +nz:=size(Z); +l0:=" newLigneVariables(btex <span class="font-latex-math">$"+nomv+"$</span> etex);";lp:=" "; lf:=" ";lsp:=" "; +pour m de 0 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[m])+"$</span> 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)); + +lsi:=lsic+nom+"'("+nomv+")}<span class="font-latex-math">$ etex);"+ + if(Z[0]==-infinity){if(sign(evalf(fp(if(Z[1]==+infinity){0}else{Z[1]-10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-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^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-5))))==1.0){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ + if(evalf(sign(fp((Z[0]+10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-5)))))==1.0){"plus;"}else{"moins;"} }} + +if(nz>2){ for(r:=1; r<=nz-2;r++){ ksp:=evalf(fp(Z[r]+0.01))>0; + lsp:=lsp+if(member(Z[r],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ + if(ksp==1){"plus;"}else{"moins;"} + }; } + +lsf:=if(member(Z[nz-1],F)==0){""}else{"nonDefBarre; +"} +lm0:=limit(f(x),x=Z[0],1)==-infinity; + li:=lvic+nom+"}$</span> etex);"+ + if(member(Z[0],F)==0){"valPos(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$</span> etex,"} + else{"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$</span> 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 <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} + else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f(Z[r])))+"$</span> + 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 <span class="font-latex-math">$"+ + if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ + if(kz==1){"1);"}else{"0);"}} + else{"limGauche(btex <span class="font-latex-math">$"+ + if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ + if(kz==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}}; + + + +MetaLfc:=if(ftt==2){if(nz>2){" + +beginTableau("+nmr+")"+ + l0+lsi+lsp+lsf+" +endTableau; + +";}else{ +"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+" +endTableau; + +"; +} +}else{ if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+ + l0+ +li+ +lp+ +lf ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +li+ +lf ++" +endTableau; + +";}}else{ +if(nz>2){"beginTableau("+nmr+")"+ + l0+ +lsi+lsp+lsf+ +li+ +lp+ +lf ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+ +li+ +lf ++" +endTableau; + +";} +}} + + +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); + + + }:; + + + + + + + +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + + + + + + + +<span class="comment-delimiter">%%</span><span class="comment"> +</span><span class="comment-delimiter">%% </span><span class="comment">Code giac/Xcas pour les Tableaux de Variations avec +</span><span class="comment-delimiter">%% </span><span class="comment">Valeurs intermediaires +</span><span class="comment-delimiter">%%</span><span class="comment"> +</span> + + + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTVI.cxx} + + +TVI(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:=[]; + + +if(trigo==t){ +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])){ +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]){ +S:=concat(S,simplify(subst(SS[k],n_1=m)));m:=m-1; +} +} +}else{ +S:=solve(factor(simplify(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])); + if(kk==1){Z:=append(Z,simplify(S[j]))}; + fpour + fsi; + + +Z:=sort([op(set[op(Z)])]); + + + +nz:=size(Z); +l0:=" newLigneVariables(btex <span class="font-latex-math">$"+nomv+"$</span> etex);";lp:=" "; lf:=" ";lsp:=" "; + + + +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; + 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(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; + + + +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 <span class="font-latex-math">$"+latex(Z[k])+"$</span> etex);"+"val(btex <span class="font-latex-math">$\\alpha_</span><span class="font-latex-subscript"><span class="font-latex-math">"</span></span><span class="font-latex-math">+aa+"$</span> etex);";aa:=aa+1;}else{l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[k])+"$</span> etex);"}} +l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[nz-1])+"$</span> 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 <span class="font-latex-math">$"+latex(Z[kk])+"$</span> etex);"+"val(btex <span class="font-latex-math">$\\alpha_</span><span class="font-latex-subscript"><span class="font-latex-math">"</span></span><span class="font-latex-math">+aa+"$</span> etex);";aa:=aa+1;kk:=kk+1} +else{l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[kk])+"$</span> etex);";kk:=kk+1}}; +} + + l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[nz-1])+"$</span> etex);" + + }; + + +TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))==0.0) or (evalf(sign(LL[1]-ao))==0.0); + k0:= evalf(limit(f(x),x=Z[0],1))> evalf(limit(f(x),x=Z[1],-1)); + kz:=evalf(limit(f(x),x=Z[nz-1],-1))> evalf(limit(f(x),x=Z[nz-2],1)); + +lsi:=lsic+nom+"'("+nomv+")}<span class="font-latex-math">$ etex);"+ + if(Z[0]==-infinity){if(evalf(sign(fp(if(Z[1]==+infinity){0}else{Z[1]-10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-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^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-3)))))==1.0){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ + if(evalf(sign(fp(10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-3)+Z[0])))==1.0){"plus;"}else{"moins;"} }}+if(TestS==0){"valBarre(btex$</span> + <span class="font-latex-math">$ etex);"+ +if(evalf(sign(fp(10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-3)+ifte(Z[0]==-infinity,ifte(Z[1]==+infinity,ifte(member(0,F)==0,0,0.01),ifte(member(Z[1]-1,F)==0,Z[1]-1,Z[1]-1.1)),Z[0]))))==1.0){"plus;"}else{"moins;"}}else{" "}; + + + + + +if(nz>2){rr:=1; if(nz==NL){for(r:=1; r<=NL-2;r++){ TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); + ksp:=evalf(fp(Z[r]+0.01))>0; + TestL:=(abs(LL[r])==abs(LL[r+1])); + lsp:=lsp+if(member(Z[r],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ + if(ksp==1){"plus;"}else{"moins;"}+if(TestS==0){"valBarre(btex $</span> <span class="font-latex-math">$ 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); + + 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 $</span> <span class="font-latex-math">$ 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;"} + + + +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); + + li:=lvic+nom+"}$</span> etex); +"+ if(member(Z[0],F)==0){"valPos(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$</span> etex,"} + else{"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$</span> etex,"}+ + if(k0==1){"1);"}else{"0);"}+if(TestS==0){"valPos(btex <span class="font-latex-math">$ "+ao+" $</span> etex,0.5);"}else{" "}; + + + if(nz>2){if(nz==NL){for(r:=1; r<=nz-2;r++){TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); + krm:=evalf(limit(f(x),x=Z[r-1],1))< evalf(limit(f(x),x=Z[r],-1)); + krp:=evalf(limit(f(x),x=Z[r],1))> evalf(limit(f(x),x=Z[r+1],-1)) ; + lmrm:=limit(f(x),x=Z[r],-1)==-infinity;lmrp:=limit(f(x),x=Z[r],1)==-infinity; + lp:=lp+if(member(Z[r],F)) { + "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} + else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f(Z[r])))+"$</span> + 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 + <span class="font-latex-math">$ "+ao+" $</span> etex,0.5);" + }else{" "}; +};//for +}else{rr:=1;for(r:=1; r<=NL-2;r++){TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); + krm:=evalf(limit(f(x),x=Z[rr-1],1))< evalf(limit(f(x),x=Z[rr],-1)); + krp:=evalf(limit(f(x),x=Z[rr],1))> evalf(limit(f(x),x=Z[rr+1],-1)) ; + lmrm:=limit(f(x),x=Z[rr],-1)==-infinity;lmrp:=limit(f(x),x=Z[rr],1)==-infinity; TestL:=(abs(LL[r])==abs(LL[r+1])); + +if(PB[r]==1){if(TestS==0){lp:=lp+if(member(Z[rr],F)){ + "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} + else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f(Z[rr])))+"$</span> + 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 + <span class="font-latex-math">$ "+ao+" $</span> etex,0.5); + ";rr:=rr+1; +}// testS==0 +else{lp:=lp+if(member(Z[rr],F)){ + "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} + else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f(Z[rr])))+"$</span> + etex,"+if(evalf(sign(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0); + "}}};rr:=rr+1; +}//else testS==0 +}//PB[r]==1 +}//for nz<NL +}// else nz<NL +//if nz=NL +};//if nz>2 + + + +lnz:=limit(f(x),x=Z[nz-1],-1)==-infinity; + + +lf:=if(member(Z[nz-1],F)==0){"valPos(btex <span class="font-latex-math">$"+ + if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ + if(kz==1){"1);"}else{"0);"}} + else{"limGauche(btex <span class="font-latex-math">$"+ + if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ + if(kz==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}}; + + + + + + + +MetaLfc:= if(ftt==2){if(nz>2){"beginTableau("+nmr+")"+ + l0+lsi+lsp+lsf+" +endTableau; + +";}else{ +"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+" +endTableau; + +"; +} +}else{ +if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+ + l0+ +li+ +lp+ +lf ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +li+ +lf ++" +endTableau; +";}}else{ +if(nz>2){"beginTableau("+nmr+")"+ + l0+ +lsi+lsp+lsf+ +li+ +lp+ +lf ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+ +li+ +lf ++" +endTableau; + +";} +}}; + + + + + + + +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); + + + }:; + + + +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + + + +<span class="comment-delimiter">%%</span><span class="comment"> +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">% </span><span class="comment">Pour avoir les racines sous forme exacte.... quand c'est possible ! +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">%</span><span class="comment"> +</span><span class="comment-delimiter">%%%%%%%%%</span><span class="comment"> +</span> + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTVIex.cxx} + + + +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); +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]; + + + + + + + + +if(trigo==t){ +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])){ +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]){ +S:=concat(S,simplify(subst(SS[k],n_1=m)));m:=m-1; +} +} +}else{ +S:=solve(factor(simplify(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])); + if(kk==1){Z:=append(Z,simplify(S[j]))}; + fpour + fsi; + + + + Z:=sort([op(set[op(Z)])]); + + +nz:=size(Z); +l0:=" newLigneVariables(btex <span class="font-latex-math">$"+nomv+"$</span> etex);";lp:=" "; lf:=" ";lsp:=" "; + + + +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; + 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(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; + + + +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 <span class="font-latex-math">$"+latex(Z[k])+"$</span> etex);"+"val(btex <span class="font-latex-math">$"+latex(simplify(Sex[aa]))+"$</span> etex);";aa:=aa+1;}else{l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[k])+"$</span> etex);"}} +l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[nz-1])+"$</span> 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 <span class="font-latex-math">$"+latex(Z[kk])+"$</span> etex);"+"val(btex <span class="font-latex-math">$"+latex(simplify(Sex[aa]))+"$</span> etex);";aa:=aa+1;kk:=kk+1} +else{l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[kk])+"$</span> etex);";kk:=kk+1}}; +} + + l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[nz-1])+"$</span> etex);" + + }; + + +TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))==0.0) or (evalf(sign(LL[1]-ao))==0.0); + k0:= evalf(limit(f(x),x=Z[0],1))> evalf(limit(f(x),x=Z[1],-1)); + kz:=evalf(limit(f(x),x=Z[nz-1],-1))> evalf(limit(f(x),x=Z[nz-2],1)); + +lsi:=lsic+nom+"'("+nomv+")}<span class="font-latex-math">$ etex);"+ + if(Z[0]==-infinity){if(evalf(sign(fp(if(Z[1]==+infinity){0}else{Z[1]-10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-5)})))==1){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){ + if(fp(Z[0])==0){"valBarre(btex 0 etex);"}else{" "}+ + if(sign(fp((Z[0]+10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-3))))==1){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ + if(sign(fp(10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-3)+Z[0]))==1){"plus;"}else{"moins;"} }}+if(TestS==0){"valBarre(btex$</span> + <span class="font-latex-math">$ etex);"+ +if(evalf(sign(fp(10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-3)+ifte(Z[0]==-infinity,ifte(Z[1]==+infinity,ifte(member(0,F)==0,0,0.01),ifte(member(Z[1]-1,F)==0,Z[1]-1,Z[1]-1.1)),Z[0]))))==1.0){"plus;"}else{"moins;"}}else{" "}; + + + + +if(nz>2){rr:=1; if(nz==NL){for(r:=1; r<=NL-2;r++){ TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); + ksp:=evalf(fp(Z[r]+0.01))>0; + TestL:=(abs(LL[r])==abs(LL[r+1])); + lsp:=lsp+if(member(Z[r],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ + if(ksp==1){"plus;"}else{"moins;"}+if(TestS==0){"valBarre(btex $</span> <span class="font-latex-math">$ 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); + + 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 $</span> <span class="font-latex-math">$ 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;"} + + + +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); + + li:=lvic+nom+"}$</span> etex); +"+ if(member(Z[0],F)==0){"valPos(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$</span> etex,"} + else{"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$</span> etex,"}+ + if(k0==1){"1);"}else{"0);"}+if(TestS==0){"valPos(btex <span class="font-latex-math">$ "+ao+" $</span> etex,0.5);"}else{" "}; + + + if(nz>2){if(nz==NL){for(r:=1; r<=nz-2;r++){TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); + krm:=evalf(limit(f(x),x=Z[r-1],1))< evalf(limit(f(x),x=Z[r],-1)); + krp:=evalf(limit(f(x),x=Z[r],1))> evalf(limit(f(x),x=Z[r+1],-1)) ; + lmrm:=limit(f(x),x=Z[r],-1)==-infinity;lmrp:=limit(f(x),x=Z[r],1)==-infinity; + lp:=lp+if(member(Z[r],F)) { + "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} + else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f(Z[r])))+"$</span> + 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 + <span class="font-latex-math">$ "+ao+" $</span> etex,0.5);" + }else{" "}; +};//for +}else{rr:=1;for(r:=1; r<=NL-2;r++){TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); + krm:=evalf(limit(f(x),x=Z[rr-1],1))< evalf(limit(f(x),x=Z[rr],-1)); + krp:=evalf(limit(f(x),x=Z[rr],1))> evalf(limit(f(x),x=Z[rr+1],-1)) ; + lmrm:=limit(f(x),x=Z[rr],-1)==-infinity;lmrp:=limit(f(x),x=Z[rr],1)==-infinity; TestL:=(abs(LL[r])==abs(LL[r+1])); + +if(PB[r]==1){if(TestS==0){lp:=lp+if(member(Z[rr],F)){ + "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} + else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f(Z[rr])))+"$</span> + 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 + <span class="font-latex-math">$ "+ao+" $</span> etex,0.5); + ";rr:=rr+1; +}// testS==0 +else{lp:=lp+if(member(Z[rr],F)){ + "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} + else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f(Z[rr])))+"$</span> + etex,"+if(evalf(sign(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0); + "}}};rr:=rr+1; +}//else testS==0 +}//PB[r]==1 +}//for nz<NL +}// else nz<NL +//if nz=NL +};//if nz>2 + + + +lnz:=limit(f(x),x=Z[nz-1],-1)==-infinity; + + +lf:=if(member(Z[nz-1],F)==0){"valPos(btex <span class="font-latex-math">$"+ + if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ + if(kz==1){"1);"}else{"0);"}} + else{"limGauche(btex <span class="font-latex-math">$"+ + if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ + if(kz==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}}; + + + + + + + +MetaLfc:= if(ftt==2){if(nz>2){"beginTableau("+nmr+")"+ + l0+lsi+lsp+lsf+" +endTableau; + +";}else{ +"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+" +endTableau; + +"; +} +}else{ +if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+ + l0+ +li+ +lp+ +lf ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +li+ +lf ++" +endTableau; +";}}else{ +if(nz>2){"beginTableau("+nmr+")"+ + l0+ +lsi+lsp+lsf+ +li+ +lp+ +lf ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+ +li+ +lf ++" +endTableau; + +";} +}}; + + + + + + +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); + + + }:; + + +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + + + + + + + +<span class="comment-delimiter">%%</span><span class="comment"> +</span><span class="comment-delimiter">%%</span><span class="comment"> +</span><span class="comment-delimiter">%% </span><span class="comment">Quand les solutions de f'(x)=0 ne sont pas formellement calculables +</span><span class="comment-delimiter">%%</span><span class="comment"> +</span> + + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTVIapp.cxx} + +TVIapp(L,F,nom,nomv,f,ftt,ao,nmr):={ + + +nl:=size(L); +f:=unapply(f,x); +fp:=function_diff(f); +z0:=concat(L,F);z:=sort(z0); +nz:=size(z); + + + + + + + +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; + 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[1]==+infinity){ +j:=[seq(2*k,k=floor(0.5*L[0])..0.5*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{ j:=[seq(2*k,k=0.5*floor(z[0])..0.5*floor(z[nz-1]))] 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 } + }}; + + + + + + + + + + + + + +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]))}}; + fpour; +fsi; + + +S:=NULL; +S:=S,z[0]; +for(j:=1;j<size(z);j++){ + if(z[j]!=undef and (abs(z[j])>1e-15 or z[j]==0)){ + S:=S,z[j]}; +} +z:=[S]; + + + +Z:=sort(z); +nz:=size(Z); + +S:=NULL; +S:=S,Z[0]; +for(j:=1;j<nz;j++){ + if(Z[j]!=S[size(S)-1]){ + S:=S,Z[j]}; +} +Z:=[S]; + + +nz:=size(Z); +l0:=" newLigneVariables(btex <span class="font-latex-math">$"+nomv+"$</span> etex);";lp:=" "; lf:=" ";lsp:=" "; + + + +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; + 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(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; + + +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 <span class="font-latex-math">$"+latex(Z[k])+"$</span> etex);"+"val(btex <span class="font-latex-math">$\\alpha_</span><span class="font-latex-subscript"><span class="font-latex-math">"</span></span><span class="font-latex-math">+aa+"$</span> etex);";aa:=aa+1;}else{l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[k])+"$</span> etex);"}} +l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[nz-1])+"$</span> 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 <span class="font-latex-math">$"+latex(Z[kk])+"$</span> etex);"+"val(btex <span class="font-latex-math">$\\alpha_</span><span class="font-latex-subscript"><span class="font-latex-math">"</span></span><span class="font-latex-math">+aa+"$</span> etex);";aa:=aa+1;kk:=kk+1} +else{l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[kk])+"$</span> etex);";kk:=kk+1}}; +} + + l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[nz-1])+"$</span> etex);" + + }; + + +TestS:=(evalf(sign(LL[0]-ao))==evalf(sign(LL[1]-ao))) or (evalf(sign(LL[0]-ao))==0.0) or (evalf(sign(LL[1]-ao))==0.0); + k0:= evalf(limit(f(x),x=Z[0],1))> evalf(limit(f(x),x=Z[1],-1)); + kz:=evalf(limit(f(x),x=Z[nz-1],-1))> evalf(limit(f(x),x=Z[nz-2],1)); + +lsi:=lsic+nom+"'("+nomv+")}<span class="font-latex-math">$ etex);"+ + if(Z[0]==-infinity){if(evalf(sign(fp(if(Z[1]==+infinity){0}else{Z[1]-10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-5)})))==1){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){ + if(fp(Z[0])==0){"valBarre(btex 0 etex);"}else{" "}+ + if(sign(fp((Z[0]+10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-3))))==1){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ + if(sign(fp(10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-3)+Z[0]))==1){"plus;"}else{"moins;"} }}+if(TestS==0){"valBarre(btex$</span> + <span class="font-latex-math">$ etex);"+ + +if(evalf(sign(fp(10^</span><span class="font-latex-superscript"><span class="font-latex-math">(</span></span><span class="font-latex-math">-3)+ifte(Z[0]==-infinity,ifte(Z[1]==+infinity,ifte(member(0,F)==0,0,0.01),ifte(member(Z[1]-1,F)==0,Z[1]-1,Z[1]-1.1)),Z[0]))))==1.0){"plus;"}else{"moins;"}}else{" "}; + + + +if(nz>2){rr:=1; if(nz==NL){for(r:=1; r<=NL-2;r++){ TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); + ksp:=evalf(fp(Z[r]+0.01))>0; + TestL:=(abs(LL[r])==abs(LL[r+1])); + lsp:=lsp+if(member(Z[r],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ + if(ksp==1){"plus;"}else{"moins;"}+if(TestS==0){"valBarre(btex $</span> <span class="font-latex-math">$ 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); + + 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 $</span> <span class="font-latex-math">$ 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;"} + + + +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); + + li:=lvic+nom+"}$</span> etex); +"+ if(member(Z[0],F)==0){"valPos(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$</span> etex,"} + else{"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[0],1)))}+"$</span> etex,"}+ + if(k0==1){"1);"}else{"0);"}+if(TestS==0){"valPos(btex <span class="font-latex-math">$ "+ao+" $</span> etex,0.5);"}else{" "}; + + + if(nz>2){if(nz==NL){for(r:=1; r<=nz-2;r++){TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); + krm:=evalf(limit(f(x),x=Z[r-1],1))< evalf(limit(f(x),x=Z[r],-1)); + krp:=evalf(limit(f(x),x=Z[r],1))> evalf(limit(f(x),x=Z[r+1],-1)) ; + lmrm:=limit(f(x),x=Z[r],-1)==-infinity;lmrp:=limit(f(x),x=Z[r],1)==-infinity; + lp:=lp+if(member(Z[r],F)) { + "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[r],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} + else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f(Z[r])))+"$</span> + 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 + <span class="font-latex-math">$ "+ao+" $</span> etex,0.5);" + }else{" "}; +};//for +}else{rr:=1;for(r:=1; r<=NL-2;r++){TestS:=(evalf(sign(LL[r]-ao))==evalf(sign(LL[r+1]-ao))) or (evalf(sign(LL[r]-ao))==0.0)or (evalf(sign(LL[r+1]-ao))==0.0); + krm:=evalf(limit(f(x),x=Z[rr-1],1))< evalf(limit(f(x),x=Z[rr],-1)); + krp:=evalf(limit(f(x),x=Z[rr],1))> evalf(limit(f(x),x=Z[rr+1],-1)) ; + lmrm:=limit(f(x),x=Z[rr],-1)==-infinity;lmrp:=limit(f(x),x=Z[rr],1)==-infinity; TestL:=(abs(LL[r])==abs(LL[r+1])); + +if(PB[r]==1){if(TestS==0){lp:=lp+if(member(Z[rr],F)){ + "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} + else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f(Z[rr])))+"$</span> + 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 + <span class="font-latex-math">$ "+ao+" $</span> etex,0.5); + ";rr:=rr+1; +}// testS==0 +else{lp:=lp+if(member(Z[rr],F)){ + "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[rr],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} + else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f(Z[rr])))+"$</span> + etex,"+if(evalf(sign(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0); + "}}};rr:=rr+1; +}//else testS==0 +}//PB[r]==1 +}//for nz<NL +}// else nz<NL +//if nz=NL +};//if nz>2 + + + +lnz:=limit(f(x),x=Z[nz-1],-1)==-infinity; + + +lf:=if(member(Z[nz-1],F)==0){"valPos(btex <span class="font-latex-math">$"+ + if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ + if(kz==1){"1);"}else{"0);"}} + else{"limGauche(btex <span class="font-latex-math">$"+ + if(lnz==1){"-\\infty"}else{latex(simplify(limit(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"+ + if(kz==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}}; + + + + + + + +MetaLfc:= if(ftt==2){if(nz>2){"beginTableau("+nmr+")"+ + l0+lsi+lsp+lsf+" +endTableau; + +";}else{ +"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+" +endTableau; + +"; +} +}else{ +if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+ + l0+ +li+ +lp+ +lf ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +li+ +lf ++" +endTableau; +";}}else{ +if(nz>2){"beginTableau("+nmr+")"+ + l0+ +lsi+lsp+lsf+ +li+ +lp+ +lf ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+ +li+ +lf ++" +endTableau; + +";} +}}; + + + + +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); + + + }:; + + + + +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + + + + + + + +<span class="comment-delimiter">%%</span><span class="comment"> +</span><span class="comment-delimiter">%% </span><span class="comment">Code giac/Xcas pour les Tableaux de variations de courbes parametrees +</span><span class="comment-delimiter">%%</span><span class="comment"> +</span> + + + + + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTVP.cxx} +TVP(L,F,nom,nomv,ff,ftt,trigo,nmr):={ + +nl:=size(L); +fp:=[]; +S:=[]; +f:=[unapply(ff[0],t),unapply(ff[1],t)]; +fp:=[function_diff(f[0]),function_diff(f[1])]; +Z:=[]; +LLL:=[]; + + +all_trig_solutions:=1; +reset_solve_counter(-1,-1); + +for(d:=0;d<=1;d++){ +LLL:=concat(L,F[d]); +Z:=LLL union Z; +SS:=solve(factor(simplify(fp[d](t))),t); +ns:=size(SS); + + +for(k:=0;k<ns;k++){ +if(trigo==t){ +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]){ + +S:=concat(S,simplify(subst(SS[k],n_1=m)));m:=m-1; + +} +}else{ +S:=concat(S,SS); +} +} + + + si size(S)>0 alors pour j de 0 jusque size(S)-1 faire + 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 + fsi; +Z:=sort(Z); +nz:=size(Z); + + + tantque evalf(Z[0])==evalf(Z[1]) faire Z:=Z[1..nz-1];nz:=size(Z); + ftantque; + + + + +nz:=size(Z); +u:=1; + tantque (u<nz-2) and (nz>2) faire + tantque evalf(Z[u])==evalf(Z[u+1]) faire + Z:=augment(Z[0..u-1],Z[u+1..nz-1]);nz:=size(Z); + ftantque; + u:=u+1; + ftantque; + + + }; + +Z:=sort(Z); +nz:=size(Z); + + + + l0:=" newLigneVariables(btex <span class="font-latex-math">$"+nomv+"$</span> etex);";lp:="",""; lf:="","";lsp:="",""; +pour m de 0 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[m])+"$</span> etex); +";fpour; + + lsi:="",""; + +FFF:=[[],[]]; + +for(d:=0;d<=1;d++){ +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)); +//} +//<span class="font-latex-math">$ + lsi[d]:=lsic+nom[d]+"'("+nomv+")}$</span> etex);"+if(member(Z[0],FFF[d])==0){"valBarre(btex <span class="font-latex-math">$"+latex(simplify(fp[d](Z[0])))+"$</span> 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(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 <span class="font-latex-math">$"+latex(simplify(fp[d](Z[r])))+"$</span> etex);"}else{"nonDefBarre;"}+ + if(ksp==1){"plus;"}else{"moins;"} + }; } + +lsf[d]:=if(member(Z[nz-1],FFF[d])==0){"valBarre(btex <span class="font-latex-math">$"+latex(simplify(fp[d](Z[nz-1])))+"$</span> etex);"}else{if(Z[nz-1]==+infinity){" "}else{"nonDefBarre;"}} + + + + + } + + + + + + + + + + + + lm0:=1,2; li:=1,2; krm:=1,2; krp:=1,2; lmrm:=1,2; lmrp:=1,2; lp:="",""; lnz:=1,2; lf:=1,2; Kz:=1,2;K0:=1,2; + + +for(d:=0;d<=1;d++){ + K0[d]:= evalf(limit(f[d](x),x=Z[0],1))> evalf(limit(f[d](x),x=Z[1],-1)); + Kz[d]:=evalf(limit(f[d](x),x,Z[nz-1],-1))> evalf(limit(f[d](x),x,Z[nz-2],1)); +//{ +//<span class="font-latex-math">$ +lm0[d]:=limit(f[d](x),x,Z[0],1)==-infinity; + li[d]:=lvic+nom[d]+"}$</span> etex);"+ + if(member(Z[0],F[d])==0){"valPos(btex <span class="font-latex-math">$"+if(lm0[d]==1){"-\\infty"}else{latex(simplify(limit(f[d](x),x,Z[0],1)))}+"$</span> etex,"} + else{"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lm0[d]==1){"-\\infty"}else{latex(simplify(limit(f[d](x),x,Z[0],1)))}+"$</span> etex,"}+ + 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)); + krp[d]:=evalf(limit(f[d](x),x=Z[r],1))> evalf(limit(f[d](x),x,Z[r+1],-1)) ; + lmrm[d]:=limit(f[d](x),x,Z[r],-1)==-infinity;lmrp[d]:=limit(f[d](x),x,Z[r],1)==-infinity; + lp[d]:=lp[d]+if(member(Z[r],F[d])){ + "limGauche(btex + <span class="font-latex-math">$"+if(lmrm[d]==1){"-\\infty"}else{latex(simplify(limit(f[d](x),x,Z[r],-1)))}+"$</span> + etex,"+if(krm[d]==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp[d]==1){"-\\infty"}else{latex(simplify(limit(f[d](x),x,Z[r],1)))}+"$</span> etex,"+if(krp[d]==1){"1);"}else{"0);"}} + else{"valPos(btex <span class="font-latex-math">$"+latex(simplify(f[d](Z[r])))+"$</span> + 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 <span class="font-latex-math">$"+ + if(lnz[d]==1){"-\\infty"}else{latex(simplify(limit(f[d](x),x=Z[nz-1],-1)))}+"$</span> etex,"+ + if(Kz[d]==1){"1);"}else{"0);"}} + else{"limGauche(btex <span class="font-latex-math">$"+ + if(lnz[d]==1){"-\\infty"}else{latex(simplify(limit(f[d](x),x=Z[nz-1],-1)))}+"$</span> etex,"+ + if(Kz[d]==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}}; + + + + + + +} + + + + + + + + +MetaLfc:=if(ftt==2){if(nz>2){" + +beginTableau("+nmr+")"+ + l0+lsi[0]+lsp[0]+lsf[0]+lsi[1]+lsp[1]+lsf[1]+" +endTableau; + +";}else{ +"beginTableau("+nmr+")"+ + l0+ +lsi[0]+lsf[0]+lsi[1]+lsf[1]+" +endTableau; + +"; +} +}else{ if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+ + l0+ +li[0]+ +lp[0]+ +lf[0]+ +li[1]+ +lp[1]+ +lf[1] ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +li[0]+ +lf[0]+ +li[1]+ +lf[1] ++" +endTableau; + +";}}else{ +if(nz>2){"beginTableau("+nmr+")"+ + l0+ +lsi[0]+lsp[0]+lsf[0]+ +li[0]+ +lp[0]+ +lf[0]+ +lsi[1]+lsp[1]+lsf[1]+ +li[1]+ +lp[1]+ +lf[1] ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +lsi[0]+lsf[0]+ +li[0]+ +lf[0]+ +lsi[1]+lsf[1]+ +li[1]+ +lf[1] ++" +endTableau; + +";} +} +} + +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); + +}:; +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + + + + +<span class="comment-delimiter">%%</span><span class="comment"> +</span><span class="comment-delimiter">%% </span><span class="comment">Code giac/Xcas pour les Tableaux de signes de produits +</span><span class="comment-delimiter">%%</span><span class="comment"> +</span> + + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTabSignL.cxx} + + +TS(nomf,L,D,trigo,nmr):={ +L:=apply(f->unapply(f,x),L) +n:=size(L); +Z:=NULL; +nl:=size(L); +S:=[]; +mini:=D[0]; maxi:=D[1]; + +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); +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)){ +S:=concat(S,simplify(subst(SS[j],n_1=m)));m:=m-1; +} +} + +}else{ +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; + fsi; +fpour; + + + + + +Z:=sort(Z); +nz:=size(Z); + + + Z:=sort([op(set[(Z)])]); + + +nz:=size(Z); + +if(nz==0){li:="";l0:="val(btex <span class="font-latex-math">$"+latex(D[0])+"$</span> etex);val(btex <span class="font-latex-math">$"+latex(D[1])+"$</span> etex);"; + for(p:=0;p<=n-1;p++){li:=li+lsic+latex(L[p](x))+"}<span class="font-latex-math">$ etex);"+ +if(mini!=-infinity and L[p](mini)==0){" + valBarre(btex 0 etex);"}else{" + "}+ +if(L[p]((mini+maxi)*0.5>0)){"plus;"}else{"moins;"}+if(maxi!=+infinity and L[p](maxi)==0){" + valBarre(btex 0 etex);"}else{" + "} + +} + lf:=if(product(L[s]((mini+maxi)*.5),s,0,n-1)>0){"plus;"}else{"moins;"}; + + +MetaLfc:=" beginTableau("+nmr+") +newLigneVariables(btex $</span> {x}<span class="font-latex-math">$ etex); + "+l0+li+ lsic+nomf+"(x)}$</span> etex);"+ + if(mini!=-infinity and product(L[s](mini),s,0,n-1)==0){" + valBarre(btex 0 etex);"}else{" + "}+ lf+ + if(maxi!=+infinity and product(L[s](maxi),s,0,n-1)==0){" + valBarre(btex 0 etex);"}else{" + "}+" +endTableau; +" +; + +}else{ + +l0:="val(btex <span class="font-latex-math">$"+latex(D[0])+"$</span> etex);";li:=" ";lr:=" "; +pour m de 0 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[m])+"$</span> etex); +";fpour; +l0:=l0+"val(btex <span class="font-latex-math">$"+latex(D[1])+"$</span> etex);"; + + +for(p:=0;p<=n-1;p++){lp:=""; + li:=li+lsic+latex(L[p](x))+"}<span class="font-latex-math">$ etex);"+ + 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; + "}+ + 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{" + "} + }; + + +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;"}+"valBarre(btex 0 etex);" + fpour + +MetaLfc:=" beginTableau("+nmr+") +newLigneVariables(btex $</span> {x}<span class="font-latex-math">$ etex); + "+l0+ + li + + lsic+nomf+"(x)}$</span> 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);"+ + lr+ + if(product(L[s](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{" + "}+" +endTableau; + + "; +} +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); + + }:; + +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + + + + +<span class="comment-delimiter">%%</span><span class="comment"> +</span><span class="comment-delimiter">%% </span><span class="comment">Code giac/Xcas pour les Tableaux de signes de quotients +</span><span class="comment-delimiter">%%</span><span class="comment"> +</span> + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTabSignQ.cxx} +TSq(nomf,L,Fo,D,trigo,nmr):={ +L:=apply(f->unapply(f,x),L); +Fo:=apply(f->unapply(f,x),Fo); +L:=concat(L,Fo); +n:=size(L); +Z:=NULL; +m:=size(Fo); +F:=NULL;FF:=NULL; +mini:=D[0]; maxi:=D[1]; +S:=[]; +SF:=[]; + +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); +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)){ +S:=concat(S,simplify(subst(SS[j],n_1=mm)));mm:=mm-1; +} +} + +}else{ +S:=concat(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; + fsi; +fpour; + + +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); +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; +};mm:=-1; +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:=concat(SF,solve(Fo[k](x),x)); +} + + si size(SF)>0 alors pour j de 0 jusque size(SF)-1 faire + FF:=FF,simplify(SF[j]); + if(SF[j]>mini and SF[j]<maxi){F:=F,simplify(SF[j]);} + fpour; + fsi; +fpour; + + + +Z:=[Z,F]; + + +Z:=sort([op(set[op(Z)])]); + +nz:=size(Z); + +if(nz==0){li:="";l0:="val(btex <span class="font-latex-math">$"+latex(D[0])+"$</span> etex);val(btex <span class="font-latex-math">$"+latex(D[1])+"$</span> etex);"; + for(p:=0;p<=n-1;p++){li:=li+lsic+latex(L[p](x))+"}<span class="font-latex-math">$ etex);"+ +if(mini!=-infinity and L[p](mini)==0){" + valBarre(btex 0 etex);"}else{" + "}+ +if(L[p]((mini+maxi)*0.5>0)){"plus;"}else{"moins;"}+if(maxi!=+infinity and L[p](maxi)==0){" + valBarre(btex 0 etex);"}else{" + "} + +} + lf:=if(product(L[s]((mini+maxi)*.5),s,0,n-1)>0){"plus;"}else{"moins;"}; + + + + +MetaLfc:=" +beginTableau("+nmr+") +newLigneVariables(btex $</span> {x}<span class="font-latex-math">$ etex); + "+l0+li+ + lsic+nomf+"(x)}$</span> 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;"}+" +endTableau; + +" +; + + + + +}else{ + + +l0:="val(btex <span class="font-latex-math">$"+latex(D[0])+"$</span> etex);";li:=" ";lr:=" "; +pour m de 0 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[m])+"$</span> etex); +";fpour; +l0:=l0+"val(btex <span class="font-latex-math">$"+latex(D[1])+"$</span> etex);"; + + +for(p:=0;p<=n-1;p++){lp:=""; + li:=li+lsic+latex(L[p](x))+"}<span class="font-latex-math">$ etex);"+ + 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;"}+ + 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{" "} + + }; + + +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 + + + + +MetaLfc:=" +beginTableau("+nmr+") +newLigneVariables(btex $</span> {x}<span class="font-latex-math">$ etex); + "+l0+ + li + + + lsic+nomf+"(x)}$</span> 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(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;"}+" +endTableau; + +" + + +} + + + + +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); + + + + + + }:; + +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + + + + +<span class="comment-delimiter">%% </span><span class="comment">Code giac/Xcas pour les Tableaux de signes du produit +</span><span class="comment-delimiter">%% </span><span class="comment">de 2 facteurs affines +</span><span class="comment-delimiter">%%</span><span class="comment"> +</span> + + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTabSigna.cxx} +TSa(a,b,c,d,nmr):={ +zA:=solve(a*x+b=0,x)[0]; +zB:=solve(c*x+d=0,x)[0]; +zmin:=min(zA,zB); +zmax:=max(zA,zB); + Meta:= " + beginTableau("+nmr+") + newLigneVariables(btex <span class="font-latex-math">$ {x}$</span> etex); + val(btex <span class="font-latex-math">$-\\infty$</span> etex);val(btex <span class="font-latex-math">$"+latex(zmin)+"$</span> etex); +val(btex <span class="font-latex-math">$"+latex(zmax)+"$</span>etex); +val(btex <span class="font-latex-math">$+\\infty$</span> etex); + "+lsic+if(a==1){"x+"}else{if(a==-1){"-x+"}else{a+"x+"}}+b+"}<span class="font-latex-math">$ etex);" + + if(a>0){"moins;"}else{"plus;"}+ + if(zmin==zA){"valBarre(btex 0 etex);"}else{"barre;"}+ + if(zmin==zA){si a>0 alors "plus;"; sinon "moins;";fsi} + else{si a>0 alors "moins;"; sinon "plus;"; fsi}+ + if(zmin==zA){"barre;"}else{"valBarre(btex 0 etex);"}+ + if(a>0){"plus;"}else{"moins;"} + +lsic+if(c==1){"x+"}else{if(c==-1){"-x+"}else{c+"x+"}}+d+"}$</span> 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} + else{si c>0 alors "moins;"; sinon "plus;"; fsi}+ + 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+")}}<span class="font-latex-math">$ etex);" + + si a*c>0 alors plus; sinon moins;fsi+";"+ + "valBarre(btex 0 etex);"+ + si a*c>0 alors moins; sinon plus;fsi+";"+ + "valBarre(btex 0 etex);"+ + si a*c>0 alors plus; sinon moins;fsi+";"+" +endTableau; +" +; + + + +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,Meta); +fclose(sortie); + + + }:; +</span><span class="font-latex-sedate"><span class="keyword"><span class="font-latex-math">\end</span></span></span><span class="function-name"><span class="font-latex-math">{VerbatimOut}</span></span><span class="font-latex-math"> + + + + + + +%%$</span> +<span class="comment-delimiter">%% </span><span class="comment">Code giac/Xcas pour les Tableaux de Signes d'expression ne contenant +</span><span class="comment-delimiter">%% </span><span class="comment">qu'un seul terme +</span> + + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTSc.cxx} + +TSc(g,D,F,trigo,nmr):={ +f:=unapply(g,x); +mini:=D[0]; maxi:=D[1];lm:=" "; +Z:=mini,maxi; +S:=[]; + + + +if(trigo==t){ +all_trig_solutions:=1; +reset_solve_counter(-1,-1); +SS:=solve(factor(simplify(f(x))),x); +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)){ +S:=concat(S,simplify(subst(SS[j],n_1=m)));m:=m-1; +} +} + +}else{ +S:=solve(f(x),x); +} + + + + + +if(size(S)==0 and size(F)==0){ +l0:="val(btex <span class="font-latex-math">$"+latex(D[0])+"$</span> etex);val(btex <span class="font-latex-math">$"+latex(D[1])+"$</span> etex);"; +li:=if(member(mini,F)!=0){"nonDefBarre;"}else{if(mini!=-infinity and f(mini)==0){" + 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.3145274774464545777744)>0){"plus;"}else{"moins;"}}; +lf:=if(member(maxi,F)!=0){"nonDefBarre;"}else{if(maxi!=+infinity and f(maxi)==0){" + valBarre(btex 0 etex);"}else{" + "}}; +}else{ +if(size(S!=0)){pour j de 0 jusque size(S)-1 faire + if(S[j]>mini and S[j]<maxi){Z:=Z,simplify(S[j])}; + fpour} + +Z:=concat([Z],F); + + Z:=sort([op(set[op(Z)])]); + + +nz:=size(Z); +l0:=" ";li:=" ";lr:=" "; +if(nz==2){l0:="val(btex <span class="font-latex-math">$"+latex(D[0])+"$</span> etex);val(btex <span class="font-latex-math">$"+latex(D[1])+"$</span> etex);"; +li:=if(mini!=-infinity and f(mini)==0){" + valBarre(btex 0 etex);"}else{if(member(mini,F)==0){" + "}else{"nonDefBarre;"}}+ +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{ +l0:="val(btex <span class="font-latex-math">$"+latex(Z[0])+"$</span> etex);";li:=" "; +pour m de 1 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[m])+"$</span> etex); +"; +fpour; + + +li:= if(mini!=-infinity and f(mini)==0){" + valBarre(btex 0 etex);"}else{if(member(mini,F)==0){" + "}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;"} + }}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;"} + }; +} +}; + + + + +MetaLfc:=" + +beginTableau("+nmr+") +newLigneVariables(btex <span class="font-latex-math">$\\displaystyle {x}$</span> etex); + "+l0+lsic+latex(f(x))+"}<span class="font-latex-math">$ etex);"+ + li+lm+lf + +" +endTableau; + +" +; + + + + +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); + }:; + +</span><span class="font-latex-sedate"><span class="keyword"><span class="font-latex-math">\end</span></span></span><span class="function-name"><span class="font-latex-math">{VerbatimOut}</span></span><span class="font-latex-math"> + + + + + + + +%%$</span> + + + + + + +<span class="comment-delimiter">%%%%</span><span class="comment"> +</span><span class="comment-delimiter">%%%</span><span class="comment"> +</span><span class="comment-delimiter">%%% </span><span class="comment">Pour des tableaux de variations simples sans fonctions +</span><span class="comment-delimiter">%%%</span><span class="comment"> +</span><span class="comment-delimiter">%%%</span><span class="comment"> +</span> + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTVS.cxx} +TVS(La,Lo,F,nomf,nomv,nmr):={ + +na:=size(La); +f:=F; +if(member(La[0],F)){f:=f[1..size(f)-1]}; +if(member(La[na-1],F)){f:=f[0..size(f)-2]}; +Z:=sort(concat(La,f)); +Zo:=sort([op(set[op(Z)])]); +nz:=size(Z); +nzo:=size(Zo); + + +k0:= evalf(Lo[0])> evalf(Lo[1]); +kz:=evalf(Lo[nz-1])> evalf(Lo[nz-2]); + + +l0:=" newLigneVariables(btex <span class="font-latex-math">$"+nomv+"$</span> etex);";lp:=" "; lf:=" "; + for(m:=0;m<=nzo-1;m++){l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Zo[m])+"$</span> etex);"} + +li:=lvic+nomf+"}<span class="font-latex-math">$ etex);"+ + if(member(Z[0],F)==0){"valPos(btex $</span>"+latex(Lo[0])+"<span class="font-latex-math">$ etex,"} + else{"nonDefBarre;limDroite(btex $</span>"+latex(Lo[0])+"<span class="font-latex-math">$ etex,"}+ + if(k0==1){"1"}else{"0"}+ + ");"; + + if(nz>2){ for(r:=1; r<=nz-2;r++){ + krm:=evalf(Lo[r-1])< evalf(Lo[r]); + krp:=evalf(Lo[r])> evalf(Lo[r+1]) ; + + lp:=lp+if(Z[r]==Z[r+1]){ + "limGauche(btex$</span>"+latex(Lo[r])+"<span class="font-latex-math">$etex,"+ + if(krm==1){"1);"} + else{"0);"} + }// fin if zr=zr+1 + else{ + if(Z[r]==Z[r-1]){ + "nonDefBarre;limDroite(btex$</span>"+latex(Lo[r])+"<span class="font-latex-math">$etex,"+ + if(krp==1){"1);"} + else{"0);"} + }//fin if zr=zr-1 + else{ + "valPos(btex $</span>"+latex(Lo[r])+"<span class="font-latex-math">$etex,"+ + if(krp==1){"1);"}else{"0);"} +}//fin else zr=zr-1 +}//fin else zr=zr+1 +}//fin for +}//fin de if nz>2 + + + +lf:=if(member(Z[nz-1],F)==0){"valPos(btex $</span>"+latex(Lo[nz-1])+"<span class="font-latex-math">$ etex,"+ + if(kz==1){"1);"}else{"0);"}} + else{"limGauche(btex $</span>"+latex(Lo[nz-1])+"<span class="font-latex-math">$ etex,"+ + if(kz==1){"1);nonDefBarre;"}else{"0);nonDefBarre;"}}; + + +MetaLfc:= + + if(nz>2){"beginTableau("+nmr+")"+ + l0+ +li+ +lp+ +lf ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +li+ +lf ++" +endTableau; + +";} + +//return(MetaLfc); + +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); + + +}:; + +</span><span class="font-latex-sedate"><span class="keyword"><span class="font-latex-math">\end</span></span></span><span class="function-name"><span class="font-latex-math">{VerbatimOut}</span></span><span class="font-latex-math"> + +%%$</span> + + + + + + + + + + + + + + + + + + + + + +<span class="comment-delimiter">%%</span><span class="comment"> +</span><span class="comment-delimiter">%% </span><span class="comment">traitement des fichiers produits par giac/xcas +</span><span class="comment-delimiter">%%</span><span class="comment"> +</span><span class="comment-delimiter">%%</span><span class="comment"> +</span> +<span class="comment-delimiter">% </span><span class="comment">pour l'échelle des tableaux taper </span><span class="font-latex-sedate"><span class="comment">\ech</span></span><span class="comment">{facteur de réduction} +</span> +<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="font-latex-sedate">\echelle</span>{1} +<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="font-latex-sedate">\ech</span>[1]{<span class="font-latex-sedate"><span class="keyword">\renewcommand</span></span><span class="font-latex-sedate">\echelle</span>{#1}} + + +<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="font-latex-sedate">\couleurtab</span>{black} +<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="font-latex-sedate">\coultab</span>[1]{<span class="font-latex-sedate"><span class="keyword">\renewcommand</span></span><span class="font-latex-sedate">\couleurtab</span>{#1}} + + +<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\dresse</span></span><span class="function-name">}</span>[2]{<span class="comment">% +</span><span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{xcas}}{<span class="comment">% Avec l'option "XCas present" +</span> <span class="font-latex-sedate">\executGiacmp</span>{XCas#2.giac}<span class="comment">% reconstituer le tableau +</span> <span class="comment">% exporter le source mp +</span> <span class="comment">% puis lancer metapost pour creer +</span> <span class="comment">% l'image du tableau +</span> <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\cat</span> XCasmpfc.mp >> <span class="font-latex-sedate">\nomtravail</span>_Tab.mp} + <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\cat</span> enteteMP.cfg >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\echod</span> def beginTableau(expr c) =<span class="font-latex-sedate">\echof</span> >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\echod</span> begingroup<span class="font-latex-sedate">\echof</span> >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\echod</span> charcode:=c;<span class="font-latex-sedate">\echof</span> >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\echod</span> clearxy; clearit; clearpen;<span class="font-latex-sedate">\echof</span> >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\echod</span> pickup defaultpen;<span class="font-latex-sedate">\echof</span> >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\echod</span> drawoptions(withcolor(#1));<span class="font-latex-sedate">\echof</span> >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\echod</span> initTableau;<span class="font-latex-sedate">\echof</span> >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\echod</span> enddef;<span class="font-latex-sedate">\echof</span> >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\cat</span> XCasmpfc.mp >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\cat</span> queue.mp >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{mpost -jobname=<span class="font-latex-sedate">\nomtravail</span>_Tab <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\rem</span> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + }<span class="comment">% +</span> {<span class="comment">% sinon, si le tableau est absent, alerte. +</span> <span class="font-latex-sedate">\IfFileExists</span>{<span class="font-latex-sedate">\nomtravail</span>_Tab.<span class="font-latex-sedate">\theTVn</span>}{}{<span class="comment">% +</span> <span class="font-latex-sedate">\PackageError</span>{tablor}{Tableau absent non + reconstituable.}{Pour compiler il faut, soit les fichiers de + tableaux, soit le fichier <span class="font-latex-sedate">\nomtravail</span>_Tab.mp, soit disposer de + XCas.}}} + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{center}</span> + <span class="font-latex-sedate">\includegraphics</span>[scale=<span class="font-latex-sedate">\echelle</span>]{<span class="font-latex-sedate">\nomtravail</span>_Tab.<span class="font-latex-sedate">\theTVn</span>} +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{center}</span> +<span class="font-latex-sedate">\stepcounter</span>{TVn} +} + + +<span class="comment-delimiter">%%</span><span class="comment"> +</span><span class="comment-delimiter">%% </span><span class="comment">traitement des fichiers produits par giac/xcas avec possibilite +</span><span class="comment-delimiter">%% </span><span class="comment">de modifier le fichier metapost (environnement etoile)) +</span><span class="comment-delimiter">%%</span><span class="comment"> +</span> + + +<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\dressetoile</span></span><span class="function-name">}</span>[2]{<span class="comment">% +</span><span class="font-latex-sedate">\IfFileExists</span>{<span class="font-latex-sedate">\nomtravail</span>_Tab.<span class="font-latex-sedate">\theTVn</span>}{<span class="comment">% Test sur l'existence du tableau +</span><span class="comment-delimiter">% </span><span class="comment">Si oui, inclusion du fichier source de sauvegarde mp dans Tableaux +</span><span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\cat</span> TSav-<span class="font-latex-sedate">\theTVn</span>.mp >> <span class="font-latex-sedate">\nomtravail</span>_Tab.mp}} +<span class="comment-delimiter">% </span><span class="comment">Si non, lancement des operations de fabrication +</span>{<span class="font-latex-sedate">\executGiacmp</span>{XCas#2.giac}<span class="comment">% +</span><span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\editeur</span> XCasmpfc.mp } + + <span class="comment">% Modification avec l'editeur choisi +</span><span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\cat</span> XCasmpfc.mp >> <span class="font-latex-sedate">\nomtravail</span>_Tab.mp} +<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\cp</span> XCasmpfc.mp TSav-<span class="font-latex-sedate">\theTVn</span>.mp} <span class="comment">% Sauvegarde du +</span> <span class="comment">% source mp sur le disque pour une +</span> <span class="comment">% inclusion ulterieure dans Tableaux.mp. +</span><span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\cat</span> enteteMP.cfg >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\echod</span> def beginTableau(expr c) =<span class="font-latex-sedate">\echof</span> >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\echod</span> begingroup<span class="font-latex-sedate">\echof</span> >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\echod</span> charcode:=c;<span class="font-latex-sedate">\echof</span> >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\echod</span> clearxy; clearit; clearpen;<span class="font-latex-sedate">\echof</span> >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\echod</span> pickup defaultpen;<span class="font-latex-sedate">\echof</span> >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\echod</span> drawoptions(withcolor(#1));<span class="font-latex-sedate">\echof</span> >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\echod</span> initTableau;<span class="font-latex-sedate">\echof</span> >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\echod</span> enddef;<span class="font-latex-sedate">\echof</span> >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} +<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\cat</span> XCasmpfc.mp >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp}} <span class="comment">% Inclusion du +</span> <span class="comment">% source dans le +</span> <span class="comment">% fichier +</span> <span class="comment">% Tableaux +</span><span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\cat</span> queue.mp >> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} +<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{mpost -jobname=<span class="font-latex-sedate">\nomtravail</span>_Tab <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp}<span class="comment">% Reconstitution des tableaux +</span> <span class="comment">% et creation du dernier. L'option +</span> <span class="comment">% pallie l'absence de end en fin de +</span> <span class="comment">% fichier +</span><span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\rem</span> <span class="font-latex-sedate">\nomtravail</span>_Tab#2.mp} + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{center}</span> + <span class="font-latex-sedate">\includegraphics</span>[scale=<span class="font-latex-sedate">\echelle</span>]{<span class="font-latex-sedate">\nomtravail</span>_Tab.<span class="font-latex-sedate">\theTVn</span>} +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{center}</span> +<span class="font-latex-sedate">\ech</span>{1} +<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVn}{</span><span class="font-latex-sedate"><span class="variable-name">\theTVnbis</span></span><span class="variable-name">}</span> <span class="comment">% Restauration du compteur TVn +</span>} + + + + + + + +<span class="comment-delimiter">%%</span><span class="comment"> +</span><span class="comment-delimiter">%%</span><span class="comment"> +</span><span class="comment-delimiter">%%%</span><span class="comment"> +</span><span class="comment-delimiter">%%%</span><span class="comment"> +</span><span class="comment-delimiter">%%% </span><span class="comment">les "giac" qui permettent d'executer la commande rentree dans le fichier tex +</span><span class="comment-delimiter">%%% </span><span class="comment">suivis des environnements qui permettront la saisie du code giac/xcas +</span><span class="comment-delimiter">%%% </span><span class="comment">Les versions etoilees permettent de modifier le code metapost produit initialement +</span><span class="comment-delimiter">%%%</span><span class="comment"> +</span> + + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XCasa.giac} +maple_mode(0); +approx_mode:=0; +read("config.cxx"); +read("XcasTabSigna.cxx"); +read("XCasa.user"); +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TSa}</span> +{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasa.user}} +{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + <span class="font-latex-sedate">\dresse</span>{<span class="font-latex-sedate">\couleurtab</span>}{a} +} + + + + + + + + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XCasQ.giac} +maple_mode(0); +approx_mode:=0; +read("config.cxx"); +read("XcasTabSignQ.cxx"); +read("XCasQ.user"); +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TSq}</span><span class="comment">% +</span>{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasQ.user}} +{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dresse</span>{<span class="font-latex-sedate">\couleurtab</span>}{Q}} + + + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TSq*}</span>[1]<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVnbis}{</span><span class="font-latex-sedate"><span class="variable-name">\theTVn</span></span><span class="variable-name">}</span> +<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVn}{#1}</span> +<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasQ.user}} +{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dressetoile</span>{<span class="font-latex-sedate">\couleurtab</span>}{Q}} + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XCasL.giac} +maple_mode(0); +approx_mode:=0; +read("config.cxx"); +read("XcasTabSignL.cxx"); +read("XCasL.user"); +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TS}</span><span class="comment">% +</span>{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasL.user}} +{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dresse</span>{<span class="font-latex-sedate">\couleurtab</span>}{L}} + + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TS*}</span>[1] +{<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVnbis}{</span><span class="font-latex-sedate"><span class="variable-name">\theTVn</span></span><span class="variable-name">}</span> +<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVn}{#1}</span> +<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasL.user}} +{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dressetoile</span>{<span class="font-latex-sedate">\couleurtab</span>}{L}} + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XCasTSc.giac} +maple_mode(0); +approx_mode:=0; +read("config.cxx"); +read("XcasTSc.cxx"); +read("XCasTSc.user"); +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + + + + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TSc*}</span>[1]<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVnbis}{</span><span class="font-latex-sedate"><span class="variable-name">\theTVn</span></span><span class="variable-name">}</span> +<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVn}{#1}</span> +<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasTSc.user}} +{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dressetoile</span>{<span class="font-latex-sedate">\couleurtab</span>}{TSc}} + + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TSc}</span><span class="comment">% +</span>{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasTSc.user}} +{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dresse</span>{<span class="font-latex-sedate">\couleurtab</span>}{TSc}} + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XCasTV.giac} +maple_mode(0); +approx_mode:=0; +read("config.cxx"); +read("XcasTV.cxx"); +read("XCasTV.user"); +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + + + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TV}</span>{<span class="comment">% +</span><span class="font-latex-sedate">\VerbatimEnvironment</span> +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasTV.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> +<span class="font-latex-sedate">\dresse</span>{<span class="font-latex-sedate">\couleurtab</span>}{TV}} + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TV*}</span>[1]{<span class="comment">% +</span><span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVnbis}{</span><span class="font-latex-sedate"><span class="variable-name">\theTVn</span></span><span class="variable-name">}</span> +<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVn}{#1}</span> +<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasTV.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dressetoile</span>{<span class="font-latex-sedate">\couleurtab</span>}{TV}} + + + + + + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XCasTVP.giac} +maple_mode(0); +approx_mode:=0; +read("config.cxx"); +read("XcasTVP.cxx"); +read("XCasTVP.user"); +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TVP}</span><span class="comment">% +</span>{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasTVP.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> +<span class="font-latex-sedate">\dresse</span>{<span class="font-latex-sedate">\couleurtab</span>}{TVP}} + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TVP*}</span>[1]{<span class="comment">% +</span><span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVnbis}{</span><span class="font-latex-sedate"><span class="variable-name">\theTVn</span></span><span class="variable-name">}</span> +<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVn}{#1}</span> +<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasTVP.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dressetoile</span>{<span class="font-latex-sedate">\couleurtab</span>}{TVP}} + + + + + + + + + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XCasTVZ.giac} +maple_mode(0); +approx_mode:=0; +read("config.cxx"); +read("XcasTVZ.cxx"); +read("XCasTVZ.user"); +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TVZ}</span><span class="comment">% +</span>{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasTVZ.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> +<span class="font-latex-sedate">\dresse</span>{<span class="font-latex-sedate">\couleurtab</span>}{TVZ}} + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TVZ*}</span>[1]{<span class="comment">% +</span><span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVnbis}{</span><span class="font-latex-sedate"><span class="variable-name">\theTVn</span></span><span class="variable-name">}</span> +<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVn}{#1}</span> +<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasTVZ.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dressetoile</span>{<span class="font-latex-sedate">\couleurtab</span>}{TVZ}} + + + + + + + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XCasTVapp.giac} +maple_mode(0); +approx_mode:=0; +read("config.cxx"); +read("XcasTVapp.cxx"); +read("XCasTVapp.user"); +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TVapp}</span><span class="comment">% +</span>{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasTVapp.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> +<span class="font-latex-sedate">\dresse</span>{<span class="font-latex-sedate">\couleurtab</span>}{TVapp}} + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TVapp*}</span>[1]{<span class="comment">% +</span><span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVnbis}{</span><span class="font-latex-sedate"><span class="variable-name">\theTVn</span></span><span class="variable-name">}</span> +<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVn}{#1}</span> +<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasTVapp.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dressetoile</span>{<span class="font-latex-sedate">\couleurtab</span>}{TVapp}} + + + + + + + + + + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XCasTVI.giac} +maple_mode(0); +approx_mode:=0; +read("config.cxx"); +read("XcasTVI.cxx"); +read("XCasTVI.user"); +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TVI}</span><span class="comment">% +</span>{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasTVI.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dresse</span>{<span class="font-latex-sedate">\couleurtab</span>}{TVI}} + + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TVI*}</span>[1]<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVnbis}{</span><span class="font-latex-sedate"><span class="variable-name">\theTVn</span></span><span class="variable-name">}</span> +<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVn}{#1}</span> +<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasTVI.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dressetoile</span>{<span class="font-latex-sedate">\couleurtab</span>}{TVI}} + + + + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XCasTVIex.giac} +maple_mode(0); +approx_mode:=0; +read("config.cxx"); +read("XcasTVIex.cxx"); +read("XCasTVIex.user"); +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TVIex}</span><span class="comment">% +</span>{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasTVIex.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dresse</span>{<span class="font-latex-sedate">\couleurtab</span>}{TVIex}} + + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TVIex*}</span>[1]<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVnbis}{</span><span class="font-latex-sedate"><span class="variable-name">\theTVn</span></span><span class="variable-name">}</span> +<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVn}{#1}</span> +<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasTVIex.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dressetoile</span>{<span class="font-latex-sedate">\couleurtab</span>}{TVIex}} + + + + + + + + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XCasTVIapp.giac} +maple_mode(0); +approx_mode:=0; +read("config.cxx"); +read("XcasTVIapp.cxx"); +read("XCasTVIapp.user"); +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TVIapp}</span><span class="comment">% +</span>{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasTVIapp.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dresse</span>{<span class="font-latex-sedate">\couleurtab</span>}{TVIapp}} + + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TVIapp*}</span>[1]<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVnbis}{</span><span class="font-latex-sedate"><span class="variable-name">\theTVn</span></span><span class="variable-name">}</span> +<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVn}{#1}</span> +<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasTVIapp.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dressetoile</span>{<span class="font-latex-sedate">\couleurtab</span>}{TVIapp}} + + + + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XCasTVPC.giac} +maple_mode(0); +approx_mode:=0; +read("config.cxx"); +read("XcasTVPC.cxx"); +read("XCasTVPC.user"); +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TVPC}</span><span class="comment">% +</span>{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasTVPC.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> +<span class="font-latex-sedate">\dresse</span>{<span class="font-latex-sedate">\couleurtab</span>}{TVPC}} + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TVPC*}</span>[1]{<span class="comment">% +</span><span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVnbis}{</span><span class="font-latex-sedate"><span class="variable-name">\theTVn</span></span><span class="variable-name">}</span> +<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVn}{#1}</span> +<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasTVPC.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dressetoile</span>{<span class="font-latex-sedate">\couleurtab</span>}{TVPC}} + + + + + + + + + + + + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XCasTVS.giac} +maple_mode(0); +approx_mode:=0; +read("config.cxx"); +read("XcasTVS.cxx"); +read("XCasTVS.user"); +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TVS}</span><span class="comment">% +</span>{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasTVS.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> +<span class="font-latex-sedate">\dresse</span>{<span class="font-latex-sedate">\couleurtab</span>}{TVS}} + +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TVS*}</span>[1]{<span class="comment">% +</span><span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVnbis}{</span><span class="font-latex-sedate"><span class="variable-name">\theTVn</span></span><span class="variable-name">}</span> +<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVn}{#1}</span> +<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>??]{XCasTVS.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dressetoile</span>{<span class="font-latex-sedate">\couleurtab</span>}{TVS}} + + + + + + + + + + +<span class="comment-delimiter">%% </span><span class="comment">pour nettoyer les fichiers auxiliaires +</span> +<span class="font-latex-sedate">\AtEndDocument</span>{<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="font-latex-sedate">\cat</span> queue.mp >> <span class="font-latex-sedate">\nomtravail</span>_Tab.mp} + } + + + + +<span class="comment-delimiter">%%</span><span class="comment"> +</span><span class="comment-delimiter">%% </span><span class="comment">Zi end -> enjoy :) +</span></pre> + </body> +</html> |