?

Average Error: 20.9 → 5.3
Time: 50.1s
Precision: binary64
Cost: 6352

?

\[ \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{\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_2 := \frac{9 \cdot \left(y \cdot \frac{x}{z}\right) + \left(\frac{b}{z} + a \cdot \left(t \cdot -4\right)\right)}{c}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{-39}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{-269}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+294}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \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 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
        (t_2 (/ (+ (* 9.0 (* y (/ x z))) (+ (/ b z) (* a (* t -4.0)))) c)))
   (if (<= t_1 (- INFINITY))
     t_2
     (if (<= t_1 -1e-39)
       t_1
       (if (<= t_1 4e-269) t_2 (if (<= t_1 2e+294) t_1 t_2))))))
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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
	double t_2 = ((9.0 * (y * (x / z))) + ((b / z) + (a * (t * -4.0)))) / c;
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = t_2;
	} else if (t_1 <= -1e-39) {
		tmp = t_1;
	} else if (t_1 <= 4e-269) {
		tmp = t_2;
	} else if (t_1 <= 2e+294) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
	double t_2 = ((9.0 * (y * (x / z))) + ((b / z) + (a * (t * -4.0)))) / c;
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = t_2;
	} else if (t_1 <= -1e-39) {
		tmp = t_1;
	} else if (t_1 <= 4e-269) {
		tmp = t_2;
	} else if (t_1 <= 2e+294) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
	t_2 = ((9.0 * (y * (x / z))) + ((b / z) + (a * (t * -4.0)))) / c
	tmp = 0
	if t_1 <= -math.inf:
		tmp = t_2
	elif t_1 <= -1e-39:
		tmp = t_1
	elif t_1 <= 4e-269:
		tmp = t_2
	elif t_1 <= 2e+294:
		tmp = t_1
	else:
		tmp = t_2
	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(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c))
	t_2 = Float64(Float64(Float64(9.0 * Float64(y * Float64(x / z))) + Float64(Float64(b / z) + Float64(a * Float64(t * -4.0)))) / c)
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = t_2;
	elseif (t_1 <= -1e-39)
		tmp = t_1;
	elseif (t_1 <= 4e-269)
		tmp = t_2;
	elseif (t_1 <= 2e+294)
		tmp = t_1;
	else
		tmp = t_2;
	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 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
	t_2 = ((9.0 * (y * (x / z))) + ((b / z) + (a * (t * -4.0)))) / c;
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = t_2;
	elseif (t_1 <= -1e-39)
		tmp = t_1;
	elseif (t_1 <= 4e-269)
		tmp = t_2;
	elseif (t_1 <= 2e+294)
		tmp = t_1;
	else
		tmp = t_2;
	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[(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$2 = N[(N[(N[(9.0 * N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b / z), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -1e-39], t$95$1, If[LessEqual[t$95$1, 4e-269], t$95$2, If[LessEqual[t$95$1, 2e+294], t$95$1, t$95$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}
\begin{array}{l}
t_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}\\
t_2 := \frac{9 \cdot \left(y \cdot \frac{x}{z}\right) + \left(\frac{b}{z} + a \cdot \left(t \cdot -4\right)\right)}{c}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-39}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_1 \leq 4 \cdot 10^{-269}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+294}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original20.9
Target14.9
Herbie5.3
\[\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 2 regimes
  2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -inf.0 or -9.99999999999999929e-40 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 3.9999999999999998e-269 or 2.00000000000000013e294 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c))

    1. Initial program 46.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} \]
    2. Applied egg-rr27.5

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

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

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

      [Start]15.7

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

      rational.json-simplify-41 [=>]15.7

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

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

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

      rational.json-simplify-49 [=>]11.0

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

      rational.json-simplify-1 [=>]11.0

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -9.99999999999999929e-40 or 3.9999999999999998e-269 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 2.00000000000000013e294

    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} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification5.3

    \[\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{9 \cdot \left(y \cdot \frac{x}{z}\right) + \left(\frac{b}{z} + a \cdot \left(t \cdot -4\right)\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 -1 \cdot 10^{-39}:\\ \;\;\;\;\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 4 \cdot 10^{-269}:\\ \;\;\;\;\frac{9 \cdot \left(y \cdot \frac{x}{z}\right) + \left(\frac{b}{z} + a \cdot \left(t \cdot -4\right)\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 2 \cdot 10^{+294}:\\ \;\;\;\;\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 \left(y \cdot \frac{x}{z}\right) + \left(\frac{b}{z} + a \cdot \left(t \cdot -4\right)\right)}{c}\\ \end{array} \]

Alternatives

Alternative 1
Error38.0
Cost2160
\[\begin{array}{l} t_1 := 9 \cdot \left(y \cdot \frac{x}{c \cdot z}\right)\\ t_2 := \frac{\frac{b}{z}}{c}\\ \mathbf{if}\;y \leq -4 \cdot 10^{-27}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-191}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \mathbf{elif}\;y \leq -3.5 \cdot 10^{-248}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;y \leq 2.75 \cdot 10^{-300}:\\ \;\;\;\;\frac{t}{\frac{c}{a \cdot -4}}\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-222}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{-107}:\\ \;\;\;\;\left(t \cdot \frac{a}{c}\right) \cdot -4\\ \mathbf{elif}\;y \leq 9.6 \cdot 10^{+28}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{+125}:\\ \;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{c}}{z}\right)\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+143}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;y \leq 3.35 \cdot 10^{+179}:\\ \;\;\;\;\frac{\frac{t}{c}}{\frac{-0.25}{a}}\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{+220}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{+225}:\\ \;\;\;\;a \cdot \left(\frac{t}{c} \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error25.1
Cost2156
\[\begin{array}{l} t_1 := 9 \cdot \left(y \cdot \frac{x}{c \cdot z}\right)\\ t_2 := \frac{\frac{b}{z} + -4 \cdot \left(a \cdot t\right)}{c}\\ t_3 := 9 \cdot \left(y \cdot x\right) + b\\ t_4 := \frac{\frac{t_3}{z}}{c}\\ t_5 := \frac{t_3}{z \cdot c}\\ \mathbf{if}\;y \leq -3 \cdot 10^{-143}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;y \leq 7 \cdot 10^{-179}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-159}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;y \leq 7 \cdot 10^{-98}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-62}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{-12}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+102}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{+180}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+219}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{+226}:\\ \;\;\;\;a \cdot \left(\frac{t}{c} \cdot -4\right)\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{+252}:\\ \;\;\;\;t_5\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Error25.2
Cost2156
\[\begin{array}{l} t_1 := \frac{\frac{b}{z} + -4 \cdot \left(a \cdot t\right)}{c}\\ t_2 := 9 \cdot \left(y \cdot x\right) + b\\ t_3 := \frac{t_2}{z \cdot c}\\ t_4 := \frac{t_2}{z}\\ t_5 := 9 \cdot \left(y \cdot \frac{x}{c \cdot z}\right)\\ \mathbf{if}\;y \leq -2 \cdot 10^{-142}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 7 \cdot 10^{-179}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-160}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-100}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-62}:\\ \;\;\;\;\frac{t_4}{c}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-11}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+104}:\\ \;\;\;\;t_4 \cdot \frac{1}{c}\\ \mathbf{elif}\;y \leq 10^{+181}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{+220}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{+226}:\\ \;\;\;\;a \cdot \left(\frac{t}{c} \cdot -4\right)\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{+252}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_5\\ \end{array} \]
Alternative 4
Error25.3
Cost2156
\[\begin{array}{l} t_1 := \frac{\frac{b}{z} + -4 \cdot \left(a \cdot t\right)}{c}\\ t_2 := 9 \cdot \left(y \cdot x\right) + b\\ t_3 := \frac{t_2}{z \cdot c}\\ t_4 := 9 \cdot \left(y \cdot \frac{x}{c \cdot z}\right)\\ \mathbf{if}\;y \leq -2.4 \cdot 10^{-145}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 7 \cdot 10^{-179}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-160}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{-98}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{t_2}{z}}{c}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-16}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+103}:\\ \;\;\;\;\frac{\frac{b}{z} + 9 \cdot \frac{y \cdot x}{z}}{c}\\ \mathbf{elif}\;y \leq 1.82 \cdot 10^{+180}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.22 \cdot 10^{+218}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+226}:\\ \;\;\;\;a \cdot \left(\frac{t}{c} \cdot -4\right)\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{+252}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 5
Error22.1
Cost2012
\[\begin{array}{l} t_1 := 9 \cdot \left(y \cdot x\right) + b\\ t_2 := -4 \cdot \frac{a \cdot t}{c} + 9 \cdot \left(x \cdot \frac{y}{c \cdot z}\right)\\ t_3 := \frac{\frac{b}{z} + -4 \cdot \left(a \cdot t\right)}{c}\\ \mathbf{if}\;y \leq -2 \cdot 10^{-142}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{-179}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-159}:\\ \;\;\;\;\frac{t_1}{z \cdot c}\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-99}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{-61}:\\ \;\;\;\;\frac{\frac{t_1}{z}}{c}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{-14}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{+103}:\\ \;\;\;\;\frac{\frac{b}{z} + 9 \cdot \frac{y \cdot x}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error37.9
Cost1896
\[\begin{array}{l} t_1 := 9 \cdot \left(y \cdot \frac{x}{c \cdot z}\right)\\ t_2 := \frac{\frac{b}{z}}{c}\\ \mathbf{if}\;y \leq -2.1 \cdot 10^{-37}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-191}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-248}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;y \leq 2.85 \cdot 10^{-300}:\\ \;\;\;\;\frac{t}{\frac{c}{a \cdot -4}}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-223}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{-108}:\\ \;\;\;\;\left(t \cdot \frac{a}{c}\right) \cdot -4\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{+28}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 2.95 \cdot 10^{+125}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{+139}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+178}:\\ \;\;\;\;\frac{\frac{t}{c}}{\frac{-0.25}{a}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error24.2
Cost1888
\[\begin{array}{l} t_1 := 9 \cdot \left(y \cdot x\right) + b\\ t_2 := -4 \cdot \left(a \cdot t\right)\\ t_3 := \frac{\frac{b}{z} + t_2}{c}\\ \mathbf{if}\;x \leq -5.2 \cdot 10^{+233}:\\ \;\;\;\;9 \cdot \frac{y}{z \cdot \frac{c}{x}}\\ \mathbf{elif}\;x \leq -1.28 \cdot 10^{+216}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -7.8 \cdot 10^{+99}:\\ \;\;\;\;\frac{t_1}{z \cdot c}\\ \mathbf{elif}\;x \leq -9 \cdot 10^{+81}:\\ \;\;\;\;a \cdot \left(\frac{t}{c} \cdot -4\right)\\ \mathbf{elif}\;x \leq -2 \cdot 10^{+64}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -2.8 \cdot 10^{-42}:\\ \;\;\;\;\frac{9 \cdot \frac{y \cdot x}{z} + t_2}{c}\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{-222}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{-75}:\\ \;\;\;\;\frac{t_1}{z} \cdot \frac{1}{c}\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{-16}:\\ \;\;\;\;\frac{a \cdot -4}{\frac{c}{t}}\\ \mathbf{else}:\\ \;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{c}}{z}\right)\\ \end{array} \]
Alternative 8
Error37.7
Cost1764
\[\begin{array}{l} t_1 := -4 \cdot \frac{a \cdot t}{c}\\ t_2 := 9 \cdot \left(y \cdot \frac{x}{c \cdot z}\right)\\ t_3 := \frac{\frac{b}{z}}{c}\\ \mathbf{if}\;y \leq -3.2 \cdot 10^{-32}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-191}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-248}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-300}:\\ \;\;\;\;\frac{t}{\frac{c}{a \cdot -4}}\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-223}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{-108}:\\ \;\;\;\;\left(t \cdot \frac{a}{c}\right) \cdot -4\\ \mathbf{elif}\;y \leq 5 \cdot 10^{+51}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 3 \cdot 10^{+125}:\\ \;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\ \mathbf{elif}\;y \leq 7.3 \cdot 10^{+177}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error26.6
Cost1496
\[\begin{array}{l} t_1 := \frac{9 \cdot \left(y \cdot x\right) + b}{z \cdot c}\\ t_2 := a \cdot \left(\frac{t}{c} \cdot -4\right)\\ \mathbf{if}\;t \leq -2.85 \cdot 10^{+257}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{+232}:\\ \;\;\;\;\left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9\\ \mathbf{elif}\;t \leq -3.2 \cdot 10^{+150}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \mathbf{elif}\;t \leq -1.4 \cdot 10^{+133}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.02 \cdot 10^{+108}:\\ \;\;\;\;\frac{t}{\frac{c}{a \cdot -4}}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-26}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error9.5
Cost1480
\[\begin{array}{l} t_1 := \frac{9 \cdot \left(y \cdot \frac{x}{z}\right) + \left(\frac{b}{z} + a \cdot \left(t \cdot -4\right)\right)}{c}\\ \mathbf{if}\;z \leq -4 \cdot 10^{-57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-47}:\\ \;\;\;\;\frac{9 \cdot \left(y \cdot x\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error7.4
Cost1480
\[\begin{array}{l} t_1 := \frac{9 \cdot \left(y \cdot \frac{x}{z}\right) + \left(\frac{b}{z} + a \cdot \left(t \cdot -4\right)\right)}{c}\\ \mathbf{if}\;z \leq -3.7 \cdot 10^{-6}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-44}:\\ \;\;\;\;\frac{\left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error36.8
Cost1372
\[\begin{array}{l} t_1 := a \cdot \left(\frac{t}{c} \cdot -4\right)\\ \mathbf{if}\;b \leq -8.5:\\ \;\;\;\;\frac{\frac{1}{c}}{z} \cdot b\\ \mathbf{elif}\;b \leq -1.2 \cdot 10^{-235}:\\ \;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{c}}{z}\right)\\ \mathbf{elif}\;b \leq 1.02 \cdot 10^{-200}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 7.2 \cdot 10^{-186}:\\ \;\;\;\;9 \cdot \frac{y \cdot \frac{x}{c}}{z}\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{-156}:\\ \;\;\;\;\frac{t}{\frac{c}{a \cdot -4}}\\ \mathbf{elif}\;b \leq 1.1 \cdot 10^{-96}:\\ \;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\ \mathbf{elif}\;b \leq 7.2 \cdot 10^{+162}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{c}}{\frac{z}{b}}\\ \end{array} \]
Alternative 13
Error36.8
Cost1372
\[\begin{array}{l} t_1 := a \cdot \left(\frac{t}{c} \cdot -4\right)\\ \mathbf{if}\;b \leq -10:\\ \;\;\;\;\frac{\frac{1}{c}}{z} \cdot b\\ \mathbf{elif}\;b \leq -2.9 \cdot 10^{-235}:\\ \;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{c}}{z}\right)\\ \mathbf{elif}\;b \leq 5.5 \cdot 10^{-205}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2 \cdot 10^{-187}:\\ \;\;\;\;9 \cdot \frac{\frac{y \cdot x}{z}}{c}\\ \mathbf{elif}\;b \leq 4.25 \cdot 10^{-153}:\\ \;\;\;\;\frac{t}{\frac{c}{a \cdot -4}}\\ \mathbf{elif}\;b \leq 8.2 \cdot 10^{-97}:\\ \;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\ \mathbf{elif}\;b \leq 1.26 \cdot 10^{+165}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{c}}{\frac{z}{b}}\\ \end{array} \]
Alternative 14
Error37.0
Cost1372
\[\begin{array}{l} \mathbf{if}\;b \leq -13:\\ \;\;\;\;\frac{\frac{1}{c}}{z} \cdot b\\ \mathbf{elif}\;b \leq -6.6 \cdot 10^{-233}:\\ \;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{c}}{z}\right)\\ \mathbf{elif}\;b \leq 1.145 \cdot 10^{-222}:\\ \;\;\;\;\left(t \cdot \frac{a}{c}\right) \cdot -4\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{-185}:\\ \;\;\;\;\frac{\frac{x}{z} \cdot \left(9 \cdot y\right)}{c}\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{-155}:\\ \;\;\;\;\frac{t}{\frac{c}{a \cdot -4}}\\ \mathbf{elif}\;b \leq 8.5 \cdot 10^{-98}:\\ \;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\ \mathbf{elif}\;b \leq 3.4 \cdot 10^{+163}:\\ \;\;\;\;a \cdot \left(\frac{t}{c} \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{c}}{\frac{z}{b}}\\ \end{array} \]
Alternative 15
Error36.9
Cost976
\[\begin{array}{l} t_1 := -4 \cdot \frac{a \cdot t}{c}\\ \mathbf{if}\;a \leq -5.2 \cdot 10^{-185}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{-6}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+44}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 10^{+111}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 16
Error35.3
Cost976
\[\begin{array}{l} t_1 := a \cdot \left(\frac{t}{c} \cdot -4\right)\\ \mathbf{if}\;a \leq -1.12 \cdot 10^{-86}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4.7 \cdot 10^{-7}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+44}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4.9 \cdot 10^{+110}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 17
Error35.2
Cost976
\[\begin{array}{l} t_1 := a \cdot \left(\frac{t}{c} \cdot -4\right)\\ \mathbf{if}\;a \leq -2.35 \cdot 10^{-83}:\\ \;\;\;\;\left(t \cdot \frac{a}{c}\right) \cdot -4\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{-6}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+44}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4.9 \cdot 10^{+110}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 18
Error35.3
Cost976
\[\begin{array}{l} t_1 := a \cdot \left(\frac{t}{c} \cdot -4\right)\\ \mathbf{if}\;a \leq -1.02 \cdot 10^{-75}:\\ \;\;\;\;\left(t \cdot \frac{a}{c}\right) \cdot -4\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-8}:\\ \;\;\;\;\frac{b}{z} \cdot \frac{1}{c}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+44}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4.9 \cdot 10^{+110}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 19
Error35.3
Cost976
\[\begin{array}{l} \mathbf{if}\;a \leq -3.45 \cdot 10^{-74}:\\ \;\;\;\;\left(t \cdot \frac{a}{c}\right) \cdot -4\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-6}:\\ \;\;\;\;\frac{b}{z} \cdot \frac{1}{c}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+44}:\\ \;\;\;\;\frac{t}{\frac{c}{a \cdot -4}}\\ \mathbf{elif}\;a \leq 4.9 \cdot 10^{+110}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(\frac{t}{c} \cdot -4\right)\\ \end{array} \]
Alternative 20
Error18.9
Cost968
\[\begin{array}{l} t_1 := \frac{\frac{b}{z} + -4 \cdot \left(a \cdot t\right)}{c}\\ \mathbf{if}\;z \leq -6.6 \cdot 10^{+15}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+88}:\\ \;\;\;\;\frac{9 \cdot \left(y \cdot x\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 21
Error41.9
Cost584
\[\begin{array}{l} t_1 := \frac{\frac{b}{z}}{c}\\ \mathbf{if}\;z \leq -1 \cdot 10^{-57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 8.4 \cdot 10^{-42}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 22
Error42.8
Cost452
\[\begin{array}{l} \mathbf{if}\;c \leq -3.6 \cdot 10^{-19}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 23
Error43.5
Cost320
\[\frac{b}{z \cdot c} \]

Error

Reproduce?

herbie shell --seed 2023064 
(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)))