?

Average Error: 20.6 → 2.9
Time: 26.2s
Precision: binary64
Cost: 12880

?

\[ \begin{array}{c}[x, y] = \mathsf{sort}([x, y])\\ \end{array} \]
\[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
\[\begin{array}{l} t_1 := \frac{\left(y \cdot \left(x \cdot 9\right) + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c}\\ t_2 := \frac{\frac{b}{z}}{c} + \mathsf{fma}\left(-4, t \cdot \frac{a}{c}, 9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\right)\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq -5 \cdot 10^{-290}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{-252}:\\ \;\;\;\;\frac{a \cdot \left(t \cdot -4\right) + \frac{b + x \cdot \left(9 \cdot y\right)}{z}}{c}\\ \mathbf{elif}\;t_1 \leq 10^{+301}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (/ (+ (+ (* y (* x 9.0)) (* a (* t (* z -4.0)))) b) (* z c)))
        (t_2
         (+
          (/ (/ b z) c)
          (fma -4.0 (* t (/ a c)) (* 9.0 (* (/ x c) (/ y z)))))))
   (if (<= t_1 (- INFINITY))
     t_2
     (if (<= t_1 -5e-290)
       t_1
       (if (<= t_1 4e-252)
         (/ (+ (* a (* t -4.0)) (/ (+ b (* x (* 9.0 y))) z)) c)
         (if (<= t_1 1e+301) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (((y * (x * 9.0)) + (a * (t * (z * -4.0)))) + b) / (z * c);
	double t_2 = ((b / z) / c) + fma(-4.0, (t * (a / c)), (9.0 * ((x / c) * (y / z))));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = t_2;
	} else if (t_1 <= -5e-290) {
		tmp = t_1;
	} else if (t_1 <= 4e-252) {
		tmp = ((a * (t * -4.0)) + ((b + (x * (9.0 * y))) / z)) / c;
	} else if (t_1 <= 1e+301) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c)
	return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c))
end
function code(x, y, z, t, a, b, c)
	t_1 = Float64(Float64(Float64(Float64(y * Float64(x * 9.0)) + Float64(a * Float64(t * Float64(z * -4.0)))) + b) / Float64(z * c))
	t_2 = Float64(Float64(Float64(b / z) / c) + fma(-4.0, Float64(t * Float64(a / c)), Float64(9.0 * Float64(Float64(x / c) * Float64(y / z)))))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = t_2;
	elseif (t_1 <= -5e-290)
		tmp = t_1;
	elseif (t_1 <= 4e-252)
		tmp = Float64(Float64(Float64(a * Float64(t * -4.0)) + Float64(Float64(b + Float64(x * Float64(9.0 * y))) / z)) / c);
	elseif (t_1 <= 1e+301)
		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[(y * N[(x * 9.0), $MachinePrecision]), $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[(N[(b / z), $MachinePrecision] / c), $MachinePrecision] + N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -5e-290], t$95$1, If[LessEqual[t$95$1, 4e-252], N[(N[(N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision] + N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$1, 1e+301], t$95$1, t$95$2]]]]]]
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\begin{array}{l}
t_1 := \frac{\left(y \cdot \left(x \cdot 9\right) + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c}\\
t_2 := \frac{\frac{b}{z}}{c} + \mathsf{fma}\left(-4, t \cdot \frac{a}{c}, 9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\right)\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-290}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t_1 \leq 10^{+301}:\\
\;\;\;\;t_1\\

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


\end{array}

Error?

Target

Original20.6
Target14.3
Herbie2.9
\[\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 1.00000000000000005e301 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c))

    1. Initial program 62.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. Simplified52.9

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

      [Start]62.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-+l- [=>]62.9

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

      associate-*l* [=>]62.8

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

      fma-neg [=>]62.8

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

      neg-sub0 [=>]62.8

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

      associate-+l- [<=]62.8

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

      neg-sub0 [<=]62.8

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

      distribute-lft-neg-in [=>]62.8

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

      *-commutative [=>]62.8

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

      distribute-lft-neg-in [=>]62.8

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

      associate-*r* [=>]53.0

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

      *-commutative [=>]53.0

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

      fma-def [=>]53.0

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

      distribute-rgt-neg-in [<=]53.0

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

      associate-*r* [=>]52.9

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

      distribute-rgt-neg-in [=>]52.9

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

      *-commutative [=>]52.9

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

      metadata-eval [=>]52.9

      \[ \frac{\mathsf{fma}\left(x, 9 \cdot y, \mathsf{fma}\left(t, \left(z \cdot a\right) \cdot \color{blue}{-4}, b\right)\right)}{z \cdot c} \]
    3. Taylor expanded in x around 0 29.7

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

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

      [Start]29.7

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

      associate-/l/ [<=]29.3

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

      fma-def [=>]29.3

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

      associate-/l* [=>]25.3

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

      associate-/r/ [=>]24.3

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

      *-commutative [=>]24.3

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

      times-frac [=>]9.5

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

    if -inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -5.0000000000000001e-290 or 3.99999999999999977e-252 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 1.00000000000000005e301

    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 -5.0000000000000001e-290 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 3.99999999999999977e-252

    1. Initial program 34.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} \]
    2. Simplified0.6

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

      associate-/r* [=>]0.8

      \[ \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-rr0.6

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

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

Alternatives

Alternative 1
Error7.1
Cost6352
\[\begin{array}{l} t_1 := y \cdot \left(x \cdot 9\right)\\ t_2 := \frac{\left(t_1 + a \cdot \left(t \cdot \left(z \cdot -4\right)\right)\right) + b}{z \cdot c}\\ t_3 := a \cdot \left(t \cdot -4\right)\\ \mathbf{if}\;t_2 \leq -2 \cdot 10^{+307}:\\ \;\;\;\;\frac{t_3 + \frac{t_1}{z}}{c}\\ \mathbf{elif}\;t_2 \leq -5 \cdot 10^{-290}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{-252}:\\ \;\;\;\;\frac{t_3 + \frac{b + x \cdot \left(9 \cdot y\right)}{z}}{c}\\ \mathbf{elif}\;t_2 \leq 10^{+301}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \end{array} \]
Alternative 2
Error35.0
Cost1504
\[\begin{array}{l} t_1 := -4 \cdot \frac{a}{\frac{c}{t}}\\ t_2 := 9 \cdot \frac{y}{\frac{c}{\frac{x}{z}}}\\ \mathbf{if}\;z \leq -4.3 \cdot 10^{+86}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -920000:\\ \;\;\;\;\frac{-1}{\frac{z \cdot \left(-c\right)}{b}}\\ \mathbf{elif}\;z \leq -1.95:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-63}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-113}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-42}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-25}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 54:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\ \end{array} \]
Alternative 3
Error35.0
Cost1504
\[\begin{array}{l} t_1 := -4 \cdot \frac{a}{\frac{c}{t}}\\ t_2 := 9 \cdot \frac{y}{\frac{c}{\frac{x}{z}}}\\ \mathbf{if}\;z \leq -1 \cdot 10^{+86}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1000000:\\ \;\;\;\;\frac{-1}{\frac{z \cdot \left(-c\right)}{b}}\\ \mathbf{elif}\;z \leq -2.55:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-63}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{-113}:\\ \;\;\;\;9 \cdot \frac{y}{\frac{z}{\frac{x}{c}}}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-43}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-25}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 39:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\ \end{array} \]
Alternative 4
Error34.9
Cost1504
\[\begin{array}{l} t_1 := -4 \cdot \frac{a}{\frac{c}{t}}\\ t_2 := 9 \cdot \frac{y}{\frac{c}{\frac{x}{z}}}\\ \mathbf{if}\;z \leq -1.55 \cdot 10^{+86}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1200000:\\ \;\;\;\;\frac{-1}{\frac{z \cdot \left(-c\right)}{b}}\\ \mathbf{elif}\;z \leq -1.42:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{-63}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.45 \cdot 10^{-113}:\\ \;\;\;\;9 \cdot \frac{\frac{y}{\frac{c}{x}}}{z}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-42}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-25}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 54:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\ \end{array} \]
Alternative 5
Error35.1
Cost1504
\[\begin{array}{l} t_1 := -4 \cdot \frac{a}{\frac{c}{t}}\\ t_2 := 9 \cdot \frac{y}{\frac{c}{\frac{x}{z}}}\\ \mathbf{if}\;z \leq -1.25 \cdot 10^{+86}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1020000:\\ \;\;\;\;\frac{-1}{\frac{z \cdot \left(-c\right)}{b}}\\ \mathbf{elif}\;z \leq -0.122:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-63}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -8.4 \cdot 10^{-112}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{9 \cdot y}{c}\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{-46}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-25}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 19:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\ \end{array} \]
Alternative 6
Error35.6
Cost1500
\[\begin{array}{l} \mathbf{if}\;b \leq -1.65 \cdot 10^{-29}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;b \leq -1.05 \cdot 10^{-196}:\\ \;\;\;\;t \cdot \frac{-4}{\frac{c}{a}}\\ \mathbf{elif}\;b \leq 1.38 \cdot 10^{-278}:\\ \;\;\;\;9 \cdot \frac{\frac{y}{\frac{c}{x}}}{z}\\ \mathbf{elif}\;b \leq 9.5 \cdot 10^{-160}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \mathbf{elif}\;b \leq 8.5 \cdot 10^{-114}:\\ \;\;\;\;\frac{9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{elif}\;b \leq 2.1 \cdot 10^{+23}:\\ \;\;\;\;\left(t \cdot a\right) \cdot \frac{-4}{c}\\ \mathbf{elif}\;b \leq 9.8 \cdot 10^{+87}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{9 \cdot y}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \end{array} \]
Alternative 7
Error35.4
Cost1500
\[\begin{array}{l} \mathbf{if}\;b \leq -1.08 \cdot 10^{-29}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;b \leq -2.7 \cdot 10^{-196}:\\ \;\;\;\;t \cdot \frac{-4}{\frac{c}{a}}\\ \mathbf{elif}\;b \leq 6.6 \cdot 10^{-285}:\\ \;\;\;\;9 \cdot \frac{\frac{y}{\frac{c}{x}}}{z}\\ \mathbf{elif}\;b \leq 8.5 \cdot 10^{-160}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{-113}:\\ \;\;\;\;\frac{9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{elif}\;b \leq 2.1 \cdot 10^{+23}:\\ \;\;\;\;\left(t \cdot a\right) \cdot \frac{-4}{c}\\ \mathbf{elif}\;b \leq 9.5 \cdot 10^{+87}:\\ \;\;\;\;\frac{9 \cdot \frac{y}{c}}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \end{array} \]
Alternative 8
Error35.6
Cost1500
\[\begin{array}{l} \mathbf{if}\;b \leq -1.6 \cdot 10^{-29}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;b \leq -3.85 \cdot 10^{-196}:\\ \;\;\;\;t \cdot \frac{-4}{\frac{c}{a}}\\ \mathbf{elif}\;b \leq 9 \cdot 10^{-278}:\\ \;\;\;\;9 \cdot \frac{\frac{y}{\frac{c}{x}}}{z}\\ \mathbf{elif}\;b \leq 9 \cdot 10^{-160}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \mathbf{elif}\;b \leq 8.6 \cdot 10^{-114}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z \cdot c}{9}}\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{+23}:\\ \;\;\;\;\left(t \cdot a\right) \cdot \frac{-4}{c}\\ \mathbf{elif}\;b \leq 8.2 \cdot 10^{+87}:\\ \;\;\;\;\frac{9 \cdot \frac{y}{c}}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \end{array} \]
Alternative 9
Error9.2
Cost1481
\[\begin{array}{l} t_1 := x \cdot \left(9 \cdot y\right)\\ \mathbf{if}\;z \leq -3.5 \cdot 10^{+33} \lor \neg \left(z \leq 1.3 \cdot 10^{-30}\right):\\ \;\;\;\;\frac{a \cdot \left(t \cdot -4\right) + \frac{b + t_1}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b + \left(t_1 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\ \end{array} \]
Alternative 10
Error11.5
Cost1353
\[\begin{array}{l} t_1 := b + x \cdot \left(9 \cdot y\right)\\ \mathbf{if}\;z \leq -6.2 \cdot 10^{-53} \lor \neg \left(z \leq 1.85 \cdot 10^{-31}\right):\\ \;\;\;\;\frac{a \cdot \left(t \cdot -4\right) + \frac{t_1}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_1}{z \cdot c}\\ \end{array} \]
Alternative 11
Error34.5
Cost976
\[\begin{array}{l} t_1 := \frac{b}{z \cdot c}\\ \mathbf{if}\;b \leq -1.18 \cdot 10^{-29}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 3.3 \cdot 10^{-87}:\\ \;\;\;\;t \cdot \frac{-4}{\frac{c}{a}}\\ \mathbf{elif}\;b \leq 2 \cdot 10^{-34}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 33500000000000:\\ \;\;\;\;\left(t \cdot a\right) \cdot \frac{-4}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \end{array} \]
Alternative 12
Error18.3
Cost969
\[\begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+33} \lor \neg \left(z \leq 2.3 \cdot 10^{-31}\right):\\ \;\;\;\;\frac{\frac{b}{z} + -4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c}\\ \end{array} \]
Alternative 13
Error24.8
Cost968
\[\begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+86}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+149}:\\ \;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\ \end{array} \]
Alternative 14
Error34.5
Cost713
\[\begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+86} \lor \neg \left(z \leq 29.5\right):\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 15
Error34.3
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+86}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;z \leq 5.2:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\left(t \cdot a\right) \cdot \frac{-4}{c}\\ \end{array} \]
Alternative 16
Error43.0
Cost320
\[\frac{b}{z \cdot c} \]

Error

Reproduce?

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