?

Average Error: 20.4 → 6.6
Time: 30.2s
Precision: binary64
Cost: 13780

?

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

\mathbf{elif}\;t_2 \leq -1 \cdot 10^{-248}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_2 \leq 4 \cdot 10^{+38}:\\
\;\;\;\;\frac{t_1 + t_3 \cdot \frac{1}{z}}{c}\\

\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\frac{t_1 + \frac{t_3}{z}}{c}\\

\mathbf{else}:\\
\;\;\;\;\frac{a}{\frac{c}{t \cdot -4}}\\


\end{array}

Error?

Target

Original20.4
Target14.3
Herbie6.6
\[\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 5 regimes
  2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -4.9999999999999997e304

    1. Initial program 61.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. Simplified24.9

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

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

      associate-/r* [=>]57.5

      \[ \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. Taylor expanded in a around inf 33.9

      \[\leadsto \frac{\color{blue}{-4 \cdot \left(a \cdot t\right)}}{c} \]
    4. Applied egg-rr28.3

      \[\leadsto \color{blue}{\frac{-4}{\frac{c}{a}} \cdot t} \]

    if -4.9999999999999997e304 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -9.9999999999999998e-249 or 3.99999999999999991e38 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 2.00000000000000003e306

    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.9999999999999998e-249 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 3.99999999999999991e38

    1. Initial program 16.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. Simplified1.0

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

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

      associate-/r* [=>]1.2

      \[ \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. Applied egg-rr1.1

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

    if 2.00000000000000003e306 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0

    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. Simplified25.1

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

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

      associate-/r* [=>]56.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}} \]

    if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c))

    1. Initial program 64.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. Simplified28.8

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

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

      associate-/r* [=>]64.0

      \[ \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. Taylor expanded in a around inf 28.8

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    4. Simplified18.9

      \[\leadsto \color{blue}{\frac{a}{\frac{c}{-4 \cdot t}}} \]
      Proof

      [Start]28.8

      \[ -4 \cdot \frac{a \cdot t}{c} \]

      associate-*r/ [=>]28.8

      \[ \color{blue}{\frac{-4 \cdot \left(a \cdot t\right)}{c}} \]

      *-commutative [=>]28.8

      \[ \frac{\color{blue}{\left(a \cdot t\right) \cdot -4}}{c} \]

      associate-*r* [<=]28.8

      \[ \frac{\color{blue}{a \cdot \left(t \cdot -4\right)}}{c} \]

      associate-/l* [=>]18.9

      \[ \color{blue}{\frac{a}{\frac{c}{t \cdot -4}}} \]

      *-commutative [=>]18.9

      \[ \frac{a}{\frac{c}{\color{blue}{-4 \cdot t}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification6.6

    \[\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 -5 \cdot 10^{+304}:\\ \;\;\;\;t \cdot \frac{-4}{\frac{c}{a}}\\ \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 -1 \cdot 10^{-248}:\\ \;\;\;\;\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 4 \cdot 10^{+38}:\\ \;\;\;\;\frac{a \cdot \left(t \cdot -4\right) + \mathsf{fma}\left(x, 9 \cdot y, b\right) \cdot \frac{1}{z}}{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^{+306}:\\ \;\;\;\;\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 \infty:\\ \;\;\;\;\frac{a \cdot \left(t \cdot -4\right) + \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{\frac{c}{t \cdot -4}}\\ \end{array} \]

Alternatives

Alternative 1
Error6.7
Cost13780
\[\begin{array}{l} t_1 := \frac{a \cdot \left(t \cdot -4\right) + \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}}{c}\\ t_2 := \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_2 \leq -5 \cdot 10^{+304}:\\ \;\;\;\;t \cdot \frac{-4}{\frac{c}{a}}\\ \mathbf{elif}\;t_2 \leq -5 \cdot 10^{-58}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{+38}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+306}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{\frac{c}{t \cdot -4}}\\ \end{array} \]
Alternative 2
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 -5 \cdot 10^{+304}:\\ \;\;\;\;t \cdot \frac{-4}{\frac{c}{a}}\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{-248}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 10^{-268}:\\ \;\;\;\;\frac{a \cdot \left(t \cdot -4\right) + b \cdot \frac{1}{z}}{c}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+306}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \end{array} \]
Alternative 3
Error7.8
Cost6352
\[\begin{array}{l} t_1 := \left(\left(x \cdot 9\right) \cdot y + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b\\ t_2 := \frac{t_1}{z \cdot c}\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{+304}:\\ \;\;\;\;t \cdot \frac{-4}{\frac{c}{a}}\\ \mathbf{elif}\;t_2 \leq -1 \cdot 10^{-248}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;\frac{t_1}{z} \cdot \frac{1}{c}\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+306}:\\ \;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \end{array} \]
Alternative 4
Error14.1
Cost2768
\[\begin{array}{l} t_1 := 9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\ t_2 := \left(x \cdot 9\right) \cdot y\\ t_3 := \frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq -5 \cdot 10^{-93}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{-152}:\\ \;\;\;\;\frac{\frac{b}{z} + t \cdot \left(a \cdot -4\right)}{c}\\ \mathbf{elif}\;t_2 \leq 10^{+255}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error36.0
Cost1240
\[\begin{array}{l} t_1 := \frac{\frac{b}{c}}{z}\\ t_2 := -4 \cdot \left(a \cdot \frac{t}{c}\right)\\ t_3 := -4 \cdot \frac{t \cdot a}{c}\\ \mathbf{if}\;t \leq -3.1 \cdot 10^{+101}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-14}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.1 \cdot 10^{-78}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-258}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;t \leq 1.18 \cdot 10^{-123}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-96}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error35.9
Cost1240
\[\begin{array}{l} t_1 := \frac{\frac{b}{c}}{z}\\ t_2 := -4 \cdot \frac{t \cdot a}{c}\\ \mathbf{if}\;t \leq -3.1 \cdot 10^{+101}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{elif}\;t \leq -1.85 \cdot 10^{-14}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-78}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{-257}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;t \leq 9.8 \cdot 10^{-127}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{-81}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\ \end{array} \]
Alternative 7
Error35.9
Cost1240
\[\begin{array}{l} t_1 := -4 \cdot \frac{t \cdot a}{c}\\ \mathbf{if}\;t \leq -1.9 \cdot 10^{+102}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{elif}\;t \leq -6 \cdot 10^{-14}:\\ \;\;\;\;\frac{1}{z} \cdot \frac{b}{c}\\ \mathbf{elif}\;t \leq -3.1 \cdot 10^{-78}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{-257}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{-124}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-84}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\ \end{array} \]
Alternative 8
Error34.8
Cost1240
\[\begin{array}{l} t_1 := 9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\ \mathbf{if}\;b \leq -4.6 \cdot 10^{+48}:\\ \;\;\;\;\frac{\frac{1}{z}}{\frac{c}{b}}\\ \mathbf{elif}\;b \leq -8.2 \cdot 10^{-225}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{elif}\;b \leq -1.4 \cdot 10^{-278}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.8 \cdot 10^{-195}:\\ \;\;\;\;t \cdot \frac{-4}{\frac{c}{a}}\\ \mathbf{elif}\;b \leq 4.6 \cdot 10^{-169}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{+107}:\\ \;\;\;\;\frac{a}{\frac{c}{t \cdot -4}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 9
Error34.7
Cost1240
\[\begin{array}{l} \mathbf{if}\;b \leq -1.35 \cdot 10^{+49}:\\ \;\;\;\;\frac{\frac{1}{z}}{\frac{c}{b}}\\ \mathbf{elif}\;b \leq -2.9 \cdot 10^{-223}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{elif}\;b \leq -1.4 \cdot 10^{-278}:\\ \;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\ \mathbf{elif}\;b \leq 1.75 \cdot 10^{-195}:\\ \;\;\;\;t \cdot \frac{-4}{\frac{c}{a}}\\ \mathbf{elif}\;b \leq 7.5 \cdot 10^{-168}:\\ \;\;\;\;9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\ \mathbf{elif}\;b \leq 9.5 \cdot 10^{+107}:\\ \;\;\;\;\frac{a}{\frac{c}{t \cdot -4}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 10
Error34.7
Cost1240
\[\begin{array}{l} \mathbf{if}\;b \leq -2 \cdot 10^{+43}:\\ \;\;\;\;\frac{\frac{1}{z}}{\frac{c}{b}}\\ \mathbf{elif}\;b \leq -1 \cdot 10^{-223}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{elif}\;b \leq -1.35 \cdot 10^{-278}:\\ \;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\ \mathbf{elif}\;b \leq 9.2 \cdot 10^{-203}:\\ \;\;\;\;t \cdot \frac{-4}{\frac{c}{a}}\\ \mathbf{elif}\;b \leq 2.15 \cdot 10^{-176}:\\ \;\;\;\;y \cdot \frac{9 \cdot \frac{x}{z}}{c}\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{+107}:\\ \;\;\;\;\frac{a}{\frac{c}{t \cdot -4}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 11
Error34.7
Cost1240
\[\begin{array}{l} \mathbf{if}\;b \leq -2.4 \cdot 10^{+48}:\\ \;\;\;\;\frac{\frac{1}{z}}{\frac{c}{b}}\\ \mathbf{elif}\;b \leq -4.3 \cdot 10^{-224}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{elif}\;b \leq -7.5 \cdot 10^{-280}:\\ \;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\ \mathbf{elif}\;b \leq 4.8 \cdot 10^{-197}:\\ \;\;\;\;t \cdot \frac{-4}{\frac{c}{a}}\\ \mathbf{elif}\;b \leq 9.2 \cdot 10^{-170}:\\ \;\;\;\;\frac{9}{\frac{c \cdot \frac{z}{x}}{y}}\\ \mathbf{elif}\;b \leq 4.5 \cdot 10^{+107}:\\ \;\;\;\;\frac{a}{\frac{c}{t \cdot -4}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 12
Error18.7
Cost1096
\[\begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{-8}:\\ \;\;\;\;\frac{\frac{b}{z} + t \cdot \left(a \cdot -4\right)}{c}\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+20}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{a \cdot \left(t \cdot -4\right) + b \cdot \frac{1}{z}}{c}\\ \end{array} \]
Alternative 13
Error18.8
Cost969
\[\begin{array}{l} \mathbf{if}\;z \leq -1.26 \cdot 10^{-10} \lor \neg \left(z \leq 2.35 \cdot 10^{+20}\right):\\ \;\;\;\;\frac{\frac{b}{z} + t \cdot \left(a \cdot -4\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \end{array} \]
Alternative 14
Error26.1
Cost968
\[\begin{array}{l} \mathbf{if}\;z \leq -16.5:\\ \;\;\;\;a \cdot \frac{t}{c \cdot -0.25}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+83}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \end{array} \]
Alternative 15
Error34.4
Cost712
\[\begin{array}{l} \mathbf{if}\;b \leq -1.6 \cdot 10^{+36}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;b \leq 4.35 \cdot 10^{+108}:\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 16
Error43.7
Cost585
\[\begin{array}{l} \mathbf{if}\;t \leq -8.2 \cdot 10^{-38} \lor \neg \left(t \leq -2.6 \cdot 10^{-244}\right):\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \end{array} \]
Alternative 17
Error43.7
Cost320
\[\frac{b}{z \cdot c} \]
Alternative 18
Error43.7
Cost320
\[\frac{\frac{b}{c}}{z} \]

Error

Reproduce?

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