59 throw new \InvalidArgumentException(
"Coefficient a cannot be 0!");
61 $discriminant = $b ** 2 - 4 * $a * $c;
62 if($discriminant > 0){
63 $sqrtDiscriminant = sqrt($discriminant);
65 (-$b + $sqrtDiscriminant) / (2 * $a),
66 (-$b - $sqrtDiscriminant) / (2 * $a)
68 }elseif($discriminant == 0){