Average Error: 20.4 → 6.3
Time: 32.2s
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(y \cdot \left(x \cdot 9\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\ t_2 := \frac{x \cdot \frac{9 \cdot y}{z} + t \cdot \left(a \cdot -4\right)}{c}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{-280}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) + \left(t \cdot a\right) \cdot \left(z \cdot -4\right)\right)}{z} \cdot \frac{1}{c}\\ \mathbf{elif}\;t_1 \leq 10^{+297}:\\ \;\;\;\;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 (/ (+ (- (* y (* x 9.0)) (* (* (* z 4.0) t) a)) b) (* z c)))
        (t_2 (/ (+ (* x (/ (* 9.0 y) z)) (* t (* a -4.0))) c)))
   (if (<= t_1 (- INFINITY))
     t_2
     (if (<= t_1 -1e-280)
       t_1
       (if (<= t_1 0.0)
         (* (/ (+ b (+ (* x (* 9.0 y)) (* (* t a) (* z -4.0)))) z) (/ 1.0 c))
         (if (<= t_1 1e+297) 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 = (((y * (x * 9.0)) - (((z * 4.0) * t) * a)) + b) / (z * c);
	double t_2 = ((x * ((9.0 * y) / z)) + (t * (a * -4.0))) / c;
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = t_2;
	} else if (t_1 <= -1e-280) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = ((b + ((x * (9.0 * y)) + ((t * a) * (z * -4.0)))) / z) * (1.0 / c);
	} else if (t_1 <= 1e+297) {
		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 = (((y * (x * 9.0)) - (((z * 4.0) * t) * a)) + b) / (z * c);
	double t_2 = ((x * ((9.0 * y) / z)) + (t * (a * -4.0))) / c;
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = t_2;
	} else if (t_1 <= -1e-280) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = ((b + ((x * (9.0 * y)) + ((t * a) * (z * -4.0)))) / z) * (1.0 / c);
	} else if (t_1 <= 1e+297) {
		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 = (((y * (x * 9.0)) - (((z * 4.0) * t) * a)) + b) / (z * c)
	t_2 = ((x * ((9.0 * y) / z)) + (t * (a * -4.0))) / c
	tmp = 0
	if t_1 <= -math.inf:
		tmp = t_2
	elif t_1 <= -1e-280:
		tmp = t_1
	elif t_1 <= 0.0:
		tmp = ((b + ((x * (9.0 * y)) + ((t * a) * (z * -4.0)))) / z) * (1.0 / c)
	elif t_1 <= 1e+297:
		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(y * Float64(x * 9.0)) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c))
	t_2 = Float64(Float64(Float64(x * Float64(Float64(9.0 * y) / z)) + Float64(t * Float64(a * -4.0))) / c)
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = t_2;
	elseif (t_1 <= -1e-280)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) + Float64(Float64(t * a) * Float64(z * -4.0)))) / z) * Float64(1.0 / c));
	elseif (t_1 <= 1e+297)
		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 = (((y * (x * 9.0)) - (((z * 4.0) * t) * a)) + b) / (z * c);
	t_2 = ((x * ((9.0 * y) / z)) + (t * (a * -4.0))) / c;
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = t_2;
	elseif (t_1 <= -1e-280)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = ((b + ((x * (9.0 * y)) + ((t * a) * (z * -4.0)))) / z) * (1.0 / c);
	elseif (t_1 <= 1e+297)
		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[(y * N[(x * 9.0), $MachinePrecision]), $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[(x * N[(N[(9.0 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -1e-280], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+297], 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(y \cdot \left(x \cdot 9\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\
t_2 := \frac{x \cdot \frac{9 \cdot y}{z} + t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) + \left(t \cdot a\right) \cdot \left(z \cdot -4\right)\right)}{z} \cdot \frac{1}{c}\\

\mathbf{elif}\;t_1 \leq 10^{+297}:\\
\;\;\;\;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.4
Target14.9
Herbie6.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 3 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 1e297 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c))

    1. Initial program 62.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} \]
    2. Simplified26.5

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right)}{c}} \]
      Proof
      (/.f64 (fma.f64 t (*.f64 a -4) (/.f64 (fma.f64 x (*.f64 9 y) b) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 t (*.f64 a (Rewrite<= metadata-eval (neg.f64 4))) (/.f64 (fma.f64 x (*.f64 9 y) b) z)) c): 0 points increase in error, 1 points decrease in error
      (/.f64 (fma.f64 t (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 a 4))) (/.f64 (fma.f64 x (*.f64 9 y) b) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 t (Rewrite<= distribute-lft-neg-out_binary64 (*.f64 (neg.f64 a) 4)) (/.f64 (fma.f64 x (*.f64 9 y) b) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 t (Rewrite<= *-commutative_binary64 (*.f64 4 (neg.f64 a))) (/.f64 (fma.f64 x (*.f64 9 y) b) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 t (*.f64 4 (neg.f64 a)) (/.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 x (*.f64 9 y)) b)) z)) c): 8 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 t (*.f64 4 (neg.f64 a)) (/.f64 (+.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 x 9) y)) b) z)) c): 18 points increase in error, 1 points decrease in error
      (/.f64 (fma.f64 t (*.f64 4 (neg.f64 a)) (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 b (*.f64 (*.f64 x 9) y))) z)) c): 1 points increase in error, 21 points decrease in error
      (/.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 t (*.f64 4 (neg.f64 a))) (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z))) c): 0 points increase in error, 5 points decrease in error
      (/.f64 (+.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 t 4) (neg.f64 a))) (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z)) c): 26 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (*.f64 (Rewrite<= *-commutative_binary64 (*.f64 4 t)) (neg.f64 a)) (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite=> +-commutative_binary64 (+.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (*.f64 (*.f64 4 t) (neg.f64 a)))) c): 0 points increase in error, 26 points decrease in error
      (/.f64 (+.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (Rewrite=> *-commutative_binary64 (*.f64 (neg.f64 a) (*.f64 4 t)))) c): 5 points increase in error, 21 points decrease in error
      (/.f64 (Rewrite<= cancel-sign-sub-inv_binary64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (*.f64 a (*.f64 4 t)))) c): 21 points increase in error, 5 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 4 t) a))) c): 1 points increase in error, 25 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (Rewrite<= associate-*r*_binary64 (*.f64 4 (*.f64 t a)))) c): 0 points increase in error, 21 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (Rewrite<= /-rgt-identity_binary64 (/.f64 (*.f64 4 (*.f64 t a)) 1))) c): 21 points increase in error, 1 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (/.f64 (*.f64 4 (*.f64 t a)) (Rewrite<= *-inverses_binary64 (/.f64 z z)))) c): 25 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (*.f64 4 (*.f64 t a)) z) z))) c): 1 points increase in error, 25 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 z (*.f64 4 (*.f64 t a)))) z)) c): 25 points increase in error, 1 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (/.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 z 4) (*.f64 t a))) z)) c): 1 points increase in error, 21 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (/.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (*.f64 z 4) t) a)) z)) c): 21 points increase in error, 5 points decrease in error
      (/.f64 (Rewrite<= div-sub_binary64 (/.f64 (-.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) (*.f64 (*.f64 (*.f64 z 4) t) a)) z)) c): 26 points increase in error, 0 points decrease in error
      (/.f64 (/.f64 (Rewrite<= associate-+r-_binary64 (+.f64 b (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)))) z) c): 0 points increase in error, 1 points decrease in error
      (/.f64 (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b)) z) c): 0 points increase in error, 25 points decrease in error
      (Rewrite<= associate-/r*_binary64 (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c))): 21 points increase in error, 0 points decrease in error
    3. Taylor expanded in x around inf 31.1

      \[\leadsto \frac{\mathsf{fma}\left(t, a \cdot -4, \frac{\color{blue}{9 \cdot \left(y \cdot x\right)}}{z}\right)}{c} \]
    4. Simplified31.2

      \[\leadsto \frac{\mathsf{fma}\left(t, a \cdot -4, \frac{\color{blue}{y \cdot \left(9 \cdot x\right)}}{z}\right)}{c} \]
      Proof
      (/.f64 (fma.f64 t (*.f64 a -4) (/.f64 (*.f64 y (*.f64 9 x)) z)) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 t (*.f64 a -4) (/.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 y 9) x)) z)) c): 0 points increase in error, 1 points decrease in error
      (/.f64 (fma.f64 t (*.f64 a -4) (/.f64 (*.f64 (Rewrite<= *-commutative_binary64 (*.f64 9 y)) x) z)) c): 1 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 t (*.f64 a -4) (/.f64 (Rewrite<= associate-*r*_binary64 (*.f64 9 (*.f64 y x))) z)) c): 0 points increase in error, 1 points decrease in error
    5. Applied egg-rr22.4

      \[\leadsto \frac{\color{blue}{\frac{y \cdot 9}{z} \cdot x + t \cdot \left(a \cdot -4\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.9999999999999996e-281 or 0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 1e297

    1. Initial program 0.8

      \[\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 -9.9999999999999996e-281 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 0.0

    1. Initial program 37.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. Applied egg-rr0.4

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(y \cdot \left(x \cdot 9\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq -\infty:\\ \;\;\;\;\frac{x \cdot \frac{9 \cdot y}{z} + t \cdot \left(a \cdot -4\right)}{c}\\ \mathbf{elif}\;\frac{\left(y \cdot \left(x \cdot 9\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq -1 \cdot 10^{-280}:\\ \;\;\;\;\frac{\left(y \cdot \left(x \cdot 9\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\ \mathbf{elif}\;\frac{\left(y \cdot \left(x \cdot 9\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq 0:\\ \;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) + \left(t \cdot a\right) \cdot \left(z \cdot -4\right)\right)}{z} \cdot \frac{1}{c}\\ \mathbf{elif}\;\frac{\left(y \cdot \left(x \cdot 9\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq 10^{+297}:\\ \;\;\;\;\frac{\left(y \cdot \left(x \cdot 9\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \frac{9 \cdot y}{z} + t \cdot \left(a \cdot -4\right)}{c}\\ \end{array} \]

Alternatives

Alternative 1
Error6.3
Cost6352
\[\begin{array}{l} t_1 := \frac{\left(y \cdot \left(x \cdot 9\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\ t_2 := \frac{x \cdot \frac{9 \cdot y}{z} + t \cdot \left(a \cdot -4\right)}{c}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{-280}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{a \cdot \left(t \cdot -4\right) + \frac{b + x \cdot \left(9 \cdot y\right)}{z}}{c}\\ \mathbf{elif}\;t_1 \leq 10^{+297}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 2
Error6.4
Cost6352
\[\begin{array}{l} t_1 := \frac{\left(y \cdot \left(x \cdot 9\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\ t_2 := \frac{x \cdot \frac{9 \cdot y}{z} + t \cdot \left(a \cdot -4\right)}{c}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq -5 \cdot 10^{-240}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{1}{z} \cdot \frac{b + \left(x \cdot \left(9 \cdot y\right) + \left(t \cdot a\right) \cdot \left(z \cdot -4\right)\right)}{c}\\ \mathbf{elif}\;t_1 \leq 10^{+297}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error37.8
Cost2424
\[\begin{array}{l} t_1 := 9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\ t_2 := \frac{t \cdot \left(a \cdot -4\right)}{c}\\ t_3 := a \cdot \frac{t \cdot -4}{c}\\ t_4 := \frac{\frac{b}{c}}{z}\\ \mathbf{if}\;z \leq -1.5 \cdot 10^{+89}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.28 \cdot 10^{+23}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.3 \cdot 10^{-103}:\\ \;\;\;\;b \cdot \frac{\frac{1}{c}}{z}\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{-142}:\\ \;\;\;\;9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-211}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-179}:\\ \;\;\;\;\frac{9}{\frac{z}{\frac{x}{\frac{c}{y}}}}\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-57}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;z \leq 0.00022:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{+78}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{+133}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+196}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+225}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{+258}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.52 \cdot 10^{+259}:\\ \;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 4
Error37.7
Cost2424
\[\begin{array}{l} t_1 := a \cdot \frac{t \cdot -4}{c}\\ t_2 := 9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\ t_3 := \frac{t \cdot \left(a \cdot -4\right)}{c}\\ t_4 := \frac{\frac{b}{c}}{z}\\ \mathbf{if}\;z \leq -8.5 \cdot 10^{+86}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{+21}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-99}:\\ \;\;\;\;b \cdot \frac{\frac{1}{c}}{z}\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-142}:\\ \;\;\;\;9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{-210}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-178}:\\ \;\;\;\;\frac{9}{\frac{z}{\frac{x}{\frac{c}{y}}}}\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{-59}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;z \leq 0.0009:\\ \;\;\;\;\frac{9 \cdot y}{z \cdot \frac{c}{x}}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+77}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{+133}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{+196}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+227}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+242}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.52 \cdot 10^{+259}:\\ \;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error36.6
Cost1636
\[\begin{array}{l} t_1 := 9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\ t_2 := 9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\ t_3 := \frac{\frac{b}{c}}{z}\\ \mathbf{if}\;z \leq -2.6 \cdot 10^{+87}:\\ \;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c}\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{+21}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-102}:\\ \;\;\;\;\frac{1}{z} \cdot \frac{b}{c}\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-143}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-211}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-179}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-58}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;z \leq 0.00145:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+70}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \end{array} \]
Alternative 6
Error36.1
Cost1636
\[\begin{array}{l} t_1 := 9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\ t_2 := \frac{\frac{b}{c}}{z}\\ \mathbf{if}\;z \leq -5.6 \cdot 10^{+87}:\\ \;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{+20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-99}:\\ \;\;\;\;\frac{1}{z} \cdot \frac{b}{c}\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-143}:\\ \;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-210}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 7.7 \cdot 10^{-224}:\\ \;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-57}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;z \leq 0.0015:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+70}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \end{array} \]
Alternative 7
Error36.0
Cost1636
\[\begin{array}{l} t_1 := 9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\ t_2 := \frac{\frac{b}{c}}{z}\\ \mathbf{if}\;z \leq -6.2 \cdot 10^{+88}:\\ \;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c}\\ \mathbf{elif}\;z \leq -9.6 \cdot 10^{+20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-104}:\\ \;\;\;\;\frac{1}{z} \cdot \frac{b}{c}\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-143}:\\ \;\;\;\;9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{-208}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-225}:\\ \;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-57}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;z \leq 0.00185:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+71}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \end{array} \]
Alternative 8
Error36.1
Cost1636
\[\begin{array}{l} t_1 := 9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\ t_2 := \frac{\frac{b}{c}}{z}\\ \mathbf{if}\;z \leq -7 \cdot 10^{+89}:\\ \;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c}\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{+21}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-102}:\\ \;\;\;\;b \cdot \frac{\frac{1}{c}}{z}\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-142}:\\ \;\;\;\;9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-209}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.46 \cdot 10^{-220}:\\ \;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-56}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;z \leq 0.00185:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+70}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \end{array} \]
Alternative 9
Error35.9
Cost1633
\[\begin{array}{l} t_1 := 9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\ \mathbf{if}\;a \leq -2.65 \cdot 10^{-117}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-281}:\\ \;\;\;\;\frac{1}{c \cdot \frac{z}{b}}\\ \mathbf{elif}\;a \leq 4.05 \cdot 10^{-199}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{-164}:\\ \;\;\;\;\frac{1}{z} \cdot \frac{b}{c}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-100}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4000000000000:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+106} \lor \neg \left(a \leq 2.95 \cdot 10^{+122}\right):\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error21.6
Cost1620
\[\begin{array}{l} t_1 := \frac{a \cdot \left(t \cdot -4\right) + \frac{y \cdot \left(x \cdot 9\right)}{z}}{c}\\ \mathbf{if}\;z \leq -2.5 \cdot 10^{+26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-108}:\\ \;\;\;\;\frac{1}{z} \cdot \frac{b + -4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{c}\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{-142}:\\ \;\;\;\;9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+55}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+206}:\\ \;\;\;\;\frac{\frac{b}{z} + -4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error20.0
Cost1620
\[\begin{array}{l} t_1 := \frac{x \cdot \frac{9 \cdot y}{z} + t \cdot \left(a \cdot -4\right)}{c}\\ \mathbf{if}\;z \leq -2.3 \cdot 10^{+24}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-108}:\\ \;\;\;\;\frac{1}{z} \cdot \frac{b + -4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{c}\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{-142}:\\ \;\;\;\;9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+54}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+205}:\\ \;\;\;\;\frac{\frac{b}{z} + -4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error9.4
Cost1481
\[\begin{array}{l} t_1 := x \cdot \left(9 \cdot y\right)\\ \mathbf{if}\;z \leq -2 \cdot 10^{+17} \lor \neg \left(z \leq 10^{-20}\right):\\ \;\;\;\;\frac{a \cdot \left(t \cdot -4\right) + \frac{b + t_1}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b + \left(t_1 + \left(t \cdot a\right) \cdot \left(z \cdot -4\right)\right)}{z \cdot c}\\ \end{array} \]
Alternative 13
Error11.9
Cost1353
\[\begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{-132} \lor \neg \left(z \leq 5.5 \cdot 10^{-21}\right):\\ \;\;\;\;\frac{a \cdot \left(t \cdot -4\right) + \frac{b + x \cdot \left(9 \cdot y\right)}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \end{array} \]
Alternative 14
Error27.0
Cost1233
\[\begin{array}{l} \mathbf{if}\;z \leq -5.6 \cdot 10^{+96}:\\ \;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+70} \lor \neg \left(z \leq 4.4 \cdot 10^{+107}\right) \land z \leq 1.52 \cdot 10^{+259}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \end{array} \]
Alternative 15
Error19.8
Cost1233
\[\begin{array}{l} t_1 := \frac{\frac{b}{z} + -4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{if}\;z \leq -7 \cdot 10^{+86}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{+71}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{9 \cdot y}{c}\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-25} \lor \neg \left(z \leq 5.5 \cdot 10^{+54}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \end{array} \]
Alternative 16
Error34.8
Cost713
\[\begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+43} \lor \neg \left(z \leq 1.5 \cdot 10^{+70}\right):\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \end{array} \]
Alternative 17
Error34.9
Cost713
\[\begin{array}{l} \mathbf{if}\;z \leq -8.8 \cdot 10^{+42} \lor \neg \left(z \leq 2.4 \cdot 10^{+80}\right):\\ \;\;\;\;\left(t \cdot a\right) \cdot \frac{-4}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \end{array} \]
Alternative 18
Error34.7
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+43}:\\ \;\;\;\;\left(t \cdot a\right) \cdot \frac{-4}{c}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+70}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \end{array} \]
Alternative 19
Error34.7
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+43}:\\ \;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+71}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{t \cdot -4}{c}\\ \end{array} \]
Alternative 20
Error43.5
Cost320
\[\frac{b}{z \cdot c} \]

Error

Reproduce

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