?

Average Error: 20.4 → 4.8
Time: 35.2s
Precision: binary64
Cost: 17484

?

\[ \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{\frac{b}{c}}{z} + \left(\frac{x}{z} \cdot \frac{9 \cdot y}{c} + \frac{t \cdot a}{c} \cdot -4\right)\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{-234}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{-67}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right)}{c}\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{+298}:\\ \;\;\;\;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 c) z)
          (+ (* (/ x z) (/ (* 9.0 y) c)) (* (/ (* t a) c) -4.0)))))
   (if (<= t_1 (- INFINITY))
     t_2
     (if (<= t_1 -2e-234)
       t_1
       (if (<= t_1 5e-67)
         (/ (fma t (* a -4.0) (/ (fma x (* 9.0 y) b) z)) c)
         (if (<= t_1 4e+298) 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 / c) / z) + (((x / z) * ((9.0 * y) / c)) + (((t * a) / c) * -4.0));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = t_2;
	} else if (t_1 <= -2e-234) {
		tmp = t_1;
	} else if (t_1 <= 5e-67) {
		tmp = fma(t, (a * -4.0), (fma(x, (9.0 * y), b) / z)) / c;
	} else if (t_1 <= 4e+298) {
		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(b / c) / z) + Float64(Float64(Float64(x / z) * Float64(Float64(9.0 * y) / c)) + Float64(Float64(Float64(t * a) / c) * -4.0)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = t_2;
	elseif (t_1 <= -2e-234)
		tmp = t_1;
	elseif (t_1 <= 5e-67)
		tmp = Float64(fma(t, Float64(a * -4.0), Float64(fma(x, Float64(9.0 * y), b) / z)) / c);
	elseif (t_1 <= 4e+298)
		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[(N[(b / c), $MachinePrecision] / z), $MachinePrecision] + N[(N[(N[(x / z), $MachinePrecision] * N[(N[(9.0 * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -2e-234], t$95$1, If[LessEqual[t$95$1, 5e-67], 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, 4e+298], 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{\frac{b}{c}}{z} + \left(\frac{x}{z} \cdot \frac{9 \cdot y}{c} + \frac{t \cdot a}{c} \cdot -4\right)\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{-67}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right)}{c}\\

\mathbf{elif}\;t_1 \leq 4 \cdot 10^{+298}:\\
\;\;\;\;t_1\\

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


\end{array}

Error?

Target

Original20.4
Target14.3
Herbie4.8
\[\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 3.9999999999999998e298 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c))

    1. Initial program 62.3

      \[\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 30.4

      \[\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. Simplified16.5

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

      [Start]30.4

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

      associate--l+ [=>]30.4

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

      associate-/r* [=>]32.0

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

      *-commutative [<=]32.0

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

      associate-*r/ [=>]32.0

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

      associate-*r* [=>]32.0

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

      *-commutative [<=]32.0

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

      times-frac [=>]16.5

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

    if -inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -1.9999999999999999e-234 or 4.9999999999999999e-67 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 3.9999999999999998e298

    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 -1.9999999999999999e-234 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 4.9999999999999999e-67

    1. Initial program 22.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. Simplified1.4

      \[\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

      [Start]22.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} \]

      associate-/r* [=>]1.6

      \[ \color{blue}{\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}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification4.8

    \[\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{\frac{b}{c}}{z} + \left(\frac{x}{z} \cdot \frac{9 \cdot y}{c} + \frac{t \cdot a}{c} \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 -2 \cdot 10^{-234}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq 5 \cdot 10^{-67}:\\ \;\;\;\;\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 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq 4 \cdot 10^{+298}:\\ \;\;\;\;\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{\frac{b}{c}}{z} + \left(\frac{x}{z} \cdot \frac{9 \cdot y}{c} + \frac{t \cdot a}{c} \cdot -4\right)\\ \end{array} \]

Alternatives

Alternative 1
Error4.8
Cost11212
\[\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{\frac{b}{c}}{z} + \left(\frac{x}{z} \cdot \frac{9 \cdot y}{c} + \frac{t \cdot a}{c} \cdot -4\right)\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{-234}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{-67}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z} + a \cdot \left(t \cdot -4\right)}{c}\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{+298}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 2
Error4.7
Cost6608
\[\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{\frac{b}{c}}{z} + \left(\frac{x}{z} \cdot \frac{9 \cdot y}{c} + \frac{t \cdot a}{c} \cdot -4\right)\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq -5 \cdot 10^{-320}:\\ \;\;\;\;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 4 \cdot 10^{+298}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error8.3
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}\\ t_2 := a \cdot \left(t \cdot -4\right)\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{t_2 + \frac{x}{z} \cdot \left(9 \cdot y\right)}{c}\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{-234}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{\frac{b}{z} + \left(t \cdot a\right) \cdot -4}{c}\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{+260}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{t_2 + 9 \cdot \left(x \cdot \frac{y}{z}\right)}{c}\\ \end{array} \]
Alternative 4
Error7.2
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}\\ t_2 := a \cdot \left(t \cdot -4\right)\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{t_2 + \frac{x}{z} \cdot \left(9 \cdot y\right)}{c}\\ \mathbf{elif}\;t_1 \leq -5 \cdot 10^{-320}:\\ \;\;\;\;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 4 \cdot 10^{+260}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{t_2 + 9 \cdot \left(x \cdot \frac{y}{z}\right)}{c}\\ \end{array} \]
Alternative 5
Error17.0
Cost3416
\[\begin{array}{l} t_1 := a \cdot \left(t \cdot -4\right)\\ t_2 := \left(x \cdot 9\right) \cdot y\\ t_3 := \frac{\frac{b}{z} + \left(t \cdot a\right) \cdot -4}{c}\\ t_4 := \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{if}\;t_2 \leq -1 \cdot 10^{+149}:\\ \;\;\;\;\frac{t_1 + 9 \cdot \left(x \cdot \frac{y}{z}\right)}{c}\\ \mathbf{elif}\;t_2 \leq -1 \cdot 10^{+34}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t_2 \leq -2 \cdot 10^{-48}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq -4 \cdot 10^{-283}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t_2 \leq 10^{+33}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 10^{+236}:\\ \;\;\;\;\frac{t_1 + t_2 \cdot \frac{1}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right) + \frac{b}{z \cdot c}\\ \end{array} \]
Alternative 6
Error22.7
Cost2280
\[\begin{array}{l} t_1 := \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{z}}{c}\\ t_2 := \frac{b + -4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{z \cdot c}\\ t_3 := 9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right) + \frac{b}{z \cdot c}\\ t_4 := \frac{\frac{b}{z} + \left(t \cdot a\right) \cdot -4}{c}\\ \mathbf{if}\;z \leq -3.5 \cdot 10^{+46}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq -2.25 \cdot 10^{-7}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -9.6 \cdot 10^{-113}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.45 \cdot 10^{-146}:\\ \;\;\;\;9 \cdot \frac{y}{\frac{z \cdot c}{x}}\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-192}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-156}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-52}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-35}:\\ \;\;\;\;\frac{t \cdot a}{c} \cdot -4\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-5}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+57}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 7
Error22.5
Cost2149
\[\begin{array}{l} t_1 := \frac{b + -4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{z \cdot c}\\ t_2 := \frac{a \cdot \left(t \cdot -4\right) + 9 \cdot \left(x \cdot \frac{y}{z}\right)}{c}\\ t_3 := 9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right) + \frac{b}{z \cdot c}\\ \mathbf{if}\;z \leq -1.4 \cdot 10^{+59}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-12}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-55}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-98}:\\ \;\;\;\;\frac{\frac{b}{z} + \left(t \cdot a\right) \cdot -4}{c}\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-230}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-154}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.95 \cdot 10^{-74} \lor \neg \left(z \leq 3.6 \cdot 10^{-32}\right) \land z \leq 1.15 \cdot 10^{+64}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error37.3
Cost1896
\[\begin{array}{l} t_1 := \frac{t \cdot a}{c} \cdot -4\\ t_2 := 9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c}\right)\\ t_3 := \frac{b}{z \cdot c}\\ \mathbf{if}\;y \leq -3.3 \cdot 10^{-100}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.02 \cdot 10^{-161}:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-183}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -8 \cdot 10^{-250}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-125}:\\ \;\;\;\;\frac{-b}{\frac{c}{\frac{-1}{z}}}\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-91}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.7 \cdot 10^{-31}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+80}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+110}:\\ \;\;\;\;9 \cdot \frac{y}{\frac{z \cdot c}{x}}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+157}:\\ \;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error36.5
Cost1896
\[\begin{array}{l} t_1 := \frac{t \cdot a}{c} \cdot -4\\ t_2 := \frac{b}{z \cdot c}\\ \mathbf{if}\;y \leq -1.02 \cdot 10^{-100}:\\ \;\;\;\;9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c}\right)\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{-154}:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{-185}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -2.3 \cdot 10^{-250}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-125}:\\ \;\;\;\;\frac{-b}{\frac{c}{\frac{-1}{z}}}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-91}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{-34}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+82}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{+109}:\\ \;\;\;\;9 \cdot \frac{y}{\frac{z \cdot c}{x}}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+158}:\\ \;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{\frac{\frac{x}{z}}{0.1111111111111111}}{c}\\ \end{array} \]
Alternative 10
Error36.5
Cost1896
\[\begin{array}{l} t_1 := \frac{t \cdot a}{c} \cdot -4\\ t_2 := \frac{b}{z \cdot c}\\ \mathbf{if}\;y \leq -3.3 \cdot 10^{-100}:\\ \;\;\;\;9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c}\right)\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-159}:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{-186}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -2.25 \cdot 10^{-250}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{-125}:\\ \;\;\;\;\frac{-b}{\frac{c}{\frac{-1}{z}}}\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{-91}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.95 \cdot 10^{-33}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{+80}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{+110}:\\ \;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{z}}{c}\right)\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+157}:\\ \;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{\frac{\frac{x}{z}}{0.1111111111111111}}{c}\\ \end{array} \]
Alternative 11
Error35.7
Cost1500
\[\begin{array}{l} t_1 := \frac{\frac{b}{c}}{z}\\ t_2 := a \cdot \left(t \cdot \frac{-4}{c}\right)\\ t_3 := 9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c}\right)\\ \mathbf{if}\;a \leq -3.2 \cdot 10^{-120}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-209}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-36}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-7}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+15}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{+78}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.95 \cdot 10^{+110}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 12
Error24.3
Cost1364
\[\begin{array}{l} t_1 := \frac{\frac{b}{z} + \left(t \cdot a\right) \cdot -4}{c}\\ \mathbf{if}\;a \leq -7 \cdot 10^{-186}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{+31}:\\ \;\;\;\;\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{z}}{c}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+87}:\\ \;\;\;\;\frac{b + -4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{z \cdot c}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+110}:\\ \;\;\;\;\frac{y}{c} \cdot \frac{x \cdot 9}{z}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+197}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\ \end{array} \]
Alternative 13
Error23.8
Cost1104
\[\begin{array}{l} \mathbf{if}\;y \leq -7.6 \cdot 10^{-78}:\\ \;\;\;\;9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c}\right)\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{+86}:\\ \;\;\;\;\frac{\frac{b}{z} + \left(t \cdot a\right) \cdot -4}{c}\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{+123}:\\ \;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{z}}{c}\right)\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{+157}:\\ \;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{\frac{\frac{x}{z}}{0.1111111111111111}}{c}\\ \end{array} \]
Alternative 14
Error22.5
Cost1100
\[\begin{array}{l} t_1 := \frac{\frac{b}{z} + \left(t \cdot a\right) \cdot -4}{c}\\ \mathbf{if}\;a \leq -1.9 \cdot 10^{-183}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{-29}:\\ \;\;\;\;\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{z}}{c}\\ \mathbf{elif}\;a \leq 6.1 \cdot 10^{+198}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\ \end{array} \]
Alternative 15
Error34.6
Cost776
\[\begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+59}:\\ \;\;\;\;\frac{t \cdot a}{c} \cdot -4\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+63}:\\ \;\;\;\;\frac{-b}{\frac{c}{\frac{-1}{z}}}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \end{array} \]
Alternative 16
Error34.5
Cost713
\[\begin{array}{l} \mathbf{if}\;z \leq -9.8 \cdot 10^{+58} \lor \neg \left(z \leq 3.3 \cdot 10^{+63}\right):\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 17
Error34.6
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{+59}:\\ \;\;\;\;\frac{t \cdot a}{c} \cdot -4\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+65}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{t}{\frac{c}{a}}\\ \end{array} \]
Alternative 18
Error43.2
Cost320
\[\frac{b}{z \cdot c} \]
Alternative 19
Error43.2
Cost320
\[\frac{\frac{b}{c}}{z} \]

Error

Reproduce?

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