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

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

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+52}:\\
\;\;\;\;\frac{t_2 + \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}}{c}\\

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

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}

Error

Target

Original20.7
Target14.6
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 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 9.9999999999999994e304 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c))

    1. Initial program 63.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. Simplified27.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]63.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* [=>]59.9

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

      +-commutative [=>]59.9

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

      associate-+r- [=>]59.9

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

      div-sub [=>]59.9

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

      sub-neg [=>]59.9

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

      +-commutative [=>]59.9

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

      *-commutative [=>]59.9

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

      associate-*l* [=>]59.7

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

      associate-*r* [=>]47.4

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

      associate-*l/ [<=]38.3

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

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

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

      associate-/l* [=>]27.8

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

      *-inverses [=>]27.8

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

      /-rgt-identity [=>]27.8

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

      *-commutative [=>]27.8

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

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

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

      metadata-eval [=>]27.8

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

      +-commutative [=>]27.8

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

      associate-*l* [=>]27.8

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

      fma-def [=>]27.8

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

      \[\leadsto \frac{a \cdot \left(t \cdot -4\right) + \frac{\color{blue}{x \cdot \left(9 \cdot y\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)) < -4e14 or 5e52 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 9.9999999999999994e304

    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 -4e14 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 5e52

    1. Initial program 12.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. Simplified1.2

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

      associate-/r* [=>]1.4

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

      +-commutative [=>]1.4

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

      associate-+r- [=>]1.4

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

      div-sub [=>]1.4

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

      sub-neg [=>]1.4

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

      +-commutative [=>]1.4

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

      *-commutative [=>]1.4

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

      associate-*l* [=>]1.4

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

      associate-*r* [=>]6.3

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

      associate-*l/ [<=]6.3

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

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

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

      associate-/l* [=>]1.2

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

      *-inverses [=>]1.2

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

      /-rgt-identity [=>]1.2

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

      *-commutative [=>]1.2

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

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

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

      metadata-eval [=>]1.2

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

      +-commutative [=>]1.2

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

      associate-*l* [=>]1.2

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

      fma-def [=>]1.2

      \[ \frac{a \cdot \left(t \cdot -4\right) + \frac{\color{blue}{\mathsf{fma}\left(x, 9 \cdot y, b\right)}}{z}}{c} \]
  3. Recombined 3 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{a \cdot \left(t \cdot -4\right) + \frac{b + x \cdot \left(9 \cdot y\right)}{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 -4 \cdot 10^{+14}:\\ \;\;\;\;\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^{+52}:\\ \;\;\;\;\frac{a \cdot \left(t \cdot -4\right) + \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{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 10^{+305}:\\ \;\;\;\;\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{a \cdot \left(t \cdot -4\right) + \frac{b + x \cdot \left(9 \cdot y\right)}{z}}{c}\\ \end{array} \]

Alternatives

Alternative 1
Error7.7
Cost6354
\[\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 \lor \neg \left(t_1 \leq -4 \cdot 10^{-21} \lor \neg \left(t_1 \leq 5 \cdot 10^{+52}\right) \land t_1 \leq 10^{+305}\right):\\ \;\;\;\;\frac{a \cdot \left(t \cdot -4\right) + \frac{b + x \cdot \left(9 \cdot y\right)}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error14.1
Cost1616
\[\begin{array}{l} t_1 := 9 \cdot \left(x \cdot y\right)\\ t_2 := a \cdot \left(t \cdot -4\right)\\ t_3 := \frac{t_2 + \frac{b + x \cdot \left(9 \cdot y\right)}{z}}{c}\\ \mathbf{if}\;z \leq -3.1 \cdot 10^{-131}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{-235}:\\ \;\;\;\;\frac{b + t_1}{z \cdot c}\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-275}:\\ \;\;\;\;\frac{t_2 + \frac{t_1}{z}}{c}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-69}:\\ \;\;\;\;\frac{-4 \cdot \frac{a \cdot \left(z \cdot t\right)}{c} + \frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 3
Error25.9
Cost1492
\[\begin{array}{l} t_1 := \frac{\frac{b}{z} + -4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{if}\;y \leq -7.8 \cdot 10^{-34}:\\ \;\;\;\;\frac{9}{\frac{c}{x} \cdot \frac{z}{y}}\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{+24}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 8.4 \cdot 10^{+72}:\\ \;\;\;\;\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{z}}{c}\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{+158}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+271}:\\ \;\;\;\;\frac{\frac{b}{z} + 9 \cdot \frac{y}{\frac{z}{x}}}{c}\\ \mathbf{else}:\\ \;\;\;\;9 \cdot \frac{y}{\frac{z}{\frac{x}{c}}}\\ \end{array} \]
Alternative 4
Error14.6
Cost1484
\[\begin{array}{l} t_1 := a \cdot \left(z \cdot t\right)\\ t_2 := \frac{a \cdot \left(t \cdot -4\right) + \frac{b + x \cdot \left(9 \cdot y\right)}{z}}{c}\\ \mathbf{if}\;z \leq -1.3 \cdot 10^{-141}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-230}:\\ \;\;\;\;\frac{9 \cdot \left(x \cdot y\right) + -4 \cdot t_1}{z \cdot c}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-70}:\\ \;\;\;\;\frac{-4 \cdot \frac{t_1}{c} + \frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error9.7
Cost1481
\[\begin{array}{l} t_1 := x \cdot \left(9 \cdot y\right)\\ \mathbf{if}\;z \leq -6.6 \cdot 10^{-17} \lor \neg \left(z \leq 9.5 \cdot 10^{-74}\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 6
Error35.6
Cost1372
\[\begin{array}{l} t_1 := 9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\ \mathbf{if}\;a \leq -6.5 \cdot 10^{-157}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \mathbf{elif}\;a \leq 6.9 \cdot 10^{-171}:\\ \;\;\;\;\frac{1}{c \cdot \frac{z}{b}}\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{-135}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-93}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;a \leq 4000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+72}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{+114}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \end{array} \]
Alternative 7
Error21.9
Cost1364
\[\begin{array}{l} t_1 := \frac{\frac{b}{z} + -4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{if}\;z \leq -6.5 \cdot 10^{+57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -9.6 \cdot 10^{-234}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-50}:\\ \;\;\;\;\frac{-4 \cdot \frac{a \cdot \left(z \cdot t\right)}{c} + \frac{b}{c}}{z}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+68}:\\ \;\;\;\;\frac{\frac{b}{z} + 9 \cdot \frac{y}{\frac{z}{x}}}{c}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{+85}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error19.7
Cost1233
\[\begin{array}{l} t_1 := \frac{\frac{b}{z} + -4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{if}\;z \leq -2.5 \cdot 10^{+54}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-119}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-78} \lor \neg \left(z \leq 9.5 \cdot 10^{-5}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c}\\ \end{array} \]
Alternative 9
Error35.2
Cost976
\[\begin{array}{l} \mathbf{if}\;b \leq -1.6 \cdot 10^{+19}:\\ \;\;\;\;b \cdot \frac{\frac{1}{z}}{c}\\ \mathbf{elif}\;b \leq -5.2 \cdot 10^{-241}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;b \leq 2.15 \cdot 10^{-238}:\\ \;\;\;\;9 \cdot \frac{y}{\frac{z}{\frac{x}{c}}}\\ \mathbf{elif}\;b \leq 8.5 \cdot 10^{-12}:\\ \;\;\;\;\left(t \cdot a\right) \cdot \frac{-4}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 10
Error35.2
Cost976
\[\begin{array}{l} \mathbf{if}\;b \leq -2.8 \cdot 10^{+20}:\\ \;\;\;\;b \cdot \frac{\frac{1}{c}}{z}\\ \mathbf{elif}\;b \leq -2.6 \cdot 10^{-241}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{-238}:\\ \;\;\;\;9 \cdot \frac{y}{\frac{z}{\frac{x}{c}}}\\ \mathbf{elif}\;b \leq 6.2 \cdot 10^{-19}:\\ \;\;\;\;\left(t \cdot a\right) \cdot \frac{-4}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 11
Error27.0
Cost976
\[\begin{array}{l} \mathbf{if}\;a \leq -3.9 \cdot 10^{-73}:\\ \;\;\;\;t \cdot \frac{a \cdot -4}{c}\\ \mathbf{elif}\;a \leq 102000000000:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{+76}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+114}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \end{array} \]
Alternative 12
Error34.1
Cost713
\[\begin{array}{l} \mathbf{if}\;b \leq -1.9 \cdot 10^{+22} \lor \neg \left(b \leq 9.5 \cdot 10^{-14}\right):\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \end{array} \]
Alternative 13
Error34.2
Cost712
\[\begin{array}{l} \mathbf{if}\;b \leq -3.6 \cdot 10^{+19}:\\ \;\;\;\;b \cdot \frac{\frac{1}{z}}{c}\\ \mathbf{elif}\;b \leq 2.8 \cdot 10^{-17}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 14
Error43.5
Cost320
\[\frac{b}{z \cdot c} \]

Error

Reproduce

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