Average Error: 21.1 → 7.7
Time: 50.4s
Precision: binary64
Cost: 18768
\[ \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 + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c}\\ t_2 := \frac{\mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right)}{c}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{-182}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+22}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+283}:\\ \;\;\;\;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) (* a (* t (* z -4.0)))) b) (* z c)))
        (t_2 (/ (fma t (* a -4.0) (/ (fma x (* 9.0 y) b) z)) c)))
   (if (<= t_1 (- INFINITY))
     t_2
     (if (<= t_1 -2e-182)
       t_1
       (if (<= t_1 5e+22) t_2 (if (<= t_1 5e+283) 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) + (a * (t * (z * -4.0)))) + b) / (z * c);
	double t_2 = fma(t, (a * -4.0), (fma(x, (9.0 * y), b) / z)) / c;
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = t_2;
	} else if (t_1 <= -2e-182) {
		tmp = t_1;
	} else if (t_1 <= 5e+22) {
		tmp = t_2;
	} else if (t_1 <= 5e+283) {
		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(a * Float64(t * Float64(z * -4.0)))) + b) / Float64(z * c))
	t_2 = Float64(fma(t, Float64(a * -4.0), Float64(fma(x, Float64(9.0 * y), b) / z)) / c)
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = t_2;
	elseif (t_1 <= -2e-182)
		tmp = t_1;
	elseif (t_1 <= 5e+22)
		tmp = t_2;
	elseif (t_1 <= 5e+283)
		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[(a * N[(t * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t * N[(a * -4.0), $MachinePrecision] + N[(N[(x * N[(9.0 * y), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -2e-182], t$95$1, If[LessEqual[t$95$1, 5e+22], t$95$2, If[LessEqual[t$95$1, 5e+283], 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 + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c}\\
t_2 := \frac{\mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right)}{c}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_1 \leq -2 \cdot 10^{-182}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}

Error

Target

Original21.1
Target14.5
Herbie7.7
\[\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 -2.0000000000000001e-182 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 4.9999999999999996e22 or 5.0000000000000004e283 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c))

    1. Initial program 41.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. Simplified14.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, 0 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): 1 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): 6 points increase in error, 6 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): 0 points increase in error, 0 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, 1 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): 0 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 (+.f64 (Rewrite=> distribute-rgt-neg-out_binary64 (neg.f64 (*.f64 (*.f64 4 t) 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) (neg.f64 (*.f64 (*.f64 4 t) a)))) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite=> unsub-neg_binary64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (*.f64 (*.f64 4 t) a))) c): 0 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 4 (*.f64 t a)))) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (*.f64 (Rewrite<= metadata-eval (/.f64 4 1)) (*.f64 t a))) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (*.f64 (/.f64 4 (Rewrite<= *-inverses_binary64 (/.f64 z z))) (*.f64 t a))) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (*.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 4 z) z)) (*.f64 t a))) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (*.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 z 4)) z) (*.f64 t a))) c): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (Rewrite<= associate-/r/_binary64 (/.f64 (*.f64 z 4) (/.f64 z (*.f64 t a))))) c): 22 points increase in error, 2 points decrease in error
      (/.f64 (-.f64 (/.f64 (+.f64 b (*.f64 (*.f64 x 9) y)) z) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (*.f64 z 4) (*.f64 t a)) z))) c): 31 points increase in error, 19 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): 23 points increase in error, 4 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): 2 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, 0 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, 0 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))): 42 points increase in error, 53 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)) < -2.0000000000000001e-182 or 4.9999999999999996e22 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 5.0000000000000004e283

    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 simplification7.7

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(\left(x \cdot 9\right) \cdot y + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c} \leq -\infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right)}{c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c} \leq -2 \cdot 10^{-182}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c} \leq 5 \cdot 10^{+22}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right)}{c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c} \leq 5 \cdot 10^{+283}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right)}{c}\\ \end{array} \]

Alternatives

Alternative 1
Error8.4
Cost8516
\[\begin{array}{l} t_1 := \frac{\left(\left(x \cdot 9\right) \cdot y + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(t, a \cdot -4, \frac{9 \cdot \left(x \cdot y\right)}{z}\right)}{c}\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{-182}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+22}:\\ \;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - z \cdot \left(a \cdot \left(4 \cdot t\right)\right)\right)}{z} \cdot \frac{1}{c}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+286}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{z} + a \cdot \left(t \cdot -4\right)}{c}\\ \end{array} \]
Alternative 2
Error9.6
Cost6352
\[\begin{array}{l} t_1 := \frac{\left(\left(x \cdot 9\right) \cdot y + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c}\\ t_2 := \frac{\frac{b}{z} + a \cdot \left(t \cdot -4\right)}{c}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z} + -4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{elif}\;t_1 \leq -5 \cdot 10^{-206}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+286}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error8.2
Cost6352
\[\begin{array}{l} t_1 := \frac{\left(\left(x \cdot 9\right) \cdot y + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z} + -4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{-290}:\\ \;\;\;\;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(4 \cdot t\right)\right)\right)}{c}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+286}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{z} + a \cdot \left(t \cdot -4\right)}{c}\\ \end{array} \]
Alternative 4
Error8.3
Cost6352
\[\begin{array}{l} t_1 := \frac{\left(\left(x \cdot 9\right) \cdot y + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z} + -4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{-182}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+22}:\\ \;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - z \cdot \left(a \cdot \left(4 \cdot t\right)\right)\right)}{z} \cdot \frac{1}{c}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+286}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{z} + a \cdot \left(t \cdot -4\right)}{c}\\ \end{array} \]
Alternative 5
Error20.6
Cost2148
\[\begin{array}{l} t_1 := \frac{b}{z \cdot c} - \frac{4 \cdot t}{\frac{c}{a}}\\ t_2 := \frac{\frac{b}{z} + a \cdot \left(t \cdot -4\right)}{c}\\ t_3 := 9 \cdot \left(x \cdot y\right)\\ t_4 := \frac{b + t_3}{z \cdot c}\\ \mathbf{if}\;z \leq -3.05 \cdot 10^{+50}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{+20}:\\ \;\;\;\;y \cdot \frac{x \cdot \frac{9}{z}}{c}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-143}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-150}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-112}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-83}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-34}:\\ \;\;\;\;\frac{t_3 + -4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{z \cdot c}\\ \mathbf{elif}\;z \leq 1.26 \cdot 10^{+31}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.284104715323652 \cdot 10^{+63}:\\ \;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z} + -4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error28.0
Cost2024
\[\begin{array}{l} t_1 := \frac{\frac{b}{c}}{z}\\ t_2 := \frac{\frac{b}{z} + a \cdot \left(t \cdot -4\right)}{c}\\ \mathbf{if}\;z \leq -2.6215587556864824 \cdot 10^{+183}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.754661541252868 \cdot 10^{+148}:\\ \;\;\;\;x \cdot \frac{\frac{9 \cdot y}{z}}{c}\\ \mathbf{elif}\;z \leq -3.05 \cdot 10^{+50}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{+20}:\\ \;\;\;\;y \cdot \frac{x \cdot \frac{9}{z}}{c}\\ \mathbf{elif}\;z \leq -4.1 \cdot 10^{-117}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-207}:\\ \;\;\;\;\frac{\frac{\left(x \cdot 9\right) \cdot y}{c}}{z}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-232}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-149}:\\ \;\;\;\;\frac{9 \cdot \frac{y}{\frac{c}{x}}}{z}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-77}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 7000000:\\ \;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error26.3
Cost2024
\[\begin{array}{l} t_1 := \frac{\frac{b}{z} + a \cdot \left(t \cdot -4\right)}{c}\\ \mathbf{if}\;z \leq -2.6215587556864824 \cdot 10^{+183}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.754661541252868 \cdot 10^{+148}:\\ \;\;\;\;x \cdot \frac{\frac{9 \cdot y}{z}}{c}\\ \mathbf{elif}\;z \leq -3.05 \cdot 10^{+50}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{+20}:\\ \;\;\;\;y \cdot \frac{x \cdot \frac{9}{z}}{c}\\ \mathbf{elif}\;z \leq -4.1 \cdot 10^{-117}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-207}:\\ \;\;\;\;\frac{\frac{\left(x \cdot 9\right) \cdot y}{c}}{z}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-279}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-144}:\\ \;\;\;\;\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{z}}{c}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-112}:\\ \;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\ \mathbf{elif}\;z \leq 2.95 \cdot 10^{-77}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error20.8
Cost1884
\[\begin{array}{l} t_1 := \frac{b}{z \cdot c} - \frac{4 \cdot t}{\frac{c}{a}}\\ t_2 := \frac{\frac{b}{z} + a \cdot \left(t \cdot -4\right)}{c}\\ t_3 := \frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{if}\;z \leq -3.05 \cdot 10^{+50}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{+20}:\\ \;\;\;\;y \cdot \frac{x \cdot \frac{9}{z}}{c}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-143}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-150}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-112}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-83}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 6.284104715323652 \cdot 10^{+63}:\\ \;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z} + -4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error21.4
Cost1756
\[\begin{array}{l} t_1 := \frac{\frac{b}{z} + a \cdot \left(t \cdot -4\right)}{c}\\ t_2 := \frac{b}{z \cdot c} - \frac{4 \cdot t}{\frac{c}{a}}\\ \mathbf{if}\;z \leq -2.6215587556864824 \cdot 10^{+183}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.754661541252868 \cdot 10^{+148}:\\ \;\;\;\;x \cdot \frac{\frac{9 \cdot y}{z}}{c}\\ \mathbf{elif}\;z \leq -3.05 \cdot 10^{+50}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{+20}:\\ \;\;\;\;y \cdot \frac{x \cdot \frac{9}{z}}{c}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-143}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-150}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+46}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error36.5
Cost1636
\[\begin{array}{l} t_1 := \frac{\frac{b}{c}}{z}\\ t_2 := \frac{b}{z \cdot c}\\ \mathbf{if}\;z \leq -2.6215587556864824 \cdot 10^{+183}:\\ \;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\ \mathbf{elif}\;z \leq -2.754661541252868 \cdot 10^{+148}:\\ \;\;\;\;x \cdot \frac{\frac{9 \cdot y}{z}}{c}\\ \mathbf{elif}\;z \leq -1.979102200133648 \cdot 10^{+75}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-9}:\\ \;\;\;\;a \cdot \frac{-4}{\frac{c}{t}}\\ \mathbf{elif}\;z \leq -4.1 \cdot 10^{-117}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-207}:\\ \;\;\;\;\frac{\frac{\left(x \cdot 9\right) \cdot y}{c}}{z}\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-264}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-149}:\\ \;\;\;\;\frac{9}{z} \cdot \left(x \cdot \frac{y}{c}\right)\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-77}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \end{array} \]
Alternative 11
Error36.4
Cost1636
\[\begin{array}{l} t_1 := \frac{\frac{b}{c}}{z}\\ t_2 := \frac{b}{z \cdot c}\\ \mathbf{if}\;z \leq -2.6215587556864824 \cdot 10^{+183}:\\ \;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\ \mathbf{elif}\;z \leq -2.754661541252868 \cdot 10^{+148}:\\ \;\;\;\;x \cdot \frac{\frac{9 \cdot y}{z}}{c}\\ \mathbf{elif}\;z \leq -1.979102200133648 \cdot 10^{+75}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-9}:\\ \;\;\;\;a \cdot \frac{-4}{\frac{c}{t}}\\ \mathbf{elif}\;z \leq -4.1 \cdot 10^{-117}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-207}:\\ \;\;\;\;\frac{\frac{\left(x \cdot 9\right) \cdot y}{c}}{z}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-232}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-149}:\\ \;\;\;\;\frac{9 \cdot \frac{y}{\frac{c}{x}}}{z}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-77}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \end{array} \]
Alternative 12
Error35.5
Cost1504
\[\begin{array}{l} t_1 := \frac{\frac{b}{c}}{z}\\ t_2 := \frac{9}{z} \cdot \left(x \cdot \frac{y}{c}\right)\\ \mathbf{if}\;z \leq -3.05 \cdot 10^{+50}:\\ \;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{+20}:\\ \;\;\;\;y \cdot \frac{\frac{x}{z \cdot 0.1111111111111111}}{c}\\ \mathbf{elif}\;z \leq -9000000:\\ \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\ \mathbf{elif}\;z \leq -4.1 \cdot 10^{-117}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-207}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-264}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-149}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-77}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \end{array} \]
Alternative 13
Error35.5
Cost1504
\[\begin{array}{l} t_1 := \frac{\frac{b}{c}}{z}\\ t_2 := \frac{9}{z} \cdot \left(x \cdot \frac{y}{c}\right)\\ \mathbf{if}\;z \leq -3.05 \cdot 10^{+50}:\\ \;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{+20}:\\ \;\;\;\;y \cdot \frac{x \cdot \frac{9}{z}}{c}\\ \mathbf{elif}\;z \leq -9000000:\\ \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\ \mathbf{elif}\;z \leq -4.1 \cdot 10^{-117}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-207}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-264}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-149}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-77}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \end{array} \]
Alternative 14
Error35.4
Cost1504
\[\begin{array}{l} t_1 := \frac{\frac{b}{c}}{z}\\ \mathbf{if}\;z \leq -3.05 \cdot 10^{+50}:\\ \;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{+20}:\\ \;\;\;\;y \cdot \frac{x \cdot \frac{9}{z}}{c}\\ \mathbf{elif}\;z \leq -9000000:\\ \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\ \mathbf{elif}\;z \leq -4.1 \cdot 10^{-117}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-207}:\\ \;\;\;\;\frac{\frac{\left(x \cdot 9\right) \cdot y}{c}}{z}\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-264}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-149}:\\ \;\;\;\;\frac{9}{z} \cdot \left(x \cdot \frac{y}{c}\right)\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-77}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \end{array} \]
Alternative 15
Error20.6
Cost1496
\[\begin{array}{l} t_1 := \frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ t_2 := \frac{\frac{b}{z} + a \cdot \left(t \cdot -4\right)}{c}\\ \mathbf{if}\;z \leq -2.6215587556864824 \cdot 10^{+183}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.754661541252868 \cdot 10^{+148}:\\ \;\;\;\;x \cdot \frac{\frac{9 \cdot y}{z}}{c}\\ \mathbf{elif}\;z \leq -3.05 \cdot 10^{+50}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-145}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-112}:\\ \;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\ \mathbf{elif}\;z \leq 7200000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 16
Error35.3
Cost1240
\[\begin{array}{l} t_1 := a \cdot \left(t \cdot \frac{-4}{c}\right)\\ t_2 := \frac{b}{z \cdot c}\\ \mathbf{if}\;b \leq -1.923920118483722 \cdot 10^{-32}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -1.417199532331217 \cdot 10^{-85}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -6.273091575444807 \cdot 10^{-137}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;b \leq 9.736079504093371 \cdot 10^{-39}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 0.0008333495870081937:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 1.4 \cdot 10^{+169}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \end{array} \]
Alternative 17
Error35.8
Cost1236
\[\begin{array}{l} t_1 := y \cdot \frac{\frac{x}{z \cdot 0.1111111111111111}}{c}\\ \mathbf{if}\;t \leq -5.337450135069775 \cdot 10^{-123}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;t \leq -2.7174824350112503 \cdot 10^{-164}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;t \leq -8.457752528330621 \cdot 10^{-209}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.8201785690403282 \cdot 10^{-298}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;t \leq 7.390785488367651 \cdot 10^{-238}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \end{array} \]
Alternative 18
Error35.3
Cost712
\[\begin{array}{l} \mathbf{if}\;a \leq -2.0692092267457244 \cdot 10^{-93}:\\ \;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\ \mathbf{elif}\;a \leq 7.434172391731231 \cdot 10^{-155}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\ \end{array} \]
Alternative 19
Error43.7
Cost452
\[\begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{-180}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \end{array} \]
Alternative 20
Error44.2
Cost452
\[\begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{-293}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 21
Error44.8
Cost320
\[\frac{\frac{b}{z}}{c} \]

Error

Reproduce

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