Equation solver
solve equations to find thier roots...
1 comment

richelieu commented
the sqrt command does not work !
see example below.
Thanks for correction.resolutionEquationSecondDegre=function(a,b,c){
var delta = (b*b)4*a*c
if (delta < 0){
return "No solution";
}else if (delta ==0){
var x1=(b+delta)/(2*a);
return "double solution X1=X2 = "+x1;
}else {
var x1=(b+sqrt(delta))/(2*a);
var x2=(bsqrt(delta))/(2*a);
return "two solutions X1="+x1+"and X2 ="+x2;
}
}