?

Average Error: 20.1 → 10.9
Time: 25.9s
Precision: binary64
Cost: 7636

?

\[ \begin{array}{c}[x, y] = \mathsf{sort}([x, y])\\ [t, a] = \mathsf{sort}([t, a])\\ \end{array} \]
\[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
\[\begin{array}{l} t_1 := \frac{9 \cdot \frac{y \cdot x}{z} + -4 \cdot \left(a \cdot t\right)}{c}\\ t_2 := \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\ t_3 := \frac{a \cdot t}{c}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_3 \cdot -4\\ \mathbf{elif}\;t_2 \leq -2 \cdot 10^{+59}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq -5 \cdot 10^{-195}:\\ \;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \frac{y \cdot x}{z \cdot c}\right) - 4 \cdot t_3\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{-282}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 10^{+273}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (/ (+ (* 9.0 (/ (* y x) z)) (* -4.0 (* a t))) c))
        (t_2 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
        (t_3 (/ (* a t) c)))
   (if (<= t_2 (- INFINITY))
     (* t_3 -4.0)
     (if (<= t_2 -2e+59)
       t_2
       (if (<= t_2 -5e-195)
         (- (+ (/ b (* z c)) (* 9.0 (/ (* y x) (* z c)))) (* 4.0 t_3))
         (if (<= t_2 5e-282) t_1 (if (<= t_2 1e+273) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = ((9.0 * ((y * x) / z)) + (-4.0 * (a * t))) / c;
	double t_2 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
	double t_3 = (a * t) / c;
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_3 * -4.0;
	} else if (t_2 <= -2e+59) {
		tmp = t_2;
	} else if (t_2 <= -5e-195) {
		tmp = ((b / (z * c)) + (9.0 * ((y * x) / (z * c)))) - (4.0 * t_3);
	} else if (t_2 <= 5e-282) {
		tmp = t_1;
	} else if (t_2 <= 1e+273) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = ((9.0 * ((y * x) / z)) + (-4.0 * (a * t))) / c;
	double t_2 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
	double t_3 = (a * t) / c;
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_3 * -4.0;
	} else if (t_2 <= -2e+59) {
		tmp = t_2;
	} else if (t_2 <= -5e-195) {
		tmp = ((b / (z * c)) + (9.0 * ((y * x) / (z * c)))) - (4.0 * t_3);
	} else if (t_2 <= 5e-282) {
		tmp = t_1;
	} else if (t_2 <= 1e+273) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
def code(x, y, z, t, a, b, c):
	t_1 = ((9.0 * ((y * x) / z)) + (-4.0 * (a * t))) / c
	t_2 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
	t_3 = (a * t) / c
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_3 * -4.0
	elif t_2 <= -2e+59:
		tmp = t_2
	elif t_2 <= -5e-195:
		tmp = ((b / (z * c)) + (9.0 * ((y * x) / (z * c)))) - (4.0 * t_3)
	elif t_2 <= 5e-282:
		tmp = t_1
	elif t_2 <= 1e+273:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c)
	return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c))
end
function code(x, y, z, t, a, b, c)
	t_1 = Float64(Float64(Float64(9.0 * Float64(Float64(y * x) / z)) + Float64(-4.0 * Float64(a * t))) / c)
	t_2 = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c))
	t_3 = Float64(Float64(a * t) / c)
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = Float64(t_3 * -4.0);
	elseif (t_2 <= -2e+59)
		tmp = t_2;
	elseif (t_2 <= -5e-195)
		tmp = Float64(Float64(Float64(b / Float64(z * c)) + Float64(9.0 * Float64(Float64(y * x) / Float64(z * c)))) - Float64(4.0 * t_3));
	elseif (t_2 <= 5e-282)
		tmp = t_1;
	elseif (t_2 <= 1e+273)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp = code(x, y, z, t, a, b, c)
	tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = ((9.0 * ((y * x) / z)) + (-4.0 * (a * t))) / c;
	t_2 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
	t_3 = (a * t) / c;
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_3 * -4.0;
	elseif (t_2 <= -2e+59)
		tmp = t_2;
	elseif (t_2 <= -5e-195)
		tmp = ((b / (z * c)) + (9.0 * ((y * x) / (z * c)))) - (4.0 * t_3);
	elseif (t_2 <= 5e-282)
		tmp = t_1;
	elseif (t_2 <= 1e+273)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(9.0 * N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(t$95$3 * -4.0), $MachinePrecision], If[LessEqual[t$95$2, -2e+59], t$95$2, If[LessEqual[t$95$2, -5e-195], N[(N[(N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(y * x), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e-282], t$95$1, If[LessEqual[t$95$2, 1e+273], t$95$2, t$95$1]]]]]]]]
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\begin{array}{l}
t_1 := \frac{9 \cdot \frac{y \cdot x}{z} + -4 \cdot \left(a \cdot t\right)}{c}\\
t_2 := \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\
t_3 := \frac{a \cdot t}{c}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_3 \cdot -4\\

\mathbf{elif}\;t_2 \leq -2 \cdot 10^{+59}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_2 \leq -5 \cdot 10^{-195}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \frac{y \cdot x}{z \cdot c}\right) - 4 \cdot t_3\\

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{-282}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_2 \leq 10^{+273}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original20.1
Target14.3
Herbie10.9
\[\begin{array}{l} \mathbf{if}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} < -1.100156740804105 \cdot 10^{-171}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} < 0:\\ \;\;\;\;\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z}}{c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} < 1.1708877911747488 \cdot 10^{-53}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} < 2.876823679546137 \cdot 10^{+130}:\\ \;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + \frac{b}{c \cdot z}\right) - 4 \cdot \frac{a \cdot t}{c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} < 1.3838515042456319 \cdot 10^{+158}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + \frac{b}{c \cdot z}\right) - 4 \cdot \frac{a \cdot t}{c}\\ \end{array} \]

Derivation?

  1. Split input into 4 regimes
  2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -inf.0

    1. Initial program 64.0

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Simplified48.5

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - z \cdot \left(\left(4 \cdot t\right) \cdot a\right)\right) + b}{z \cdot c}} \]
      Proof

      [Start]64.0

      \[ \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

      rational.json-simplify-2 [=>]64.0

      \[ \frac{\left(\color{blue}{y \cdot \left(x \cdot 9\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

      rational.json-simplify-43 [=>]63.9

      \[ \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

      rational.json-simplify-2 [=>]63.9

      \[ \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]

      rational.json-simplify-2 [=>]63.9

      \[ \frac{\left(x \cdot \left(9 \cdot y\right) - a \cdot \color{blue}{\left(t \cdot \left(z \cdot 4\right)\right)}\right) + b}{z \cdot c} \]

      rational.json-simplify-43 [=>]63.9

      \[ \frac{\left(x \cdot \left(9 \cdot y\right) - a \cdot \color{blue}{\left(z \cdot \left(4 \cdot t\right)\right)}\right) + b}{z \cdot c} \]

      rational.json-simplify-43 [=>]48.5

      \[ \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{z \cdot \left(\left(4 \cdot t\right) \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Taylor expanded in z around inf 33.7

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    4. Simplified33.7

      \[\leadsto \color{blue}{\frac{a \cdot t}{c} \cdot -4} \]
      Proof

      [Start]33.7

      \[ -4 \cdot \frac{a \cdot t}{c} \]

      rational.json-simplify-2 [=>]33.7

      \[ \color{blue}{\frac{a \cdot t}{c} \cdot -4} \]

    if -inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -1.99999999999999994e59 or 5.0000000000000001e-282 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 9.99999999999999945e272

    1. Initial program 0.7

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

    if -1.99999999999999994e59 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -5.00000000000000009e-195

    1. Initial program 0.5

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Simplified0.6

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - z \cdot \left(\left(4 \cdot t\right) \cdot a\right)\right) + b}{z \cdot c}} \]
      Proof

      [Start]0.5

      \[ \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

      rational.json-simplify-2 [=>]0.5

      \[ \frac{\left(\color{blue}{y \cdot \left(x \cdot 9\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

      rational.json-simplify-43 [=>]0.6

      \[ \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

      rational.json-simplify-2 [=>]0.6

      \[ \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]

      rational.json-simplify-2 [=>]0.6

      \[ \frac{\left(x \cdot \left(9 \cdot y\right) - a \cdot \color{blue}{\left(t \cdot \left(z \cdot 4\right)\right)}\right) + b}{z \cdot c} \]

      rational.json-simplify-43 [=>]0.6

      \[ \frac{\left(x \cdot \left(9 \cdot y\right) - a \cdot \color{blue}{\left(z \cdot \left(4 \cdot t\right)\right)}\right) + b}{z \cdot c} \]

      rational.json-simplify-43 [=>]0.6

      \[ \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{z \cdot \left(\left(4 \cdot t\right) \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Taylor expanded in x around 0 0.6

      \[\leadsto \color{blue}{\left(\frac{b}{c \cdot z} + 9 \cdot \frac{y \cdot x}{c \cdot z}\right) - 4 \cdot \frac{a \cdot t}{c}} \]
    4. Simplified0.6

      \[\leadsto \color{blue}{\left(\frac{b}{z \cdot c} + 9 \cdot \frac{y \cdot x}{z \cdot c}\right) - 4 \cdot \frac{a \cdot t}{c}} \]
      Proof

      [Start]0.6

      \[ \left(\frac{b}{c \cdot z} + 9 \cdot \frac{y \cdot x}{c \cdot z}\right) - 4 \cdot \frac{a \cdot t}{c} \]

      rational.json-simplify-2 [<=]0.6

      \[ \left(\frac{b}{\color{blue}{z \cdot c}} + 9 \cdot \frac{y \cdot x}{c \cdot z}\right) - 4 \cdot \frac{a \cdot t}{c} \]

      rational.json-simplify-2 [<=]0.6

      \[ \left(\frac{b}{z \cdot c} + 9 \cdot \frac{y \cdot x}{\color{blue}{z \cdot c}}\right) - 4 \cdot \frac{a \cdot t}{c} \]

    if -5.00000000000000009e-195 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 5.0000000000000001e-282 or 9.99999999999999945e272 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c))

    1. Initial program 47.4

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Simplified43.5

      \[\leadsto \color{blue}{\frac{\left(x \cdot \left(9 \cdot y\right) - z \cdot \left(\left(4 \cdot t\right) \cdot a\right)\right) + b}{z \cdot c}} \]
      Proof

      [Start]47.4

      \[ \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

      rational.json-simplify-2 [=>]47.4

      \[ \frac{\left(\color{blue}{y \cdot \left(x \cdot 9\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

      rational.json-simplify-43 [=>]47.4

      \[ \frac{\left(\color{blue}{x \cdot \left(9 \cdot y\right)} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

      rational.json-simplify-2 [=>]47.4

      \[ \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)}\right) + b}{z \cdot c} \]

      rational.json-simplify-2 [=>]47.4

      \[ \frac{\left(x \cdot \left(9 \cdot y\right) - a \cdot \color{blue}{\left(t \cdot \left(z \cdot 4\right)\right)}\right) + b}{z \cdot c} \]

      rational.json-simplify-43 [=>]47.3

      \[ \frac{\left(x \cdot \left(9 \cdot y\right) - a \cdot \color{blue}{\left(z \cdot \left(4 \cdot t\right)\right)}\right) + b}{z \cdot c} \]

      rational.json-simplify-43 [=>]43.5

      \[ \frac{\left(x \cdot \left(9 \cdot y\right) - \color{blue}{z \cdot \left(\left(4 \cdot t\right) \cdot a\right)}\right) + b}{z \cdot c} \]
    3. Taylor expanded in b around 0 50.6

      \[\leadsto \color{blue}{\frac{9 \cdot \left(y \cdot x\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z}} \]
    4. Simplified48.1

      \[\leadsto \color{blue}{\frac{9 \cdot \left(y \cdot x\right) - t \cdot \left(\left(a \cdot z\right) \cdot 4\right)}{z \cdot c}} \]
      Proof

      [Start]50.6

      \[ \frac{9 \cdot \left(y \cdot x\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]

      rational.json-simplify-43 [=>]48.0

      \[ \frac{9 \cdot \left(y \cdot x\right) - 4 \cdot \color{blue}{\left(t \cdot \left(z \cdot a\right)\right)}}{c \cdot z} \]

      rational.json-simplify-43 [=>]48.1

      \[ \frac{9 \cdot \left(y \cdot x\right) - \color{blue}{t \cdot \left(\left(z \cdot a\right) \cdot 4\right)}}{c \cdot z} \]

      rational.json-simplify-2 [=>]48.1

      \[ \frac{9 \cdot \left(y \cdot x\right) - t \cdot \left(\color{blue}{\left(a \cdot z\right)} \cdot 4\right)}{c \cdot z} \]

      rational.json-simplify-2 [<=]48.1

      \[ \frac{9 \cdot \left(y \cdot x\right) - t \cdot \left(\left(a \cdot z\right) \cdot 4\right)}{\color{blue}{z \cdot c}} \]
    5. Taylor expanded in y around 0 28.8

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c} + 9 \cdot \frac{y \cdot x}{c \cdot z}} \]
    6. Taylor expanded in c around 0 25.2

      \[\leadsto \color{blue}{\frac{9 \cdot \frac{y \cdot x}{z} + -4 \cdot \left(a \cdot t\right)}{c}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification10.9

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq -\infty:\\ \;\;\;\;\frac{a \cdot t}{c} \cdot -4\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq -2 \cdot 10^{+59}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq -5 \cdot 10^{-195}:\\ \;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \frac{y \cdot x}{z \cdot c}\right) - 4 \cdot \frac{a \cdot t}{c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq 5 \cdot 10^{-282}:\\ \;\;\;\;\frac{9 \cdot \frac{y \cdot x}{z} + -4 \cdot \left(a \cdot t\right)}{c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq 10^{+273}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{9 \cdot \frac{y \cdot x}{z} + -4 \cdot \left(a \cdot t\right)}{c}\\ \end{array} \]

Alternatives

Alternative 1
Error11.4
Cost6352
\[\begin{array}{l} t_1 := \frac{9 \cdot \frac{y \cdot x}{z} + -4 \cdot \left(a \cdot t\right)}{c}\\ t_2 := \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;\frac{a \cdot t}{c} \cdot -4\\ \mathbf{elif}\;t_2 \leq -1 \cdot 10^{-125}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{-282}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 10^{+273}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error38.0
Cost1500
\[\begin{array}{l} t_1 := \frac{b}{z \cdot c}\\ t_2 := \frac{9 \cdot \left(y \cdot x\right)}{z \cdot c}\\ \mathbf{if}\;a \leq -3.8 \cdot 10^{-173}:\\ \;\;\;\;\frac{a \cdot t}{c} \cdot -4\\ \mathbf{elif}\;a \leq 1.08 \cdot 10^{-305}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{-254}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-122}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-86}:\\ \;\;\;\;\frac{9 \cdot \frac{y \cdot x}{z}}{c}\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{-22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{+109}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{-4 \cdot \left(a \cdot t\right)}{c}\\ \end{array} \]
Alternative 3
Error38.0
Cost1500
\[\begin{array}{l} t_1 := \frac{b}{z \cdot c}\\ \mathbf{if}\;a \leq -4 \cdot 10^{-173}:\\ \;\;\;\;\frac{a \cdot t}{c} \cdot -4\\ \mathbf{elif}\;a \leq 2.15 \cdot 10^{-305}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-254}:\\ \;\;\;\;\frac{y \cdot \left(x \cdot 9\right)}{z \cdot c}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-122}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.28 \cdot 10^{-86}:\\ \;\;\;\;\frac{9 \cdot \frac{y \cdot x}{z}}{c}\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 10^{+109}:\\ \;\;\;\;\frac{9 \cdot \left(y \cdot x\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{-4 \cdot \left(a \cdot t\right)}{c}\\ \end{array} \]
Alternative 4
Error21.8
Cost1488
\[\begin{array}{l} t_1 := \frac{9 \cdot \frac{y \cdot x}{z} + -4 \cdot \left(a \cdot t\right)}{c}\\ \mathbf{if}\;z \leq -8.5 \cdot 10^{+21}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{-32}:\\ \;\;\;\;\frac{b - t \cdot \left(\left(a \cdot z\right) \cdot 4\right)}{z \cdot c}\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-49}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.04 \cdot 10^{+117}:\\ \;\;\;\;\frac{9 \cdot \left(y \cdot x\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error14.2
Cost1480
\[\begin{array}{l} t_1 := \frac{9 \cdot \frac{y \cdot x}{z} + -4 \cdot \left(a \cdot t\right)}{c}\\ \mathbf{if}\;z \leq -6.4 \cdot 10^{+118}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+117}:\\ \;\;\;\;\frac{\left(x \cdot \left(9 \cdot y\right) - \left(4 \cdot t\right) \cdot \left(a \cdot z\right)\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error16.8
Cost1348
\[\begin{array}{l} \mathbf{if}\;z \leq -1.42 \cdot 10^{+119}:\\ \;\;\;\;\frac{9 \cdot \frac{y \cdot x}{z} + -4 \cdot \left(a \cdot t\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x \cdot \left(9 \cdot y\right) - z \cdot \left(\left(4 \cdot t\right) \cdot a\right)\right) + b}{z \cdot c}\\ \end{array} \]
Alternative 7
Error37.7
Cost1236
\[\begin{array}{l} t_1 := \frac{b}{z \cdot c}\\ t_2 := 9 \cdot \frac{y \cdot x}{z \cdot c}\\ \mathbf{if}\;a \leq -3.6 \cdot 10^{-173}:\\ \;\;\;\;\frac{a \cdot t}{c} \cdot -4\\ \mathbf{elif}\;a \leq 5.9 \cdot 10^{-305}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-269}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{-22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+110}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{-4 \cdot \left(a \cdot t\right)}{c}\\ \end{array} \]
Alternative 8
Error37.7
Cost1236
\[\begin{array}{l} t_1 := \frac{b}{z \cdot c}\\ t_2 := \frac{9 \cdot \left(y \cdot x\right)}{z \cdot c}\\ \mathbf{if}\;a \leq -4 \cdot 10^{-173}:\\ \;\;\;\;\frac{a \cdot t}{c} \cdot -4\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-304}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 10^{-267}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{-22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3 \cdot 10^{+109}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{-4 \cdot \left(a \cdot t\right)}{c}\\ \end{array} \]
Alternative 9
Error28.1
Cost1232
\[\begin{array}{l} t_1 := \frac{9 \cdot \left(y \cdot x\right) + b}{z \cdot c}\\ t_2 := \frac{a \cdot t}{c} \cdot -4\\ \mathbf{if}\;t \leq -2.2 \cdot 10^{+208}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{+127}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{+113}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-106}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error27.1
Cost1100
\[\begin{array}{l} t_1 := \frac{a \cdot t}{c} \cdot -4\\ \mathbf{if}\;t \leq -2.4 \cdot 10^{+208}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{+120}:\\ \;\;\;\;\frac{b - t \cdot \left(\left(a \cdot z\right) \cdot 4\right)}{z \cdot c}\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-103}:\\ \;\;\;\;\frac{9 \cdot \left(y \cdot x\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error36.0
Cost712
\[\begin{array}{l} t_1 := \frac{a \cdot t}{c} \cdot -4\\ \mathbf{if}\;a \leq -3.3 \cdot 10^{-173}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 9000:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error36.0
Cost712
\[\begin{array}{l} \mathbf{if}\;a \leq -4 \cdot 10^{-173}:\\ \;\;\;\;\frac{a \cdot t}{c} \cdot -4\\ \mathbf{elif}\;a \leq 7500:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{-4 \cdot \left(a \cdot t\right)}{c}\\ \end{array} \]
Alternative 13
Error43.3
Cost320
\[\frac{b}{z \cdot c} \]

Error

Reproduce?

herbie shell --seed 2023077 
(FPCore (x y z t a b c)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, J"
  :precision binary64

  :herbie-target
  (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))

  (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))