?

Average Accuracy: 88.3% → 98.5%
Time: 16.8s
Precision: binary64
Cost: 2248

?

\[ \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}{\frac{a \cdot 2}{y}}\\ t_2 := x \cdot y - \left(z \cdot 9\right) \cdot t\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{+229}:\\ \;\;\;\;t_1 + z \cdot \frac{t \cdot -4.5}{a}\\ \mathbf{elif}\;t_2 \leq 10^{+222}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a} + 0.5 \cdot \frac{x \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;t_1 + \frac{t \cdot -4.5}{\frac{a}{z}}\\ \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 (/ (* a 2.0) y))) (t_2 (- (* x y) (* (* z 9.0) t))))
   (if (<= t_2 -5e+229)
     (+ t_1 (* z (/ (* t -4.5) a)))
     (if (<= t_2 1e+222)
       (+ (* -4.5 (/ (* z t) a)) (* 0.5 (/ (* x y) a)))
       (+ t_1 (/ (* t -4.5) (/ a z)))))))
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 / ((a * 2.0) / y);
	double t_2 = (x * y) - ((z * 9.0) * t);
	double tmp;
	if (t_2 <= -5e+229) {
		tmp = t_1 + (z * ((t * -4.5) / a));
	} else if (t_2 <= 1e+222) {
		tmp = (-4.5 * ((z * t) / a)) + (0.5 * ((x * y) / a));
	} else {
		tmp = t_1 + ((t * -4.5) / (a / z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = ((x * y) - ((z * 9.0d0) * t)) / (a * 2.0d0)
end function
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x / ((a * 2.0d0) / y)
    t_2 = (x * y) - ((z * 9.0d0) * t)
    if (t_2 <= (-5d+229)) then
        tmp = t_1 + (z * ((t * (-4.5d0)) / a))
    else if (t_2 <= 1d+222) then
        tmp = ((-4.5d0) * ((z * t) / a)) + (0.5d0 * ((x * y) / a))
    else
        tmp = t_1 + ((t * (-4.5d0)) / (a / z))
    end if
    code = tmp
end function
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 / ((a * 2.0) / y);
	double t_2 = (x * y) - ((z * 9.0) * t);
	double tmp;
	if (t_2 <= -5e+229) {
		tmp = t_1 + (z * ((t * -4.5) / a));
	} else if (t_2 <= 1e+222) {
		tmp = (-4.5 * ((z * t) / a)) + (0.5 * ((x * y) / a));
	} else {
		tmp = t_1 + ((t * -4.5) / (a / z));
	}
	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 / ((a * 2.0) / y)
	t_2 = (x * y) - ((z * 9.0) * t)
	tmp = 0
	if t_2 <= -5e+229:
		tmp = t_1 + (z * ((t * -4.5) / a))
	elif t_2 <= 1e+222:
		tmp = (-4.5 * ((z * t) / a)) + (0.5 * ((x * y) / a))
	else:
		tmp = t_1 + ((t * -4.5) / (a / z))
	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(x / Float64(Float64(a * 2.0) / y))
	t_2 = Float64(Float64(x * y) - Float64(Float64(z * 9.0) * t))
	tmp = 0.0
	if (t_2 <= -5e+229)
		tmp = Float64(t_1 + Float64(z * Float64(Float64(t * -4.5) / a)));
	elseif (t_2 <= 1e+222)
		tmp = Float64(Float64(-4.5 * Float64(Float64(z * t) / a)) + Float64(0.5 * Float64(Float64(x * y) / a)));
	else
		tmp = Float64(t_1 + Float64(Float64(t * -4.5) / Float64(a / z)));
	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 / ((a * 2.0) / y);
	t_2 = (x * y) - ((z * 9.0) * t);
	tmp = 0.0;
	if (t_2 <= -5e+229)
		tmp = t_1 + (z * ((t * -4.5) / a));
	elseif (t_2 <= 1e+222)
		tmp = (-4.5 * ((z * t) / a)) + (0.5 * ((x * y) / a));
	else
		tmp = t_1 + ((t * -4.5) / (a / z));
	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[(x / N[(N[(a * 2.0), $MachinePrecision] / y), $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, -5e+229], N[(t$95$1 + N[(z * N[(N[(t * -4.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+222], N[(N[(-4.5 * N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(t * -4.5), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2}
\begin{array}{l}
t_1 := \frac{x}{\frac{a \cdot 2}{y}}\\
t_2 := x \cdot y - \left(z \cdot 9\right) \cdot t\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{+229}:\\
\;\;\;\;t_1 + z \cdot \frac{t \cdot -4.5}{a}\\

\mathbf{elif}\;t_2 \leq 10^{+222}:\\
\;\;\;\;-4.5 \cdot \frac{z \cdot t}{a} + 0.5 \cdot \frac{x \cdot y}{a}\\

\mathbf{else}:\\
\;\;\;\;t_1 + \frac{t \cdot -4.5}{\frac{a}{z}}\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original88.3%
Target91.1%
Herbie98.5%
\[\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)) < -5.0000000000000005e229

    1. Initial program 48.7%

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

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

      [Start]48.7

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

      associate-*l* [=>]49.0

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

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

      [Start]49.0

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

      div-sub [=>]49.0

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

      sub-neg [=>]49.0

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

      div-inv [=>]49.0

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

      *-commutative [=>]49.0

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

      associate-/r* [=>]49.0

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

      metadata-eval [=>]49.0

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

      times-frac [=>]72.8

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

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

      [Start]72.8

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

      sub-neg [<=]72.8

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

      associate-*l* [=>]98.6

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

      associate-/l* [=>]98.6

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

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

      [Start]98.6

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

      associate-*l/ [=>]73.3

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

      *-commutative [=>]73.3

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

      associate-/l* [=>]98.4

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

      associate-/r/ [=>]98.4

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

      *-commutative [=>]98.4

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

      metadata-eval [=>]98.4

      \[ x \cdot \left(y \cdot \frac{0.5}{a}\right) - \frac{t \cdot \color{blue}{4.5}}{\frac{a}{z}} \]
    6. Applied egg-rr98.5%

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

      [Start]98.4

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

      associate-*r* [=>]72.6

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

      clear-num [=>]72.6

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

      un-div-inv [=>]72.6

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

      associate-/l* [=>]98.5

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

      div-inv [=>]98.5

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

      metadata-eval [=>]98.5

      \[ \frac{x}{\frac{a \cdot \color{blue}{2}}{y}} - \frac{t \cdot 4.5}{\frac{a}{z}} \]
    7. Applied egg-rr98.6%

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

      [Start]98.5

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

      *-un-lft-identity [=>]98.5

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

      associate-/r* [=>]98.5

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

      associate-/r/ [=>]98.6

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

    if -5.0000000000000005e229 < (-.f64 (*.f64 x y) (*.f64 (*.f64 z 9) t)) < 1e222

    1. Initial program 98.5%

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

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

      [Start]98.5

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

      sub-neg [=>]98.5

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

      remove-double-neg [<=]98.5

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

      distribute-neg-in [<=]98.5

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

      +-commutative [<=]98.5

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

      sub-neg [<=]98.5

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

      neg-mul-1 [=>]98.5

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

      associate-/l* [=>]97.8

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

      associate-/r/ [=>]98.3

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

      sub-neg [=>]98.3

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

      +-commutative [=>]98.3

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

      neg-sub0 [=>]98.3

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

      associate-+l- [=>]98.3

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

      sub0-neg [=>]98.3

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

      distribute-rgt-neg-out [=>]98.3

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

      distribute-lft-neg-in [=>]98.3

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

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

    if 1e222 < (-.f64 (*.f64 x y) (*.f64 (*.f64 z 9) t))

    1. Initial program 49.2%

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

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

      [Start]49.2

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

      associate-*l* [=>]49.4

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

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

      [Start]49.4

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

      div-sub [=>]49.4

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

      sub-neg [=>]49.4

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

      div-inv [=>]49.3

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

      *-commutative [=>]49.3

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

      associate-/r* [=>]49.3

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

      metadata-eval [=>]49.3

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

      times-frac [=>]72.2

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

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

      [Start]72.2

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

      sub-neg [<=]72.2

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

      associate-*l* [=>]98.3

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

      associate-/l* [=>]98.2

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

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

      [Start]98.2

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

      associate-*l/ [=>]71.4

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

      *-commutative [=>]71.4

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

      associate-/l* [=>]98.3

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

      associate-/r/ [=>]98.3

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

      *-commutative [=>]98.3

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

      metadata-eval [=>]98.3

      \[ x \cdot \left(y \cdot \frac{0.5}{a}\right) - \frac{t \cdot \color{blue}{4.5}}{\frac{a}{z}} \]
    6. Applied egg-rr98.3%

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

      [Start]98.3

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

      associate-*r* [=>]72.3

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

      clear-num [=>]72.3

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

      un-div-inv [=>]72.4

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

      associate-/l* [=>]98.3

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

      div-inv [=>]98.3

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

      metadata-eval [=>]98.3

      \[ \frac{x}{\frac{a \cdot \color{blue}{2}}{y}} - \frac{t \cdot 4.5}{\frac{a}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification98.5%

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

Alternatives

Alternative 1
Accuracy98.6%
Cost2249
\[\begin{array}{l} t_1 := x \cdot y - \left(z \cdot 9\right) \cdot t\\ \mathbf{if}\;t_1 \leq -4 \cdot 10^{+235} \lor \neg \left(t_1 \leq 4 \cdot 10^{+273}\right):\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right) + \frac{t \cdot -4.5}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_1}{a \cdot 2}\\ \end{array} \]
Alternative 2
Accuracy98.5%
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^{+222}\right):\\ \;\;\;\;\frac{x}{\frac{a \cdot 2}{y}} + \frac{t \cdot -4.5}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a} + 0.5 \cdot \frac{x \cdot y}{a}\\ \end{array} \]
Alternative 3
Accuracy93.3%
Cost2248
\[\begin{array}{l} t_1 := x \cdot y - \left(z \cdot 9\right) \cdot t\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+297}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a} + 0.5 \cdot \frac{x \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{2} \cdot \frac{x}{a}\\ \end{array} \]
Alternative 4
Accuracy98.4%
Cost2248
\[\begin{array}{l} t_1 := x \cdot y - \left(z \cdot 9\right) \cdot t\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{+218}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right) + \frac{z \cdot -9}{a \cdot \frac{2}{t}}\\ \mathbf{elif}\;t_1 \leq 10^{+222}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a} + 0.5 \cdot \frac{x \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{a \cdot 2}{y}} + \frac{t \cdot -4.5}{\frac{a}{z}}\\ \end{array} \]
Alternative 5
Accuracy93.3%
Cost2120
\[\begin{array}{l} t_1 := x \cdot y - \left(z \cdot 9\right) \cdot t\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+297}:\\ \;\;\;\;\frac{t_1}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{2} \cdot \frac{x}{a}\\ \end{array} \]
Alternative 6
Accuracy93.2%
Cost1352
\[\begin{array}{l} \mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+214}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+251}:\\ \;\;\;\;\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x \cdot 0.5}{a}\\ \end{array} \]
Alternative 7
Accuracy61.5%
Cost713
\[\begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{-24} \lor \neg \left(y \leq 4 \cdot 10^{-48}\right):\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \end{array} \]
Alternative 8
Accuracy61.7%
Cost713
\[\begin{array}{l} \mathbf{if}\;y \leq -6.4 \cdot 10^{-24} \lor \neg \left(y \leq 5.2 \cdot 10^{-48}\right):\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \end{array} \]
Alternative 9
Accuracy50.7%
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{+214}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-108}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \end{array} \]
Alternative 10
Accuracy61.7%
Cost712
\[\begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{-24}:\\ \;\;\;\;y \cdot \frac{x \cdot 0.5}{a}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-48}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\ \end{array} \]
Alternative 11
Accuracy49.0%
Cost448
\[-4.5 \cdot \left(z \cdot \frac{t}{a}\right) \]
Alternative 12
Accuracy49.1%
Cost448
\[-4.5 \cdot \frac{t}{\frac{a}{z}} \]

Error

Reproduce?

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