Average Error: 20.1 → 4.3
Time: 38.0s
Precision: binary64
Cost: 12880
\[ \begin{array}{c}[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{b}{z \cdot c} + \mathsf{fma}\left(9, \frac{x}{z} \cdot \frac{y}{c}, \frac{a}{\frac{c}{t}} \cdot -4\right)\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{-62}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{1}{z} \cdot \frac{b + \left(x \cdot \left(9 \cdot y\right) + z \cdot \left(a \cdot \left(t \cdot -4\right)\right)\right)}{c}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+275}:\\ \;\;\;\;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
         (+
          (/ b (* z c))
          (fma 9.0 (* (/ x z) (/ y c)) (* (/ a (/ c t)) -4.0)))))
   (if (<= t_1 (- INFINITY))
     t_2
     (if (<= t_1 -1e-62)
       t_1
       (if (<= t_1 0.0)
         (* (/ 1.0 z) (/ (+ b (+ (* x (* 9.0 y)) (* z (* a (* t -4.0))))) c))
         (if (<= t_1 5e+275) 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 = (b / (z * c)) + fma(9.0, ((x / z) * (y / c)), ((a / (c / t)) * -4.0));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = t_2;
	} else if (t_1 <= -1e-62) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = (1.0 / z) * ((b + ((x * (9.0 * y)) + (z * (a * (t * -4.0))))) / c);
	} else if (t_1 <= 5e+275) {
		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(b / Float64(z * c)) + fma(9.0, Float64(Float64(x / z) * Float64(y / c)), Float64(Float64(a / Float64(c / t)) * -4.0)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = t_2;
	elseif (t_1 <= -1e-62)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(1.0 / z) * Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) + Float64(z * Float64(a * Float64(t * -4.0))))) / c));
	elseif (t_1 <= 5e+275)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return 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[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x / z), $MachinePrecision] * N[(y / c), $MachinePrecision]), $MachinePrecision] + N[(N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -1e-62], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(1.0 / z), $MachinePrecision] * N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] + N[(z * N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+275], 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{b}{z \cdot c} + \mathsf{fma}\left(9, \frac{x}{z} \cdot \frac{y}{c}, \frac{a}{\frac{c}{t}} \cdot -4\right)\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;t_2\\

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

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

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+275}:\\
\;\;\;\;t_1\\

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


\end{array}

Error

Target

Original20.1
Target14.7
Herbie4.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 5.0000000000000003e275 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c))

    1. Initial program 58.9

      \[\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. Taylor expanded in x around 0 28.9

      \[\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}} \]
    3. Simplified12.9

      \[\leadsto \color{blue}{\frac{b}{z \cdot c} + \mathsf{fma}\left(9, \frac{x}{z} \cdot \frac{y}{c}, \frac{a}{\frac{c}{t}} \cdot -4\right)} \]
      Proof
      (+.f64 (/.f64 b (*.f64 z c)) (fma.f64 9 (*.f64 (/.f64 x z) (/.f64 y c)) (*.f64 (/.f64 a (/.f64 c t)) -4))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 b (Rewrite=> *-commutative_binary64 (*.f64 c z))) (fma.f64 9 (*.f64 (/.f64 x z) (/.f64 y c)) (*.f64 (/.f64 a (/.f64 c t)) -4))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 b (*.f64 c z)) (fma.f64 9 (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 y c) (/.f64 x z))) (*.f64 (/.f64 a (/.f64 c t)) -4))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 b (*.f64 c z)) (fma.f64 9 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 y x) (*.f64 c z))) (*.f64 (/.f64 a (/.f64 c t)) -4))): 31 points increase in error, 33 points decrease in error
      (+.f64 (/.f64 b (*.f64 c z)) (fma.f64 9 (/.f64 (*.f64 y x) (*.f64 c z)) (*.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 a t) c)) -4))): 30 points increase in error, 24 points decrease in error
      (+.f64 (/.f64 b (*.f64 c z)) (fma.f64 9 (/.f64 (*.f64 y x) (*.f64 c z)) (*.f64 (/.f64 (*.f64 a t) c) (Rewrite<= metadata-eval (neg.f64 4))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 b (*.f64 c z)) (fma.f64 9 (/.f64 (*.f64 y x) (*.f64 c z)) (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 (/.f64 (*.f64 a t) c) 4))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 b (*.f64 c z)) (fma.f64 9 (/.f64 (*.f64 y x) (*.f64 c z)) (neg.f64 (Rewrite<= *-commutative_binary64 (*.f64 4 (/.f64 (*.f64 a t) c)))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 b (*.f64 c z)) (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 9 (/.f64 (*.f64 y x) (*.f64 c z))) (*.f64 4 (/.f64 (*.f64 a t) c))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 (/.f64 b (*.f64 c z)) (*.f64 9 (/.f64 (*.f64 y x) (*.f64 c z)))) (*.f64 4 (/.f64 (*.f64 a t) c)))): 0 points increase in error, 0 points decrease in error

    if -inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -1e-62 or 0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 5.0000000000000003e275

    1. Initial program 0.6

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

    1. Initial program 24.6

      \[\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-rr2.9

      \[\leadsto \color{blue}{\frac{1}{z} \cdot \frac{\left(x \cdot \left(9 \cdot y\right) - z \cdot \left(\left(4 \cdot t\right) \cdot a\right)\right) + b}{c}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification4.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{b}{z \cdot c} + \mathsf{fma}\left(9, \frac{x}{z} \cdot \frac{y}{c}, \frac{a}{\frac{c}{t}} \cdot -4\right)\\ \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^{-62}:\\ \;\;\;\;\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 0:\\ \;\;\;\;\frac{1}{z} \cdot \frac{b + \left(x \cdot \left(9 \cdot y\right) + z \cdot \left(a \cdot \left(t \cdot -4\right)\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 5 \cdot 10^{+275}:\\ \;\;\;\;\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{b}{z \cdot c} + \mathsf{fma}\left(9, \frac{x}{z} \cdot \frac{y}{c}, \frac{a}{\frac{c}{t}} \cdot -4\right)\\ \end{array} \]

Alternatives

Alternative 1
Error10.3
Cost8912
\[\begin{array}{l} t_1 := \frac{\frac{\mathsf{fma}\left(x \cdot 9, y, b\right)}{z} + t \cdot \left(a \cdot -4\right)}{c}\\ t_2 := \left(x \cdot 9\right) \cdot y\\ t_3 := y \cdot \left(\frac{9}{z} \cdot \frac{x}{c}\right)\\ \mathbf{if}\;t_2 \leq -2 \cdot 10^{+282}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{-23}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+98}:\\ \;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) + \left(t \cdot a\right) \cdot \left(z \cdot -4\right)\right)}{z \cdot c}\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{+291}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 2
Error9.1
Cost6352
\[\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}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{-312}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+305}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{\frac{c}{t}} \cdot -4\\ \end{array} \]
Alternative 3
Error8.4
Cost6352
\[\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}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{-62}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{1}{z} \cdot \frac{b + \left(x \cdot \left(9 \cdot y\right) + z \cdot \left(a \cdot \left(t \cdot -4\right)\right)\right)}{c}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+305}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{\frac{c}{t}} \cdot -4\\ \end{array} \]
Alternative 4
Error31.6
Cost2024
\[\begin{array}{l} t_1 := \frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{if}\;x \leq -1.25 \cdot 10^{+263}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z}}{\frac{c}{9}}\\ \mathbf{elif}\;x \leq -6 \cdot 10^{+244}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -3 \cdot 10^{+148}:\\ \;\;\;\;9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\ \mathbf{elif}\;x \leq -3.9 \cdot 10^{-53}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.1 \cdot 10^{-98}:\\ \;\;\;\;\frac{a}{\frac{c}{t}} \cdot -4\\ \mathbf{elif}\;x \leq -3.8 \cdot 10^{-136}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -6 \cdot 10^{-250}:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \mathbf{elif}\;x \leq 8.4 \cdot 10^{-297}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{-237}:\\ \;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\ \mathbf{elif}\;x \leq 2.35 \cdot 10^{+30}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(\frac{9}{z} \cdot \frac{x}{c}\right)\\ \end{array} \]
Alternative 5
Error25.9
Cost1892
\[\begin{array}{l} t_1 := \frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ t_2 := \frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\ \mathbf{if}\;a \leq -8 \cdot 10^{-142}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-196}:\\ \;\;\;\;9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)\\ \mathbf{elif}\;a \leq -4.9 \cdot 10^{-227}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-201}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-56}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 0.0185:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{+72}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+81}:\\ \;\;\;\;y \cdot \left(\frac{9}{z} \cdot \frac{x}{c}\right)\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{+193}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\ \end{array} \]
Alternative 6
Error25.7
Cost1892
\[\begin{array}{l} t_1 := \frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\ t_2 := \frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{if}\;a \leq -1.28 \cdot 10^{-148}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{-194}:\\ \;\;\;\;9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)\\ \mathbf{elif}\;a \leq -2.2 \cdot 10^{-227}:\\ \;\;\;\;\frac{b + \left(t \cdot a\right) \cdot \left(z \cdot -4\right)}{z \cdot c}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-201}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{-55}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 0.018:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{+72}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+81}:\\ \;\;\;\;y \cdot \left(\frac{9}{z} \cdot \frac{x}{c}\right)\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{+194}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\ \end{array} \]
Alternative 7
Error25.7
Cost1892
\[\begin{array}{l} t_1 := \frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ t_2 := \frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\ \mathbf{if}\;x \leq -1.18 \cdot 10^{+263}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z}}{\frac{c}{9}}\\ \mathbf{elif}\;x \leq -3.1 \cdot 10^{+245}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -8.2 \cdot 10^{+145}:\\ \;\;\;\;9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\ \mathbf{elif}\;x \leq -9.2 \cdot 10^{+30}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -2.6 \cdot 10^{-98}:\\ \;\;\;\;\frac{b + \left(t \cdot a\right) \cdot \left(z \cdot -4\right)}{z \cdot c}\\ \mathbf{elif}\;x \leq -4.8 \cdot 10^{-129}:\\ \;\;\;\;\frac{\frac{b}{z} + 9 \cdot \frac{y}{\frac{z}{x}}}{c}\\ \mathbf{elif}\;x \leq 2.65 \cdot 10^{-131}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 820000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.4 \cdot 10^{+138}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(\frac{9}{z} \cdot \frac{x}{c}\right)\\ \end{array} \]
Alternative 8
Error25.5
Cost1888
\[\begin{array}{l} t_1 := \frac{\frac{b}{z} + 9 \cdot \frac{y}{\frac{z}{x}}}{c}\\ t_2 := t \cdot \left(a \cdot -4\right)\\ t_3 := \frac{t_2 + 9 \cdot \frac{x \cdot y}{z}}{c}\\ \mathbf{if}\;t \leq -4.6 \cdot 10^{+167}:\\ \;\;\;\;\frac{t_2 + \frac{b}{z}}{c}\\ \mathbf{elif}\;t \leq -5.4 \cdot 10^{+40}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -7.2 \cdot 10^{-28}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.2 \cdot 10^{-60}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-82}:\\ \;\;\;\;y \cdot \left(\frac{9}{z} \cdot \frac{x}{c}\right)\\ \mathbf{elif}\;t \leq -5.4 \cdot 10^{-118}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-139}:\\ \;\;\;\;\frac{b + \left(a \cdot -4\right) \cdot \left(z \cdot t\right)}{z \cdot c}\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{-5}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \end{array} \]
Alternative 9
Error19.0
Cost1876
\[\begin{array}{l} t_1 := \frac{b + \left(x \cdot \left(9 \cdot y\right) + \left(t \cdot a\right) \cdot \left(z \cdot -4\right)\right)}{z \cdot c}\\ t_2 := t \cdot \left(a \cdot -4\right)\\ \mathbf{if}\;t \leq -2.4 \cdot 10^{+167}:\\ \;\;\;\;\frac{t_2 + \frac{b}{z}}{c}\\ \mathbf{elif}\;t \leq -5.6 \cdot 10^{+79}:\\ \;\;\;\;\frac{t_2 + 9 \cdot \frac{x \cdot y}{z}}{c}\\ \mathbf{elif}\;t \leq -9.6 \cdot 10^{-48}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-80}:\\ \;\;\;\;y \cdot \left(\frac{9}{z} \cdot \frac{x}{c}\right)\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{+50}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \end{array} \]
Alternative 10
Error36.9
Cost1764
\[\begin{array}{l} t_1 := 9 \cdot \frac{x}{c \cdot \frac{z}{y}}\\ t_2 := \frac{a}{\frac{c}{t}} \cdot -4\\ \mathbf{if}\;b \leq -2.45 \cdot 10^{+111}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;b \leq -3.5 \cdot 10^{-98}:\\ \;\;\;\;9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\ \mathbf{elif}\;b \leq -1 \cdot 10^{-208}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -4.2 \cdot 10^{-225}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -8.2 \cdot 10^{-250}:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \mathbf{elif}\;b \leq 5.2 \cdot 10^{-135}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 8.8 \cdot 10^{-74}:\\ \;\;\;\;9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{-53}:\\ \;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{+107}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 11
Error36.1
Cost1764
\[\begin{array}{l} t_1 := 9 \cdot \frac{x \cdot y}{z \cdot c}\\ t_2 := 9 \cdot \frac{x}{c \cdot \frac{z}{y}}\\ t_3 := \frac{a}{\frac{c}{t}} \cdot -4\\ t_4 := -4 \cdot \frac{t}{\frac{c}{a}}\\ \mathbf{if}\;b \leq -6.5 \cdot 10^{+19}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;b \leq -8.6 \cdot 10^{-106}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1.32 \cdot 10^{-198}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq -1.25 \cdot 10^{-221}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -2.6 \cdot 10^{-252}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;b \leq 9.5 \cdot 10^{-130}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 6.2 \cdot 10^{-81}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 3.2 \cdot 10^{-54}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;b \leq 1.12 \cdot 10^{+108}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 12
Error37.1
Cost1764
\[\begin{array}{l} t_1 := 9 \cdot \frac{x}{c \cdot \frac{z}{y}}\\ t_2 := \frac{a}{\frac{c}{t}} \cdot -4\\ t_3 := -4 \cdot \frac{t}{\frac{c}{a}}\\ \mathbf{if}\;b \leq -1.95 \cdot 10^{+109}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;b \leq -1.9 \cdot 10^{-106}:\\ \;\;\;\;9 \cdot \frac{x \cdot \frac{y}{z}}{c}\\ \mathbf{elif}\;b \leq -2.45 \cdot 10^{-203}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -4.6 \cdot 10^{-233}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -2 \cdot 10^{-250}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 6.6 \cdot 10^{-127}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 4 \cdot 10^{-81}:\\ \;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\ \mathbf{elif}\;b \leq 5.5 \cdot 10^{-53}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 4.1 \cdot 10^{+110}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 13
Error37.0
Cost1764
\[\begin{array}{l} t_1 := -4 \cdot \frac{t}{\frac{c}{a}}\\ t_2 := \frac{a}{\frac{c}{t}} \cdot -4\\ \mathbf{if}\;b \leq -1.95 \cdot 10^{+109}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;b \leq -9.5 \cdot 10^{-106}:\\ \;\;\;\;9 \cdot \frac{x \cdot \frac{y}{z}}{c}\\ \mathbf{elif}\;b \leq -3.4 \cdot 10^{-208}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -4.6 \cdot 10^{-224}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z}}{\frac{c}{9}}\\ \mathbf{elif}\;b \leq -1.2 \cdot 10^{-250}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 3.15 \cdot 10^{-127}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 1.65 \cdot 10^{-79}:\\ \;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\ \mathbf{elif}\;b \leq 2.7 \cdot 10^{-53}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{+107}:\\ \;\;\;\;9 \cdot \frac{x}{c \cdot \frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 14
Error36.5
Cost1636
\[\begin{array}{l} t_1 := \frac{a}{\frac{c}{t}} \cdot -4\\ \mathbf{if}\;b \leq -1.95 \cdot 10^{+109}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;b \leq -8.5 \cdot 10^{-106}:\\ \;\;\;\;9 \cdot \frac{x \cdot \frac{y}{z}}{c}\\ \mathbf{elif}\;b \leq -5.2 \cdot 10^{-204}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1.05 \cdot 10^{-217}:\\ \;\;\;\;y \cdot \left(\frac{9}{z} \cdot \frac{x}{c}\right)\\ \mathbf{elif}\;b \leq 9 \cdot 10^{-130}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{-81}:\\ \;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\ \mathbf{elif}\;b \leq 7.4 \cdot 10^{-56}:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \mathbf{elif}\;b \leq 1.35 \cdot 10^{+27}:\\ \;\;\;\;9 \cdot \frac{x}{c \cdot \frac{z}{y}}\\ \mathbf{elif}\;b \leq 8 \cdot 10^{+78}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 15
Error36.8
Cost1636
\[\begin{array}{l} t_1 := \left(9 \cdot y\right) \cdot \frac{x}{z \cdot c}\\ t_2 := \frac{a}{\frac{c}{t}} \cdot -4\\ \mathbf{if}\;b \leq -1.95 \cdot 10^{+109}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;b \leq -9.5 \cdot 10^{-106}:\\ \;\;\;\;9 \cdot \frac{x \cdot \frac{y}{z}}{c}\\ \mathbf{elif}\;b \leq -6.6 \cdot 10^{-198}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -5 \cdot 10^{-218}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 8.6 \cdot 10^{-156}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 8.4 \cdot 10^{-82}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 9.8 \cdot 10^{-54}:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \mathbf{elif}\;b \leq 1.1 \cdot 10^{+27}:\\ \;\;\;\;9 \cdot \frac{x}{c \cdot \frac{z}{y}}\\ \mathbf{elif}\;b \leq 2.65 \cdot 10^{+79}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 16
Error37.2
Cost1632
\[\begin{array}{l} t_1 := \frac{a}{\frac{c}{t}} \cdot -4\\ t_2 := 9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)\\ \mathbf{if}\;t \leq -4.2 \cdot 10^{+67}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{-24}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-58}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-66}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.12 \cdot 10^{-142}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;t \leq -3.1 \cdot 10^{-150}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -3.6 \cdot 10^{-155}:\\ \;\;\;\;\frac{b}{\frac{z}{\frac{1}{c}}}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-9}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \end{array} \]
Alternative 17
Error38.2
Cost1632
\[\begin{array}{l} t_1 := 9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)\\ t_2 := \frac{a}{\frac{c}{t}} \cdot -4\\ \mathbf{if}\;x \leq -8.5 \cdot 10^{+69}:\\ \;\;\;\;9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\ \mathbf{elif}\;x \leq -105000000000:\\ \;\;\;\;b \cdot \frac{1}{z \cdot c}\\ \mathbf{elif}\;x \leq -4 \cdot 10^{-31}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{elif}\;x \leq -1.3 \cdot 10^{-47}:\\ \;\;\;\;\frac{b}{\frac{z}{\frac{1}{c}}}\\ \mathbf{elif}\;x \leq -1.02 \cdot 10^{-182}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.66 \cdot 10^{-251}:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \mathbf{elif}\;x \leq -6.7 \cdot 10^{-267}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{-76}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 18
Error35.0
Cost976
\[\begin{array}{l} t_1 := -4 \cdot \frac{t}{\frac{c}{a}}\\ \mathbf{if}\;b \leq -2.5 \cdot 10^{+109}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;b \leq -1.26 \cdot 10^{-23}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -4.6 \cdot 10^{-82}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;b \leq 1.85 \cdot 10^{+80}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 19
Error35.2
Cost976
\[\begin{array}{l} t_1 := a \cdot \left(t \cdot \frac{-4}{c}\right)\\ \mathbf{if}\;b \leq -4.2 \cdot 10^{+109}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;b \leq -1.3 \cdot 10^{-23}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -4.6 \cdot 10^{-82}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;b \leq 1.38 \cdot 10^{+79}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 20
Error35.2
Cost976
\[\begin{array}{l} \mathbf{if}\;b \leq -1.95 \cdot 10^{+109}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;b \leq -1.15 \cdot 10^{-23}:\\ \;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\ \mathbf{elif}\;b \leq -1.75 \cdot 10^{-82}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;b \leq 5.9 \cdot 10^{+79}:\\ \;\;\;\;\frac{a}{\frac{c}{t}} \cdot -4\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 21
Error35.2
Cost976
\[\begin{array}{l} \mathbf{if}\;b \leq -1.95 \cdot 10^{+109}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;b \leq -1.36 \cdot 10^{-23}:\\ \;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\ \mathbf{elif}\;b \leq -1.75 \cdot 10^{-82}:\\ \;\;\;\;\frac{\frac{1}{c}}{\frac{z}{b}}\\ \mathbf{elif}\;b \leq 3.6 \cdot 10^{+80}:\\ \;\;\;\;\frac{a}{\frac{c}{t}} \cdot -4\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 22
Error43.0
Cost320
\[\frac{b}{z \cdot c} \]

Error

Reproduce

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