<!-- Beginvar x=Array();function reponse(form){for(var i=0;i<form.length;i++){if(form[i].checked){break}}var repondu=""if(i<form.length){repondu=form[i].value}return repondu;}function affiche(form){var milieu=0;var k=0;var auteur="Arnaud Saint-Martin de www.homeomath.com";var mg="";var texte="";var a=eval(form.a.value);var b=eval(form.b.value);var pas=eval(form.precision.value);var produit=0;var ecart=0;var n=0;var xim=a;var xi=0;var fxim=0;var fxi=0;mg=form.mg.value;mg=videspace(mg);mg=traduction(mg,"x");fxim=image(mg,xim);n=eval(b-a);n=eval(n/pas);n=Math.round(n);x[0]=a;if(n<10000){for(var i=1;i<=n;i++){xi=eval(a+"+"+eval(pas*i));fxi=image(mg,xi);produit=eval(fxi*fxim);ecart=eval(xim-xi);if((produit<0)||(fxi==0)){k=k+1;x[k]=arrondi(xi,10000000000);};fxim=fxi;xim=x[k];;};k=k+1;x[k]=b;if(k==1){milieu=a+b;milieu=eval(milieu/2);fxi=image(mg,milieu);if(fxi<0){texte="f(x) < 0 sur l'intervalle ["+a+" ; "+b+"]";};if(fxi>0){texte="f(x) > 0 sur l'intervalle ["+a+" ; "+b+"]";};};if(k>=2){for(var j=0;j<k;j++){milieu=x[j]+x[j+1];milieu=eval(milieu/2);fxi=image(mg,milieu);if(fxi<0){texte=texte+"f(x) négatif sur ["+x[j]+" ; "+x[j+1]+"]\n";};if(fxi>0){texte=texte+"f(x) positif sur ["+x[j]+" ; "+x[j+1]+"]\n";};};};}else{texte="Choisissez un intervalle de plus petite amplitude, ou changez la précision. ";};document.formulaire.s.value=texte;}function entier(x){var entier=Math.round(eval(x-0.5));return entier;}function membre_gauche(equa){var long=0;var c="";var mem="";var ch=equa.toString();var j=0;long=equa.length;while(j<long){c=ch.charAt(j);if(c!="="){mem=mem+c}else{break;};j=j+1;};return mem;}function membre_droite(equa){var long=0;var c="";var mem="";var ch=equa.toString();var j=0;long=equa.length;while(j<long){c=ch.charAt(j);if(c=="="){break;};j=j+1;};j=j+1;while(j<long){c=ch.charAt(j);mem=mem+c;j=j+1;};return mem;}function videspace(chaine){var long=0;var c="";var ch=chaine.toString();var k=1;var j=0;long=chaine.length+1;while(j<=long-1){c=ch.charAt(j);if(c==" "){k=k+1;};j=j+1;};for(var i=1;i<=k;i++){ch=ch.replace(" ","");};return ch;}function image(f,x){var ch=f;ch=ch.replace(/v/g,x);with(Math){v=eval(ch);};return v;}function traduction(chaine,variable){var fction=Array();var fctionp=Array();var nombre=Array();var base=Array();var chpar=Array();var coef=0;var coefp=0;var res="";var reg;var reg1;var ajout="";var nbpar=0;var res1;var res3;var res2=0;res=chaine;fction[0]="abs";fction[1]="acos";fction[2]="asin";fction[3]="atan";fction[4]="ceil";fction[5]="cos";fction[6]="exp";fction[7]="floor";fction[8]="log";fction[9]="max";fction[10]="min";fction[11]="random";fction[12]="round";fction[13]="sin";fction[14]="sqrt";fction[15]="tan";reg=new RegExp("([0-9])([a-z\(])","g");while(reg.test(res)){res=res.replace(reg,"$1*$2");};reg.compile("-([a-z\(])","g");while(reg.test(res)){res=res.replace(reg,"-1*$1");};res=res.replace(/int\(/g,"floor(");res=res.replace(/ln\(/g,"log(");chpar=chaine.split("(");nbpar=eval(chpar.length-1);ajout="\[0-9a-z\\*\\+\\/\\-\\.\\^]*"base[0]="[0-9a-z\\.]+";base[1]="\\("+ajout+"\\)";for(var i=2;i<=nbpar;i++){base[i]="\\("+ajout+base[i-1]+ajout+"\\)";};for(var i=nbpar;i>=0;i--){reg=new RegExp("("+base[i]+"\\^)","g");if(i!=0){res=res.replace(reg,"pow$1");}else{res=res.replace(reg,"pow($1");};};chpar=res.split("(");nbpar=eval(chpar.length-1);for(var i=nbpar;i>=0;i--){reg.compile("(\\^"+base[i]+")","g");if(i!=0){res=res.replace(reg,",$1");}else{res=res.replace(reg,",$1)");};};res=res.replace(/,\^/g,",");res=res.replace(/\^\(/g,",");res=res.replace(/\),/g,",");res=res.replace(/,\(/g,",");reg.compile(variable,"g");res=res.replace(reg,"v");for(var i=0;i<=15;i++){res3=fction[i];res3=res3.replace(reg,"v");fctionp[i]=res3;};for(var i=0;i<=15;i++){reg.compile(fctionp[i],"g");res=res.replace(reg,fction[i]);};return res;}function arrondi(x,choix){var retour=eval(x*choix);var tronc=Math.round(retour);tronc=eval(tronc/choix);return tronc;}
