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

?

Percentage Accurate: 91.1% → 96.8%
Time: 14.4s
Precision: binary64
Cost: 8520

?

\[ \begin{array}{c}[z, t] = \mathsf{sort}([z, t])\\ \end{array} \]
\[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
\[\begin{array}{l} t_1 := -4.5 \cdot \frac{t}{a}\\ t_2 := x \cdot y - \left(z \cdot 9\right) \cdot t\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(t_1, z, 0.5 \cdot \left(y \cdot \frac{-1}{\frac{-a}{x}}\right)\right)\\ \mathbf{elif}\;t_2 \leq 10^{+136}:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, t \cdot -9, x \cdot y\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t_1, z, 0.5 \cdot \frac{y}{\frac{a}{x}}\right)\\ \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (/ (- (* x y) (* (* z 9.0) t)) (* a 2.0)))
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* -4.5 (/ t a))) (t_2 (- (* x y) (* (* z 9.0) t))))
   (if (<= t_2 (- INFINITY))
     (fma t_1 z (* 0.5 (* y (/ -1.0 (/ (- a) x)))))
     (if (<= t_2 1e+136)
       (/ (fma z (* t -9.0) (* x y)) (* a 2.0))
       (fma t_1 z (* 0.5 (/ y (/ a x))))))))
double code(double x, double y, double z, double t, double a) {
	return ((x * y) - ((z * 9.0) * t)) / (a * 2.0);
}
double code(double x, double y, double z, double t, double a) {
	double t_1 = -4.5 * (t / a);
	double t_2 = (x * y) - ((z * 9.0) * t);
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = fma(t_1, z, (0.5 * (y * (-1.0 / (-a / x)))));
	} else if (t_2 <= 1e+136) {
		tmp = fma(z, (t * -9.0), (x * y)) / (a * 2.0);
	} else {
		tmp = fma(t_1, z, (0.5 * (y / (a / x))));
	}
	return tmp;
}
function code(x, y, z, t, a)
	return Float64(Float64(Float64(x * y) - Float64(Float64(z * 9.0) * t)) / Float64(a * 2.0))
end
function code(x, y, z, t, a)
	t_1 = Float64(-4.5 * Float64(t / a))
	t_2 = Float64(Float64(x * y) - Float64(Float64(z * 9.0) * t))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = fma(t_1, z, Float64(0.5 * Float64(y * Float64(-1.0 / Float64(Float64(-a) / x)))));
	elseif (t_2 <= 1e+136)
		tmp = Float64(fma(z, Float64(t * -9.0), Float64(x * y)) / Float64(a * 2.0));
	else
		tmp = fma(t_1, z, Float64(0.5 * Float64(y / Float64(a / x))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] - N[(N[(z * 9.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-4.5 * N[(t / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] - N[(N[(z * 9.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(t$95$1 * z + N[(0.5 * N[(y * N[(-1.0 / N[((-a) / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+136], N[(N[(z * N[(t * -9.0), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * z + N[(0.5 * N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2}
\begin{array}{l}
t_1 := -4.5 \cdot \frac{t}{a}\\
t_2 := x \cdot y - \left(z \cdot 9\right) \cdot t\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(t_1, z, 0.5 \cdot \left(y \cdot \frac{-1}{\frac{-a}{x}}\right)\right)\\

\mathbf{elif}\;t_2 \leq 10^{+136}:\\
\;\;\;\;\frac{\mathsf{fma}\left(z, t \cdot -9, x \cdot y\right)}{a \cdot 2}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t_1, z, 0.5 \cdot \frac{y}{\frac{a}{x}}\right)\\


\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 13 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

Original91.1%
Target93.8%
Herbie96.8%
\[\begin{array}{l} \mathbf{if}\;a < -2.090464557976709 \cdot 10^{+86}:\\ \;\;\;\;0.5 \cdot \frac{y \cdot x}{a} - 4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;a < 2.144030707833976 \cdot 10^{+99}:\\ \;\;\;\;\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \left(x \cdot 0.5\right) - \frac{t}{a} \cdot \left(z \cdot 4.5\right)\\ \end{array} \]

Derivation?

  1. Split input into 3 regimes
  2. if (-.f64 (*.f64 x y) (*.f64 (*.f64 z 9) t)) < -inf.0

    1. Initial program 67.8%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Simplified67.8%

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

      [Start]67.8%

      \[ \frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]

      sub-neg [=>]67.8%

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

      +-commutative [=>]67.8%

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

      neg-sub0 [=>]67.8%

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

      associate-+l- [=>]67.8%

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

      sub0-neg [=>]67.8%

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

      neg-mul-1 [=>]67.8%

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

      associate-/l* [=>]67.8%

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

      associate-/r/ [=>]67.8%

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

      *-commutative [=>]67.8%

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

      sub-neg [=>]67.8%

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

      +-commutative [=>]67.8%

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

      neg-sub0 [=>]67.8%

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

      associate-+l- [=>]67.8%

      \[ \color{blue}{\left(0 - \left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]

      sub0-neg [=>]67.8%

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

      distribute-lft-neg-out [=>]67.8%

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

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

      \[ \color{blue}{\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right) \cdot \left(-\frac{-1}{a \cdot 2}\right)} \]
    3. Taylor expanded in x around 0 67.8%

      \[\leadsto \color{blue}{-4.5 \cdot \frac{t \cdot z}{a} + 0.5 \cdot \frac{y \cdot x}{a}} \]
    4. Applied egg-rr99.8%

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

      [Start]67.8%

      \[ -4.5 \cdot \frac{t \cdot z}{a} + 0.5 \cdot \frac{y \cdot x}{a} \]

      associate-*l/ [<=]83.9%

      \[ -4.5 \cdot \color{blue}{\left(\frac{t}{a} \cdot z\right)} + 0.5 \cdot \frac{y \cdot x}{a} \]

      associate-*r* [=>]84.1%

      \[ \color{blue}{\left(-4.5 \cdot \frac{t}{a}\right) \cdot z} + 0.5 \cdot \frac{y \cdot x}{a} \]

      fma-def [=>]84.1%

      \[ \color{blue}{\mathsf{fma}\left(-4.5 \cdot \frac{t}{a}, z, 0.5 \cdot \frac{y \cdot x}{a}\right)} \]

      associate-/l* [=>]99.8%

      \[ \mathsf{fma}\left(-4.5 \cdot \frac{t}{a}, z, 0.5 \cdot \color{blue}{\frac{y}{\frac{a}{x}}}\right) \]
    5. Applied egg-rr99.9%

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

      [Start]99.8%

      \[ \mathsf{fma}\left(-4.5 \cdot \frac{t}{a}, z, 0.5 \cdot \frac{y}{\frac{a}{x}}\right) \]

      frac-2neg [=>]99.8%

      \[ \mathsf{fma}\left(-4.5 \cdot \frac{t}{a}, z, 0.5 \cdot \color{blue}{\frac{-y}{-\frac{a}{x}}}\right) \]

      div-inv [=>]99.9%

      \[ \mathsf{fma}\left(-4.5 \cdot \frac{t}{a}, z, 0.5 \cdot \color{blue}{\left(\left(-y\right) \cdot \frac{1}{-\frac{a}{x}}\right)}\right) \]

      distribute-neg-frac [=>]99.9%

      \[ \mathsf{fma}\left(-4.5 \cdot \frac{t}{a}, z, 0.5 \cdot \left(\left(-y\right) \cdot \frac{1}{\color{blue}{\frac{-a}{x}}}\right)\right) \]

    if -inf.0 < (-.f64 (*.f64 x y) (*.f64 (*.f64 z 9) t)) < 1.00000000000000006e136

    1. Initial program 97.9%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Simplified97.9%

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

      [Start]97.9%

      \[ \frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]

      sub-neg [=>]97.9%

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

      +-commutative [=>]97.9%

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

      associate-*l* [=>]97.9%

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

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

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

      fma-def [=>]97.9%

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

      *-commutative [=>]97.9%

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

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

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

      metadata-eval [=>]97.9%

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

    if 1.00000000000000006e136 < (-.f64 (*.f64 x y) (*.f64 (*.f64 z 9) t))

    1. Initial program 83.0%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Simplified84.5%

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

      [Start]83.0%

      \[ \frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]

      sub-neg [=>]83.0%

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

      +-commutative [=>]83.0%

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

      neg-sub0 [=>]83.0%

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

      associate-+l- [=>]83.0%

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

      sub0-neg [=>]83.0%

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

      neg-mul-1 [=>]83.0%

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

      associate-/l* [=>]83.0%

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

      associate-/r/ [=>]83.0%

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

      *-commutative [=>]83.0%

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

      sub-neg [=>]83.0%

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

      +-commutative [=>]83.0%

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

      neg-sub0 [=>]83.0%

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

      associate-+l- [=>]83.0%

      \[ \color{blue}{\left(0 - \left(x \cdot y - \left(z \cdot 9\right) \cdot t\right)\right)} \cdot \frac{-1}{a \cdot 2} \]

      sub0-neg [=>]83.0%

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

      distribute-lft-neg-out [=>]83.0%

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

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

      \[ \color{blue}{\left(x \cdot y - \left(z \cdot 9\right) \cdot t\right) \cdot \left(-\frac{-1}{a \cdot 2}\right)} \]
    3. Taylor expanded in x around 0 84.6%

      \[\leadsto \color{blue}{-4.5 \cdot \frac{t \cdot z}{a} + 0.5 \cdot \frac{y \cdot x}{a}} \]
    4. Applied egg-rr93.4%

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

      [Start]84.6%

      \[ -4.5 \cdot \frac{t \cdot z}{a} + 0.5 \cdot \frac{y \cdot x}{a} \]

      associate-*l/ [<=]84.6%

      \[ -4.5 \cdot \color{blue}{\left(\frac{t}{a} \cdot z\right)} + 0.5 \cdot \frac{y \cdot x}{a} \]

      associate-*r* [=>]84.6%

      \[ \color{blue}{\left(-4.5 \cdot \frac{t}{a}\right) \cdot z} + 0.5 \cdot \frac{y \cdot x}{a} \]

      fma-def [=>]86.2%

      \[ \color{blue}{\mathsf{fma}\left(-4.5 \cdot \frac{t}{a}, z, 0.5 \cdot \frac{y \cdot x}{a}\right)} \]

      associate-/l* [=>]93.4%

      \[ \mathsf{fma}\left(-4.5 \cdot \frac{t}{a}, z, 0.5 \cdot \color{blue}{\frac{y}{\frac{a}{x}}}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification97.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y - \left(z \cdot 9\right) \cdot t \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(-4.5 \cdot \frac{t}{a}, z, 0.5 \cdot \left(y \cdot \frac{-1}{\frac{-a}{x}}\right)\right)\\ \mathbf{elif}\;x \cdot y - \left(z \cdot 9\right) \cdot t \leq 10^{+136}:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, t \cdot -9, x \cdot y\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-4.5 \cdot \frac{t}{a}, z, 0.5 \cdot \frac{y}{\frac{a}{x}}\right)\\ \end{array} \]

Alternatives

Alternative 1
Accuracy96.8%
Cost8520
\[\begin{array}{l} t_1 := -4.5 \cdot \frac{t}{a}\\ t_2 := x \cdot y - \left(z \cdot 9\right) \cdot t\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(t_1, z, 0.5 \cdot \left(y \cdot \frac{-1}{\frac{-a}{x}}\right)\right)\\ \mathbf{elif}\;t_2 \leq 10^{+136}:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, t \cdot -9, x \cdot y\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t_1, z, 0.5 \cdot \frac{y}{\frac{a}{x}}\right)\\ \end{array} \]
Alternative 2
Accuracy96.7%
Cost8520
\[\begin{array}{l} t_1 := -4.5 \cdot \frac{t}{a}\\ t_2 := x \cdot y - \left(z \cdot 9\right) \cdot t\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;z \cdot t_1 - 0.5 \cdot \frac{y}{\frac{-a}{x}}\\ \mathbf{elif}\;t_2 \leq 10^{+136}:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, t \cdot -9, x \cdot y\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t_1, z, 0.5 \cdot \frac{y}{\frac{a}{x}}\right)\\ \end{array} \]
Alternative 3
Accuracy97.0%
Cost8392
\[\begin{array}{l} t_1 := x \cdot y - \left(z \cdot 9\right) \cdot t\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;z \cdot \left(-4.5 \cdot \frac{t}{a}\right) - 0.5 \cdot \frac{y}{\frac{-a}{x}}\\ \mathbf{elif}\;t_1 \leq 10^{+244}:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, t \cdot -9, x \cdot y\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{a} \cdot \left(z \cdot -4.5\right) + \frac{y}{a} \cdot \left(x \cdot 0.5\right)\\ \end{array} \]
Alternative 4
Accuracy97.0%
Cost2249
\[\begin{array}{l} t_1 := x \cdot y - \left(z \cdot 9\right) \cdot t\\ \mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 10^{+244}\right):\\ \;\;\;\;\frac{t}{a} \cdot \left(z \cdot -4.5\right) + \frac{y}{a} \cdot \left(x \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}\\ \end{array} \]
Alternative 5
Accuracy97.0%
Cost2248
\[\begin{array}{l} t_1 := x \cdot y - \left(z \cdot 9\right) \cdot t\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;z \cdot \left(-4.5 \cdot \frac{t}{a}\right) - 0.5 \cdot \frac{y}{\frac{-a}{x}}\\ \mathbf{elif}\;t_1 \leq 10^{+244}:\\ \;\;\;\;\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{a} \cdot \left(z \cdot -4.5\right) + \frac{y}{a} \cdot \left(x \cdot 0.5\right)\\ \end{array} \]
Alternative 6
Accuracy94.8%
Cost1609
\[\begin{array}{l} t_1 := \left(z \cdot 9\right) \cdot t\\ \mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 10^{+256}\right):\\ \;\;\;\;\left(t \cdot -4.5\right) \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}\\ \end{array} \]
Alternative 7
Accuracy93.0%
Cost1092
\[\begin{array}{l} \mathbf{if}\;x \cdot y \leq -4 \cdot 10^{+280}:\\ \;\;\;\;\frac{\frac{x}{a}}{\frac{2}{y}}\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y + z \cdot \left(t \cdot -9\right)\right) \cdot \frac{0.5}{a}\\ \end{array} \]
Alternative 8
Accuracy64.1%
Cost977
\[\begin{array}{l} t_1 := 0.5 \cdot \frac{x \cdot y}{a}\\ \mathbf{if}\;x \leq -9.6 \cdot 10^{+104}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.1 \cdot 10^{+96}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;x \leq -0.008 \lor \neg \left(x \leq 2.9 \cdot 10^{-47}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \end{array} \]
Alternative 9
Accuracy65.4%
Cost976
\[\begin{array}{l} t_1 := x \cdot \frac{y \cdot 0.5}{a}\\ \mathbf{if}\;x \leq -1.55 \cdot 10^{+147}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.1 \cdot 10^{+96}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{elif}\;x \leq -0.0078:\\ \;\;\;\;0.5 \cdot \frac{x \cdot y}{a}\\ \mathbf{elif}\;x \leq 8.2 \cdot 10^{-47}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Accuracy74.2%
Cost968
\[\begin{array}{l} \mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+60}:\\ \;\;\;\;\frac{x}{a} \cdot \frac{y}{2}\\ \mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-34}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y \cdot 0.5}{a}\\ \end{array} \]
Alternative 11
Accuracy51.3%
Cost448
\[-4.5 \cdot \left(z \cdot \frac{t}{a}\right) \]
Alternative 12
Accuracy50.7%
Cost448
\[-4.5 \cdot \left(t \cdot \frac{z}{a}\right) \]
Alternative 13
Accuracy50.7%
Cost448
\[-4.5 \cdot \frac{t}{\frac{a}{z}} \]

Reproduce?

herbie shell --seed 2023271 
(FPCore (x y z t a)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, I"
  :precision binary64

  :herbie-target
  (if (< a -2.090464557976709e+86) (- (* 0.5 (/ (* y x) a)) (* 4.5 (/ t (/ a z)))) (if (< a 2.144030707833976e+99) (/ (- (* x y) (* z (* 9.0 t))) (* a 2.0)) (- (* (/ y a) (* x 0.5)) (* (/ t a) (* z 4.5)))))

  (/ (- (* x y) (* (* z 9.0) t)) (* a 2.0)))