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

?

Percentage Accurate: 78.9% → 91.6%
Time: 19.8s
Precision: binary64
Cost: 20360

?

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

\mathbf{elif}\;z \leq 1.46 \cdot 10^{-29}:\\
\;\;\;\;\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}:\\
\;\;\;\;\mathsf{fma}\left(t, a \cdot -4, t_1\right) \cdot {c}^{-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 23 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.9%
Target80.8%
Herbie91.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 3 regimes
  2. if z < -0.0015

    1. Initial program 66.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. Simplified87.0%

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

      [Start]66.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* [=>]75.3%

      \[ \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 -0.0015 < z < 1.4600000000000001e-29

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

    if 1.4600000000000001e-29 < z

    1. Initial program 66.5%

      \[\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. Simplified89.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]66.5%

      \[ \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.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. Applied egg-rr89.8%

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

      [Start]89.7%

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

      div-inv [=>]89.8%

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

      inv-pow [=>]89.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.0015:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z} + t \cdot \left(a \cdot -4\right)}{c}\\ \mathbf{elif}\;z \leq 1.46 \cdot 10^{-29}:\\ \;\;\;\;\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}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right) \cdot {c}^{-1}\\ \end{array} \]

Alternatives

Alternative 1
Accuracy91.6%
Cost20360
\[\begin{array}{l} t_1 := \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\\ \mathbf{if}\;z \leq -0.0015:\\ \;\;\;\;\frac{t_1 + t \cdot \left(a \cdot -4\right)}{c}\\ \mathbf{elif}\;z \leq 1.46 \cdot 10^{-29}:\\ \;\;\;\;\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}:\\ \;\;\;\;\mathsf{fma}\left(t, a \cdot -4, t_1\right) \cdot {c}^{-1}\\ \end{array} \]
Alternative 2
Accuracy87.5%
Cost9864
\[\begin{array}{l} t_1 := \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{if}\;t_1 \leq -5 \cdot 10^{-316}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{t \cdot \left(a \cdot -4\right) + {\left(z \cdot \frac{1}{b}\right)}^{-1}}{c}\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;\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 3
Accuracy91.6%
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 -0.0005:\\ \;\;\;\;\frac{\frac{t_2}{z} + t_1}{c}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+16}:\\ \;\;\;\;\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 4
Accuracy91.6%
Cost7625
\[\begin{array}{l} \mathbf{if}\;z \leq -0.0004 \lor \neg \left(z \leq 5000000000000\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 5
Accuracy87.5%
Cost5068
\[\begin{array}{l} t_1 := \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{if}\;t_1 \leq -5 \cdot 10^{-316}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;\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 6
Accuracy49.4%
Cost1764
\[\begin{array}{l} t_1 := 9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\ t_2 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\ t_3 := \frac{b \cdot \frac{1}{c}}{z}\\ \mathbf{if}\;t \leq -7.5 \cdot 10^{+111}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -8 \cdot 10^{+71}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -6.2 \cdot 10^{+32}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -0.0052:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.7 \cdot 10^{-147}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{-204}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{-282}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-226}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-111}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Accuracy49.4%
Cost1632
\[\begin{array}{l} t_1 := 9 \cdot \frac{y \cdot \frac{x}{c}}{z}\\ t_2 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\ t_3 := \frac{b \cdot \frac{1}{c}}{z}\\ \mathbf{if}\;t \leq -9.5 \cdot 10^{+111}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -7.2 \cdot 10^{+71}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -7 \cdot 10^{+28}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -0.00013:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-204}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{-284}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-225}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-112}:\\ \;\;\;\;9 \cdot \frac{y}{\frac{z \cdot c}{x}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Accuracy49.0%
Cost1632
\[\begin{array}{l} t_1 := 9 \cdot \frac{y \cdot \frac{x}{c}}{z}\\ t_2 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\ t_3 := \frac{b \cdot \frac{1}{c}}{z}\\ \mathbf{if}\;t \leq -2.2 \cdot 10^{+113}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -6.6 \cdot 10^{+71}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{+29}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-5}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.6 \cdot 10^{-204}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-281}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-224}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-114}:\\ \;\;\;\;\frac{y}{\frac{z}{x}} \cdot \frac{9}{c}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Accuracy49.1%
Cost1632
\[\begin{array}{l} t_1 := 9 \cdot \frac{y \cdot \frac{x}{c}}{z}\\ t_2 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\ t_3 := \frac{b \cdot \frac{1}{c}}{z}\\ \mathbf{if}\;t \leq -7.5 \cdot 10^{+111}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{+71}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.22 \cdot 10^{+29}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -1.65 \cdot 10^{-7}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{-204}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{-280}:\\ \;\;\;\;\frac{9 \cdot \frac{y}{\frac{c}{x}}}{z}\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{-227}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-113}:\\ \;\;\;\;\frac{y}{\frac{z}{x}} \cdot \frac{9}{c}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Accuracy67.1%
Cost1492
\[\begin{array}{l} t_1 := \frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\ \mathbf{if}\;x \leq -3.6 \cdot 10^{+227}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{elif}\;x \leq -8 \cdot 10^{+163}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -3.1 \cdot 10^{+34}:\\ \;\;\;\;\frac{\frac{b}{z} + 9 \cdot \frac{x \cdot y}{z}}{c}\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{-143}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{+108}:\\ \;\;\;\;\left(b + x \cdot \left(9 \cdot y\right)\right) \cdot \frac{\frac{1}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\ \end{array} \]
Alternative 11
Accuracy84.4%
Cost1480
\[\begin{array}{l} t_1 := t \cdot \left(a \cdot -4\right)\\ \mathbf{if}\;z \leq -1.28 \cdot 10^{+112}:\\ \;\;\;\;\frac{t_1 + \frac{9 \cdot \left(x \cdot y\right)}{z}}{c}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+133}:\\ \;\;\;\;\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}:\\ \;\;\;\;\frac{t_1 + \frac{b}{z}}{c}\\ \end{array} \]
Alternative 12
Accuracy47.6%
Cost1368
\[\begin{array}{l} t_1 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{if}\;x \leq -1.6 \cdot 10^{+22}:\\ \;\;\;\;9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\ \mathbf{elif}\;x \leq -1.65 \cdot 10^{-126}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.62 \cdot 10^{-158}:\\ \;\;\;\;\frac{b \cdot \frac{1}{c}}{z}\\ \mathbf{elif}\;x \leq -1.06 \cdot 10^{-225}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{-234}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;x \leq 1.75 \cdot 10^{-143}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\ \end{array} \]
Alternative 13
Accuracy67.0%
Cost1364
\[\begin{array}{l} t_1 := \frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\ t_2 := \frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{if}\;x \leq -3.6 \cdot 10^{+227}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -9.5 \cdot 10^{+163}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{+33}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 8.6 \cdot 10^{-144}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{+72}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\ \end{array} \]
Alternative 14
Accuracy67.0%
Cost1364
\[\begin{array}{l} t_1 := \frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\ t_2 := b + 9 \cdot \left(x \cdot y\right)\\ t_3 := \frac{t_2}{z \cdot c}\\ \mathbf{if}\;x \leq -3.8 \cdot 10^{+227}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -8.5 \cdot 10^{+163}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1 \cdot 10^{+34}:\\ \;\;\;\;\frac{\frac{t_2}{z}}{c}\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{-143}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 6 \cdot 10^{+72}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\ \end{array} \]
Alternative 15
Accuracy66.6%
Cost1364
\[\begin{array}{l} t_1 := \frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\ t_2 := \frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{if}\;x \leq -8.4 \cdot 10^{+227}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -7 \cdot 10^{+163}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.25 \cdot 10^{+35}:\\ \;\;\;\;\frac{\frac{b}{z} + 9 \cdot \frac{x \cdot y}{z}}{c}\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{-143}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.4 \cdot 10^{+71}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\ \end{array} \]
Alternative 16
Accuracy69.5%
Cost1096
\[\begin{array}{l} t_1 := t \cdot \left(a \cdot -4\right)\\ \mathbf{if}\;t \leq -1.5 \cdot 10^{+89}:\\ \;\;\;\;\frac{t_1 + \frac{9 \cdot \left(x \cdot y\right)}{z}}{c}\\ \mathbf{elif}\;t \leq 1.32 \cdot 10^{-123}:\\ \;\;\;\;\frac{\frac{b}{z} + 9 \cdot \frac{x \cdot y}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_1 + \frac{b}{z}}{c}\\ \end{array} \]
Alternative 17
Accuracy51.6%
Cost972
\[\begin{array}{l} t_1 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{if}\;z \leq -3.4 \cdot 10^{+19}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-219}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+30}:\\ \;\;\;\;9 \cdot \frac{y}{\frac{z \cdot c}{x}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 18
Accuracy51.3%
Cost972
\[\begin{array}{l} t_1 := -4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{if}\;z \leq -5.8 \cdot 10^{+21}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{-219}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+30}:\\ \;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 19
Accuracy67.1%
Cost969
\[\begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{+111} \lor \neg \left(t \leq 5.6 \cdot 10^{-32}\right):\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \end{array} \]
Alternative 20
Accuracy49.2%
Cost713
\[\begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+114} \lor \neg \left(t \leq 2.1 \cdot 10^{-73}\right):\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
Alternative 21
Accuracy50.6%
Cost712
\[\begin{array}{l} \mathbf{if}\;t \leq -3.4 \cdot 10^{+89}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-73}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \end{array} \]
Alternative 22
Accuracy50.5%
Cost712
\[\begin{array}{l} \mathbf{if}\;t \leq -3.8 \cdot 10^{+88}:\\ \;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-74}:\\ \;\;\;\;\frac{b \cdot \frac{1}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\ \end{array} \]
Alternative 23
Accuracy34.9%
Cost320
\[\frac{b}{z \cdot c} \]

Reproduce?

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