?

Average Error: 11.9% → 1.38%
Time: 16.3s
Precision: binary64
Cost: 2888

?

\[ \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 := \frac{x \cdot y + t \cdot \left(z \cdot -9\right)}{a \cdot 2}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{y \cdot \frac{x}{a} - \frac{t}{\frac{a}{z \cdot 9}}}{2}\\ \mathbf{elif}\;t_1 \leq 10^{+301}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a} \cdot \frac{y}{2} + \frac{t}{2} \cdot \frac{z \cdot -9}{a}\\ \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))
     (/ (- (* y (/ x a)) (/ t (/ a (* z 9.0)))) 2.0)
     (if (<= t_1 1e+301)
       t_1
       (+ (* (/ x a) (/ y 2.0)) (* (/ t 2.0) (/ (* z -9.0) 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 = ((y * (x / a)) - (t / (a / (z * 9.0)))) / 2.0;
	} else if (t_1 <= 1e+301) {
		tmp = t_1;
	} else {
		tmp = ((x / a) * (y / 2.0)) + ((t / 2.0) * ((z * -9.0) / a));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	return ((x * y) - ((z * 9.0) * t)) / (a * 2.0);
}
public static 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.POSITIVE_INFINITY) {
		tmp = ((y * (x / a)) - (t / (a / (z * 9.0)))) / 2.0;
	} else if (t_1 <= 1e+301) {
		tmp = t_1;
	} else {
		tmp = ((x / a) * (y / 2.0)) + ((t / 2.0) * ((z * -9.0) / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	return ((x * y) - ((z * 9.0) * t)) / (a * 2.0)
def code(x, y, z, t, a):
	t_1 = ((x * y) + (t * (z * -9.0))) / (a * 2.0)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = ((y * (x / a)) - (t / (a / (z * 9.0)))) / 2.0
	elif t_1 <= 1e+301:
		tmp = t_1
	else:
		tmp = ((x / a) * (y / 2.0)) + ((t / 2.0) * ((z * -9.0) / 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(Float64(y * Float64(x / a)) - Float64(t / Float64(a / Float64(z * 9.0)))) / 2.0);
	elseif (t_1 <= 1e+301)
		tmp = t_1;
	else
		tmp = Float64(Float64(Float64(x / a) * Float64(y / 2.0)) + Float64(Float64(t / 2.0) * Float64(Float64(z * -9.0) / a)));
	end
	return tmp
end
function tmp = code(x, y, z, t, a)
	tmp = ((x * y) - ((z * 9.0) * t)) / (a * 2.0);
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = ((x * y) + (t * (z * -9.0))) / (a * 2.0);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = ((y * (x / a)) - (t / (a / (z * 9.0)))) / 2.0;
	elseif (t_1 <= 1e+301)
		tmp = t_1;
	else
		tmp = ((x / a) * (y / 2.0)) + ((t / 2.0) * ((z * -9.0) / a));
	end
	tmp_2 = 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[(N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision] - N[(t / N[(a / N[(z * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[t$95$1, 1e+301], t$95$1, N[(N[(N[(x / a), $MachinePrecision] * N[(y / 2.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t / 2.0), $MachinePrecision] * N[(N[(z * -9.0), $MachinePrecision] / a), $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:\\
\;\;\;\;\frac{y \cdot \frac{x}{a} - \frac{t}{\frac{a}{z \cdot 9}}}{2}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{x}{a} \cdot \frac{y}{2} + \frac{t}{2} \cdot \frac{z \cdot -9}{a}\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original11.9%
Target8.87%
Herbie1.38%
\[\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. Applied egg-rr55.1

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

      \[\leadsto \color{blue}{0.5 \cdot \frac{y \cdot x}{a}} - \frac{z \cdot 9}{a} \cdot \frac{t}{2} \]
    4. Simplified0.68

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

      [Start]55.1

      \[ 0.5 \cdot \frac{y \cdot x}{a} - \frac{z \cdot 9}{a} \cdot \frac{t}{2} \]

      *-commutative [<=]55.1

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

      associate-*r/ [=>]55.1

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

      *-commutative [=>]55.1

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

      /-rgt-identity [<=]55.1

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

      associate-/l* [=>]55.1

      \[ \frac{\color{blue}{\frac{x \cdot y}{\frac{1}{0.5}}}}{a} - \frac{z \cdot 9}{a} \cdot \frac{t}{2} \]

      metadata-eval [=>]55.1

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

      associate-/l/ [=>]55.1

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

      times-frac [=>]0.68

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

      *-commutative [=>]0.68

      \[ \color{blue}{\frac{y}{2} \cdot \frac{x}{a}} - \frac{z \cdot 9}{a} \cdot \frac{t}{2} \]
    5. Applied egg-rr0.92

      \[\leadsto \color{blue}{\frac{y \cdot \frac{x}{a} - \frac{t}{\frac{a}{z \cdot 9}}}{2}} \]

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

    1. Initial program 1.25

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

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

    1. Initial program 93.97

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Applied egg-rr52.95

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

      \[\leadsto \color{blue}{0.5 \cdot \frac{y \cdot x}{a}} - \frac{z \cdot 9}{a} \cdot \frac{t}{2} \]
    4. Simplified3.79

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

      [Start]53.36

      \[ 0.5 \cdot \frac{y \cdot x}{a} - \frac{z \cdot 9}{a} \cdot \frac{t}{2} \]

      *-commutative [<=]53.36

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

      associate-*r/ [=>]52.94

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

      *-commutative [=>]52.94

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

      /-rgt-identity [<=]52.94

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

      associate-/l* [=>]52.94

      \[ \frac{\color{blue}{\frac{x \cdot y}{\frac{1}{0.5}}}}{a} - \frac{z \cdot 9}{a} \cdot \frac{t}{2} \]

      metadata-eval [=>]52.94

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

      associate-/l/ [=>]52.94

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

      times-frac [=>]3.79

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

      *-commutative [=>]3.79

      \[ \color{blue}{\frac{y}{2} \cdot \frac{x}{a}} - \frac{z \cdot 9}{a} \cdot \frac{t}{2} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification1.38

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

Alternatives

Alternative 1
Error1.4%
Cost2761
\[\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 \lor \neg \left(t_1 \leq 10^{+301}\right):\\ \;\;\;\;\frac{y \cdot \frac{x}{a} - \frac{t}{\frac{a}{z \cdot 9}}}{2}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error7.07%
Cost2633
\[\begin{array}{l} t_1 := \frac{x \cdot y + t \cdot \left(z \cdot -9\right)}{a \cdot 2}\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{+294} \lor \neg \left(t_1 \leq 10^{+301}\right):\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Error41.03%
Cost1505
\[\begin{array}{l} t_1 := \frac{0.5}{a} \cdot \left(x \cdot y\right)\\ t_2 := -4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{if}\;t \leq -7 \cdot 10^{-141}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;t \leq -1.18 \cdot 10^{-197}:\\ \;\;\;\;y \cdot \frac{x \cdot 0.5}{a}\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-222}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{-280}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-159}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{+87}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+172} \lor \neg \left(t \leq 6 \cdot 10^{+205}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error41.01%
Cost1505
\[\begin{array}{l} t_1 := \frac{0.5}{\frac{a}{x \cdot y}}\\ t_2 := -4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{if}\;t \leq -8.2 \cdot 10^{-141}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;t \leq -3.1 \cdot 10^{-204}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-222}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-280}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-159}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{+88}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq 1.86 \cdot 10^{+171} \lor \neg \left(t \leq 8.5 \cdot 10^{+205}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error41.04%
Cost1505
\[\begin{array}{l} \mathbf{if}\;t \leq -8.2 \cdot 10^{-141}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;t \leq -1.18 \cdot 10^{-197}:\\ \;\;\;\;y \cdot \frac{x \cdot 0.5}{a}\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-222}:\\ \;\;\;\;\frac{z \cdot t}{a \cdot -0.2222222222222222}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-280}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-159}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+87}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+172} \lor \neg \left(t \leq 8.5 \cdot 10^{+205}\right):\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{\frac{a}{x \cdot y}}\\ \end{array} \]
Alternative 6
Error40.98%
Cost1504
\[\begin{array}{l} \mathbf{if}\;t \leq -8.2 \cdot 10^{-141}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;t \leq -1.18 \cdot 10^{-197}:\\ \;\;\;\;y \cdot \frac{x \cdot 0.5}{a}\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-222}:\\ \;\;\;\;\frac{z \cdot t}{a \cdot -0.2222222222222222}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-280}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-159}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{+87}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{+172}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{+205}:\\ \;\;\;\;\frac{0.5}{\frac{a}{x \cdot y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(z \cdot t\right) \cdot -4.5}{a}\\ \end{array} \]
Alternative 7
Error38%
Cost1372
\[\begin{array}{l} t_1 := -4.5 \cdot \frac{z \cdot t}{a}\\ t_2 := 0.5 \cdot \frac{y}{\frac{a}{x}}\\ t_3 := 0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{if}\;y \leq -6.2 \cdot 10^{-96}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 9.2 \cdot 10^{-95}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-46}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{+18}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+30}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{+63}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{+214}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 8
Error37.78%
Cost1372
\[\begin{array}{l} t_1 := -4.5 \cdot \frac{z \cdot t}{a}\\ t_2 := 0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{if}\;y \leq -9.4 \cdot 10^{-88}:\\ \;\;\;\;0.5 \cdot \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-94}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{-46}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+17}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+30}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{+60}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{+215}:\\ \;\;\;\;y \cdot \frac{x \cdot 0.5}{a}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error9.34%
Cost1092
\[\begin{array}{l} \mathbf{if}\;x \cdot y \leq 5 \cdot 10^{+265}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(x \cdot y + -9 \cdot \left(z \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \end{array} \]
Alternative 10
Error38.07%
Cost978
\[\begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{-88} \lor \neg \left(y \leq 3.6 \cdot 10^{-93} \lor \neg \left(y \leq 1.9 \cdot 10^{-46}\right) \land y \leq 7 \cdot 10^{+19}\right):\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \end{array} \]
Alternative 11
Error37.94%
Cost976
\[\begin{array}{l} t_1 := -4.5 \cdot \frac{z \cdot t}{a}\\ t_2 := 0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{if}\;y \leq -3.7 \cdot 10^{-99}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{-93}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-46}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+18}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\ \end{array} \]
Alternative 12
Error50.8%
Cost713
\[\begin{array}{l} \mathbf{if}\;t \leq 2.85 \cdot 10^{-167} \lor \neg \left(t \leq 1.6 \cdot 10^{+268}\right):\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \left(t \cdot \frac{z}{a}\right)\\ \end{array} \]
Alternative 13
Error50.57%
Cost712
\[\begin{array}{l} \mathbf{if}\;t \leq 7.2 \cdot 10^{-158}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{+217}:\\ \;\;\;\;-4.5 \cdot \left(t \cdot \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \end{array} \]
Alternative 14
Error51.35%
Cost448
\[-4.5 \cdot \left(t \cdot \frac{z}{a}\right) \]
Alternative 15
Error51.06%
Cost448
\[-4.5 \cdot \frac{z \cdot t}{a} \]

Error

Reproduce?

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