Example #1
0
function buscarProntos()
{
    return getReady();
}
Example #2
0
 $first = transfert($first[0], $first[1], 1);
 if (!isset($first[1])) {
     $first[1] = "0";
 }
 echo "degree 1 transfert:\n                                                                 " . $first[0] . " = " . $first[1] . "\n";
 $first = transfert($first[0], $first[1], 2);
 if (!isset($first[1]) || !empty($first[1])) {
     $first[1] = "0";
 }
 echo "degree 2 transfert:\n                                                                 " . $first[0] . " = " . $first[1] . "\n";
 echo "\n\nreduced form:                                                    " . $first[0] . " = " . $first[1] . "\n\n";
 if (preg_match_all("/[X]\\^([3-9])/", $argv[1], $check2)) {
     echo "Polynomial degree: " . $check2[1][0] . "\nThe polynomial degree is stricly greater than 2, I can't solve.\n";
     exit;
 }
 $elems = getReady($first);
 if ($elems["a"]) {
     echo "Polynomial degree: 2\n";
     $delta = getDeltaSecondDegree($elems);
     echo "Discriminant: " . $delta . "\n";
     getSolutionsSecondDegree($elems, $delta);
 } else {
     if ($elems["b"]) {
         echo "Polynomial degree: 1\n";
         getSolutionsFirstDegree($elems);
     } else {
         if ($elems["c"] == 0) {
             echo "Every real numbers are the solution\n";
         } else {
             if ($elems["c"] < 0) {
                 echo "There is no solution\n";