I suggest you ...

Equation solver

solve equations to find thier roots...

57 votes
Vote
Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
You have left! (?) (thinking…)
Anonymous shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
Submitting...
An error occurred while saving the comment
  • richelieu commented  ·   ·  Flag as inappropriate

    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=(-b-sqrt(delta))/(2*a);
    return "two solutions X1="+x1+"and X2 ="+x2;
    }
    }

Feedback and Knowledge Base