0) { $right = $med; } else if($y < 0) { $left = $med + 1; } else { $x1 = $med; break; } } $b = $A + $x1; $c = $x1 * $A + pow($x1, 2) * $B; $x2 = ((-1) * $b - sqrt(pow($b, 2) - 4 * $c)) / 2; $x3 = ((-1) * $b + sqrt(pow($b, 2) - 4 * $c)) / 2; $ans = array($x1, $x2, $x3); sort($ans); for($i = 0; $i < 3; $i++) { print($ans[$i]); print("\n"); } ?>