Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J

?

Percentage Accurate: 78.3% → 91.4%
Time: 18.1s
Precision: binary64
Cost: 20360

?

\[ \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 := \mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right)\\ \mathbf{if}\;z \leq -9.5 \cdot 10^{-62}:\\ \;\;\;\;\frac{t_1}{c}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+27}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, \mathsf{fma}\left(a, t \cdot \left(z \cdot -4\right), b\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{c}{t_1}\right)}^{-1}\\ \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 (fma t (* a -4.0) (/ (fma x (* 9.0 y) b) z))))
   (if (<= z -9.5e-62)
     (/ t_1 c)
     (if (<= z 3e+27)
       (/ (fma x (* 9.0 y) (fma a (* t (* z -4.0)) b)) (* z c))
       (pow (/ c t_1) -1.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 = fma(t, (a * -4.0), (fma(x, (9.0 * y), b) / z));
	double tmp;
	if (z <= -9.5e-62) {
		tmp = t_1 / c;
	} else if (z <= 3e+27) {
		tmp = fma(x, (9.0 * y), fma(a, (t * (z * -4.0)), b)) / (z * c);
	} else {
		tmp = pow((c / t_1), -1.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 = fma(t, Float64(a * -4.0), Float64(fma(x, Float64(9.0 * y), b) / z))
	tmp = 0.0
	if (z <= -9.5e-62)
		tmp = Float64(t_1 / c);
	elseif (z <= 3e+27)
		tmp = Float64(fma(x, Float64(9.0 * y), fma(a, Float64(t * Float64(z * -4.0)), b)) / Float64(z * c));
	else
		tmp = Float64(c / t_1) ^ -1.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[(t * N[(a * -4.0), $MachinePrecision] + N[(N[(x * N[(9.0 * y), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.5e-62], N[(t$95$1 / c), $MachinePrecision], If[LessEqual[z, 3e+27], N[(N[(x * N[(9.0 * y), $MachinePrecision] + N[(a * N[(t * N[(z * -4.0), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[Power[N[(c / t$95$1), $MachinePrecision], -1.0], $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 := \mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right)\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{-62}:\\
\;\;\;\;\frac{t_1}{c}\\

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

\mathbf{else}:\\
\;\;\;\;{\left(\frac{c}{t_1}\right)}^{-1}\\


\end{array}

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Herbie found 19 alternatives:

AlternativeAccuracySpeedup

Accuracy vs Speed

The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Bogosity?

Bogosity

Target

Original78.3%
Target80.2%
Herbie91.4%
\[\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 z < -9.49999999999999951e-62

    1. Initial program 71.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. Simplified88.7%

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

      [Start]71.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* [=>]75.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}} \]

    if -9.49999999999999951e-62 < z < 2.99999999999999976e27

    1. Initial program 96.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} \]
    2. Simplified96.8%

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

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

      associate-+l- [=>]96.8%

      \[ \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* [=>]96.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 [=>]96.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} \]

      sub-neg [=>]96.8%

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

      distribute-neg-in [=>]96.8%

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

      *-commutative [=>]96.8%

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

      distribute-rgt-neg-in [=>]96.8%

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

      fma-def [=>]96.8%

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

      *-commutative [=>]96.8%

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

      distribute-rgt-neg-in [=>]96.8%

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

      distribute-rgt-neg-in [=>]96.8%

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

      metadata-eval [=>]96.8%

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

      remove-double-neg [=>]96.8%

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

    if 2.99999999999999976e27 < z

    1. Initial program 61.7%

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

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

      [Start]61.7%

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

      associate-/r* [=>]66.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. Applied egg-rr83.9%

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

      [Start]83.8%

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

      clear-num [=>]83.9%

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

      fma-udef [=>]83.9%

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

      +-commutative [<=]83.9%

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

      inv-pow [=>]83.9%

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

      +-commutative [=>]83.9%

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

      fma-udef [<=]83.9%

      \[ {\left(\frac{c}{\color{blue}{\mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right)}}\right)}^{-1} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification91.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{-62}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right)}{c}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+27}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, \mathsf{fma}\left(a, t \cdot \left(z \cdot -4\right), b\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{c}{\mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right)}\right)}^{-1}\\ \end{array} \]

Alternatives

Alternative 1
Accuracy91.4%
Cost20360
\[\begin{array}{l} t_1 := \mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right)\\ \mathbf{if}\;z \leq -9.5 \cdot 10^{-62}:\\ \;\;\;\;\frac{t_1}{c}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+27}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, \mathsf{fma}\left(a, t \cdot \left(z \cdot -4\right), b\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{c}{t_1}\right)}^{-1}\\ \end{array} \]
Alternative 2
Accuracy91.5%
Cost14088
\[\begin{array}{l} t_1 := \mathsf{fma}\left(x, 9 \cdot y, b\right)\\ \mathbf{if}\;z \leq -1 \cdot 10^{-61}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t, a \cdot -4, \frac{t_1}{z}\right)}{c}\\ \mathbf{elif}\;z \leq 25000000000:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, \mathsf{fma}\left(a, t \cdot \left(z \cdot -4\right), b\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(\frac{z}{t_1}\right)}^{-1} + t \cdot \left(a \cdot -4\right)}{c}\\ \end{array} \]
Alternative 3
Accuracy91.5%
Cost14024
\[\begin{array}{l} t_1 := \mathsf{fma}\left(x, 9 \cdot y, b\right)\\ \mathbf{if}\;z \leq -8.5 \cdot 10^{-62}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t, a \cdot -4, \frac{t_1}{z}\right)}{c}\\ \mathbf{elif}\;z \leq 22500000000:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, \mathsf{fma}\left(a, t \cdot \left(z \cdot -4\right), b\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot \left(a \cdot -4\right) + t_1 \cdot \frac{1}{z}}{c}\\ \end{array} \]
Alternative 4
Accuracy90.7%
Cost13764
\[\begin{array}{l} t_1 := \mathsf{fma}\left(x, 9 \cdot y, b\right)\\ \mathbf{if}\;z \leq -4 \cdot 10^{-54}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t, a \cdot -4, \frac{t_1}{z}\right)}{c}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+93}:\\ \;\;\;\;{\left(\frac{z \cdot c}{b + \left(x \cdot \left(9 \cdot y\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}\right)}^{-1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot \left(a \cdot -4\right) + t_1 \cdot \frac{1}{z}}{c}\\ \end{array} \]
Alternative 5
Accuracy90.7%
Cost7944
\[\begin{array}{l} t_1 := t \cdot \left(a \cdot -4\right)\\ t_2 := \mathsf{fma}\left(x, 9 \cdot y, b\right)\\ \mathbf{if}\;z \leq -1 \cdot 10^{-52}:\\ \;\;\;\;\frac{\frac{t_2}{z} + t_1}{c}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+93}:\\ \;\;\;\;{\left(\frac{z \cdot c}{b + \left(x \cdot \left(9 \cdot y\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}\right)}^{-1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_1 + t_2 \cdot \frac{1}{z}}{c}\\ \end{array} \]
Alternative 6
Accuracy91.1%
Cost7752
\[\begin{array}{l} t_1 := t \cdot \left(a \cdot -4\right)\\ t_2 := \mathsf{fma}\left(x, 9 \cdot y, b\right)\\ \mathbf{if}\;z \leq -3 \cdot 10^{-60}:\\ \;\;\;\;\frac{\frac{t_2}{z} + t_1}{c}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-96}:\\ \;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_1 + t_2 \cdot \frac{1}{z}}{c}\\ \end{array} \]
Alternative 7
Accuracy91.2%
Cost7625
\[\begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{-60} \lor \neg \left(z \leq 1.25 \cdot 10^{-98}\right):\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z} + t \cdot \left(a \cdot -4\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\ \end{array} \]
Alternative 8
Accuracy68.8%
Cost1744
\[\begin{array}{l} t_1 := 9 \cdot \frac{\frac{y}{\frac{c}{x}}}{z}\\ \mathbf{if}\;x \cdot 9 \leq -1 \cdot 10^{+184}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot 9 \leq -5 \cdot 10^{+38}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}} + \frac{b}{z \cdot c}\\ \mathbf{elif}\;x \cdot 9 \leq -2 \cdot 10^{-21}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{elif}\;x \cdot 9 \leq 10^{-61}:\\ \;\;\;\;\frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Accuracy73.2%
Cost1620
\[\begin{array}{l} t_1 := t \cdot \left(a \cdot -4\right)\\ t_2 := \frac{t_1 + 9 \cdot \frac{x \cdot y}{z}}{c}\\ t_3 := -4 \cdot \frac{a}{\frac{c}{t}} + \frac{b}{z \cdot c}\\ \mathbf{if}\;y \leq -4.2 \cdot 10^{+37}:\\ \;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-19}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-96}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-74}:\\ \;\;\;\;\frac{t_1 + \frac{b}{z}}{c}\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{+99}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Accuracy83.1%
Cost1481
\[\begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{+122} \lor \neg \left(z \leq 1.62 \cdot 10^{+124}\right):\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}} + \frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\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}\\ \end{array} \]
Alternative 11
Accuracy84.3%
Cost1481
\[\begin{array}{l} \mathbf{if}\;z \leq -1.02 \cdot 10^{+124} \lor \neg \left(z \leq 2.9 \cdot 10^{+122}\right):\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}} + \frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\ \end{array} \]
Alternative 12
Accuracy49.6%
Cost1108
\[\begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+76}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;t \leq -5.6 \cdot 10^{-132}:\\ \;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-208}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-225}:\\ \;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\ \mathbf{elif}\;t \leq 10^{-98}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{a}{\frac{c}{-4}}\\ \end{array} \]
Alternative 13
Accuracy49.7%
Cost1108
\[\begin{array}{l} \mathbf{if}\;t \leq -8.6 \cdot 10^{+76}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;t \leq -9.8 \cdot 10^{-169}:\\ \;\;\;\;9 \cdot \frac{\frac{y}{\frac{c}{x}}}{z}\\ \mathbf{elif}\;t \leq -8 \cdot 10^{-209}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-223}:\\ \;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\ \mathbf{elif}\;t \leq 9.6 \cdot 10^{-99}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{a}{\frac{c}{-4}}\\ \end{array} \]
Alternative 14
Accuracy64.1%
Cost968
\[\begin{array}{l} \mathbf{if}\;t \leq -4.7 \cdot 10^{+120}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;t \leq 4.7 \cdot 10^{-69}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{a}{\frac{c}{-4}}\\ \end{array} \]
Alternative 15
Accuracy71.6%
Cost968
\[\begin{array}{l} \mathbf{if}\;y \leq -4.3 \cdot 10^{-67}:\\ \;\;\;\;9 \cdot \frac{\frac{y}{\frac{c}{x}}}{z}\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+75}:\\ \;\;\;\;\frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \end{array} \]
Alternative 16
Accuracy49.4%
Cost844
\[\begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+76}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-129}:\\ \;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-103}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{a}{\frac{c}{-4}}\\ \end{array} \]
Alternative 17
Accuracy50.5%
Cost713
\[\begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{-71} \lor \neg \left(t \leq 2.4 \cdot 10^{-31}\right):\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 18
Accuracy50.0%
Cost712
\[\begin{array}{l} \mathbf{if}\;t \leq -3.2 \cdot 10^{-71}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-98}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{a}{\frac{c}{-4}}\\ \end{array} \]
Alternative 19
Accuracy34.7%
Cost320
\[\frac{b}{z \cdot c} \]

Reproduce?

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