?

Average Error: 11.58% → 1.58%
Time: 18.8s
Precision: binary64
Cost: 9032

?

\[ \begin{array}{c}[x, y] = \mathsf{sort}([x, y])\\ [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 := \frac{x \cdot y + t \cdot \left(z \cdot -9\right)}{a \cdot 2}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right) + \frac{z \cdot -4.5}{\frac{a}{t}}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+299}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t \cdot -9\right)\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-4.5, \frac{z}{\frac{a}{t}}, 0.5 \cdot \left(x \cdot \frac{y}{a}\right)\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 (/ (+ (* x y) (* t (* z -9.0))) (* a 2.0))))
   (if (<= t_1 (- INFINITY))
     (+ (* x (* y (/ 0.5 a))) (/ (* z -4.5) (/ a t)))
     (if (<= t_1 2e+299)
       (/ (fma x y (* z (* t -9.0))) (* a 2.0))
       (fma -4.5 (/ z (/ a t)) (* 0.5 (* x (/ y a))))))))
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 = ((x * y) + (t * (z * -9.0))) / (a * 2.0);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = (x * (y * (0.5 / a))) + ((z * -4.5) / (a / t));
	} else if (t_1 <= 2e+299) {
		tmp = fma(x, y, (z * (t * -9.0))) / (a * 2.0);
	} else {
		tmp = fma(-4.5, (z / (a / t)), (0.5 * (x * (y / a))));
	}
	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(Float64(Float64(x * y) + Float64(t * Float64(z * -9.0))) / Float64(a * 2.0))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(x * Float64(y * Float64(0.5 / a))) + Float64(Float64(z * -4.5) / Float64(a / t)));
	elseif (t_1 <= 2e+299)
		tmp = Float64(fma(x, y, Float64(z * Float64(t * -9.0))) / Float64(a * 2.0));
	else
		tmp = fma(-4.5, Float64(z / Float64(a / t)), Float64(0.5 * Float64(x * Float64(y / a))));
	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[(N[(N[(x * y), $MachinePrecision] + N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x * N[(y * N[(0.5 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z * -4.5), $MachinePrecision] / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+299], N[(N[(x * y + N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(-4.5 * N[(z / N[(a / t), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2}
\begin{array}{l}
t_1 := \frac{x \cdot y + t \cdot \left(z \cdot -9\right)}{a \cdot 2}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right) + \frac{z \cdot -4.5}{\frac{a}{t}}\\

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

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


\end{array}

Error?

Target

Original11.58%
Target8.52%
Herbie1.58%
\[\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 (*.f64 x y) (*.f64 (*.f64 z 9) t)) (*.f64 a 2)) < -inf.0

    1. Initial program 100

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

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

      [Start]100

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

      associate-*l* [=>]98.57

      \[ \frac{x \cdot y - \color{blue}{z \cdot \left(9 \cdot t\right)}}{a \cdot 2} \]
    3. Applied egg-rr57.25

      \[\leadsto \color{blue}{\left(x \cdot y\right) \cdot \frac{0.5}{a} + \left(-\frac{z}{a} \cdot \frac{9 \cdot t}{2}\right)} \]
    4. Simplified0.58

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

      [Start]57.25

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

      sub-neg [<=]57.25

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

      associate-*l* [=>]0.5

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

      associate-/l* [=>]0.58

      \[ x \cdot \left(y \cdot \frac{0.5}{a}\right) - \frac{z}{a} \cdot \color{blue}{\frac{9}{\frac{2}{t}}} \]
    5. Applied egg-rr1.94

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

    if -inf.0 < (/.f64 (-.f64 (*.f64 x y) (*.f64 (*.f64 z 9) t)) (*.f64 a 2)) < 2.0000000000000001e299

    1. Initial program 1.3

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

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

      [Start]1.3

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

      fma-neg [=>]1.3

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

      associate-*l* [=>]1.39

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

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

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

      *-commutative [=>]1.39

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

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

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

      metadata-eval [=>]1.39

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

    if 2.0000000000000001e299 < (/.f64 (-.f64 (*.f64 x y) (*.f64 (*.f64 z 9) t)) (*.f64 a 2))

    1. Initial program 89.69

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

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

      [Start]89.69

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

      associate-*l* [=>]89.7

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

      \[\leadsto \color{blue}{-4.5 \cdot \frac{t \cdot z}{a} + 0.5 \cdot \frac{y \cdot x}{a}} \]
    4. Simplified4.18

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

      [Start]89.68

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

      fma-def [=>]89.69

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

      *-commutative [=>]89.69

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

      associate-/l* [=>]48.28

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

      associate-/l* [=>]3.11

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

      associate-/r/ [=>]4.18

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

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

Alternatives

Alternative 1
Error1.38%
Cost8393
\[\begin{array}{l} t_1 := x \cdot y + t \cdot \left(z \cdot -9\right)\\ \mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 5 \cdot 10^{+300}\right):\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right) + \frac{z \cdot -4.5}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t \cdot -9\right)\right)}{a \cdot 2}\\ \end{array} \]
Alternative 2
Error7.17%
Cost2632
\[\begin{array}{l} t_1 := \frac{x \cdot y + t \cdot \left(z \cdot -9\right)}{a \cdot 2}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;z \cdot \frac{t \cdot -4.5}{a}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+299}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \frac{y}{\frac{a}{x}}\\ \end{array} \]
Alternative 3
Error1.24%
Cost2249
\[\begin{array}{l} t_1 := x \cdot y + t \cdot \left(z \cdot -9\right)\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{+245} \lor \neg \left(t_1 \leq 5 \cdot 10^{+298}\right):\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right) + -4.5 \cdot \left(t \cdot \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t_1}{a \cdot 2}\\ \end{array} \]
Alternative 4
Error1.29%
Cost2249
\[\begin{array}{l} t_1 := x \cdot y + t \cdot \left(z \cdot -9\right)\\ \mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 5 \cdot 10^{+300}\right):\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right) + \frac{z \cdot -4.5}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_1}{a \cdot 2}\\ \end{array} \]
Alternative 5
Error36.96%
Cost1632
\[\begin{array}{l} t_1 := 0.5 \cdot \frac{y}{\frac{a}{x}}\\ \mathbf{if}\;x \leq -2.85 \cdot 10^{+172}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.42 \cdot 10^{+147}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq -4.5 \cdot 10^{+20}:\\ \;\;\;\;\frac{y}{2} \cdot \frac{x}{a}\\ \mathbf{elif}\;x \leq -5.5 \cdot 10^{-24}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;x \leq -1.6 \cdot 10^{-79}:\\ \;\;\;\;\left(x \cdot y\right) \cdot \frac{0.5}{a}\\ \mathbf{elif}\;x \leq -2.2 \cdot 10^{-174}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;x \leq -5.5 \cdot 10^{-184}:\\ \;\;\;\;\frac{x \cdot y}{\frac{a}{0.5}}\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{-110}:\\ \;\;\;\;\frac{t \cdot \left(z \cdot -9\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error36.78%
Cost1504
\[\begin{array}{l} t_1 := \left(x \cdot y\right) \cdot \frac{0.5}{a}\\ t_2 := 0.5 \cdot \frac{y}{\frac{a}{x}}\\ \mathbf{if}\;x \leq -4.9 \cdot 10^{+172}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -4.4 \cdot 10^{+148}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq -2.3 \cdot 10^{+20}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.55 \cdot 10^{-23}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{-77}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -2.2 \cdot 10^{-174}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;x \leq -5.5 \cdot 10^{-184}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{-107}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error36.84%
Cost1504
\[\begin{array}{l} t_1 := \left(x \cdot y\right) \cdot \frac{0.5}{a}\\ t_2 := 0.5 \cdot \frac{y}{\frac{a}{x}}\\ \mathbf{if}\;x \leq -3 \cdot 10^{+172}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -8.6 \cdot 10^{+146}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq -1.15 \cdot 10^{+20}:\\ \;\;\;\;\frac{y}{2} \cdot \frac{x}{a}\\ \mathbf{elif}\;x \leq -1.4 \cdot 10^{-23}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;x \leq -4.3 \cdot 10^{-75}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -2.2 \cdot 10^{-174}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;x \leq -5.5 \cdot 10^{-184}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.45 \cdot 10^{-101}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error36.8%
Cost1504
\[\begin{array}{l} t_1 := 0.5 \cdot \frac{y}{\frac{a}{x}}\\ \mathbf{if}\;x \leq -2.05 \cdot 10^{+172}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.12 \cdot 10^{+147}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq -5.2 \cdot 10^{+22}:\\ \;\;\;\;\frac{y}{2} \cdot \frac{x}{a}\\ \mathbf{elif}\;x \leq -1.35 \cdot 10^{-23}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;x \leq -5 \cdot 10^{-75}:\\ \;\;\;\;\left(x \cdot y\right) \cdot \frac{0.5}{a}\\ \mathbf{elif}\;x \leq -2.7 \cdot 10^{-174}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;x \leq -5.5 \cdot 10^{-184}:\\ \;\;\;\;\frac{x \cdot y}{\frac{a}{0.5}}\\ \mathbf{elif}\;x \leq 5 \cdot 10^{-102}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error36.93%
Cost1504
\[\begin{array}{l} t_1 := 0.5 \cdot \frac{y}{\frac{a}{x}}\\ \mathbf{if}\;x \leq -2.25 \cdot 10^{+172}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -6 \cdot 10^{+146}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq -6 \cdot 10^{+20}:\\ \;\;\;\;\frac{y}{2} \cdot \frac{x}{a}\\ \mathbf{elif}\;x \leq -1.6 \cdot 10^{-23}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;x \leq -5.1 \cdot 10^{-77}:\\ \;\;\;\;\left(x \cdot y\right) \cdot \frac{0.5}{a}\\ \mathbf{elif}\;x \leq -2.2 \cdot 10^{-174}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;x \leq -5.5 \cdot 10^{-184}:\\ \;\;\;\;\frac{x \cdot y}{\frac{a}{0.5}}\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{-101}:\\ \;\;\;\;\frac{z \cdot \left(t \cdot -4.5\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error36.25%
Cost1240
\[\begin{array}{l} t_1 := 0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ t_2 := 0.5 \cdot \frac{y}{\frac{a}{x}}\\ \mathbf{if}\;x \leq -4.4 \cdot 10^{+172}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -4.8 \cdot 10^{+148}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{+20}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -2.1 \cdot 10^{-24}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;x \leq -6 \cdot 10^{-80}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.75 \cdot 10^{-101}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error9.27%
Cost1092
\[\begin{array}{l} \mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+245}:\\ \;\;\;\;0.5 \cdot \frac{y}{\frac{a}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\\ \end{array} \]
Alternative 12
Error9.17%
Cost1092
\[\begin{array}{l} \mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+245}:\\ \;\;\;\;0.5 \cdot \frac{y}{\frac{a}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}\\ \end{array} \]
Alternative 13
Error36.68%
Cost976
\[\begin{array}{l} t_1 := 0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{if}\;x \leq -1.15 \cdot 10^{+20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.7 \cdot 10^{-24}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;x \leq -8 \cdot 10^{-86}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 7 \cdot 10^{-103}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\ \end{array} \]
Alternative 14
Error36.28%
Cost713
\[\begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{-64} \lor \neg \left(y \leq 1.3 \cdot 10^{-29}\right):\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \end{array} \]
Alternative 15
Error52.12%
Cost580
\[\begin{array}{l} \mathbf{if}\;x \leq -2.15 \cdot 10^{-63}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \end{array} \]
Alternative 16
Error52.08%
Cost580
\[\begin{array}{l} \mathbf{if}\;x \leq -4.8 \cdot 10^{-63}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \end{array} \]
Alternative 17
Error51.06%
Cost580
\[\begin{array}{l} \mathbf{if}\;a \leq 1.8 \cdot 10^{+43}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \end{array} \]
Alternative 18
Error52.24%
Cost448
\[-4.5 \cdot \left(z \cdot \frac{t}{a}\right) \]

Error

Reproduce?

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