Average Error: 7.7 → 1.1
Time: 16.9s
Precision: binary64
Cost: 2376
\[ \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 := x \cdot \left(y \cdot \frac{0.5}{a}\right)\\ t_2 := x \cdot y + t \cdot \left(z \cdot -9\right)\\ \mathbf{if}\;t_2 \leq -2 \cdot 10^{+215}:\\ \;\;\;\;t_1 - \frac{z}{a \cdot \frac{0.2222222222222222}{t}}\\ \mathbf{elif}\;t_2 \leq 10^{+183}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t \cdot -9\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;t_1 + \frac{z}{a} \cdot \frac{-9}{\frac{2}{t}}\\ \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 (/ 0.5 a)))) (t_2 (+ (* x y) (* t (* z -9.0)))))
   (if (<= t_2 -2e+215)
     (- t_1 (/ z (* a (/ 0.2222222222222222 t))))
     (if (<= t_2 1e+183)
       (/ (+ (* x y) (* z (* t -9.0))) (* a 2.0))
       (+ t_1 (* (/ z a) (/ -9.0 (/ 2.0 t))))))))
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 * (0.5 / a));
	double t_2 = (x * y) + (t * (z * -9.0));
	double tmp;
	if (t_2 <= -2e+215) {
		tmp = t_1 - (z / (a * (0.2222222222222222 / t)));
	} else if (t_2 <= 1e+183) {
		tmp = ((x * y) + (z * (t * -9.0))) / (a * 2.0);
	} else {
		tmp = t_1 + ((z / a) * (-9.0 / (2.0 / t)));
	}
	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 * (y * (0.5d0 / a))
    t_2 = (x * y) + (t * (z * (-9.0d0)))
    if (t_2 <= (-2d+215)) then
        tmp = t_1 - (z / (a * (0.2222222222222222d0 / t)))
    else if (t_2 <= 1d+183) then
        tmp = ((x * y) + (z * (t * (-9.0d0)))) / (a * 2.0d0)
    else
        tmp = t_1 + ((z / a) * ((-9.0d0) / (2.0d0 / t)))
    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 * (y * (0.5 / a));
	double t_2 = (x * y) + (t * (z * -9.0));
	double tmp;
	if (t_2 <= -2e+215) {
		tmp = t_1 - (z / (a * (0.2222222222222222 / t)));
	} else if (t_2 <= 1e+183) {
		tmp = ((x * y) + (z * (t * -9.0))) / (a * 2.0);
	} else {
		tmp = t_1 + ((z / a) * (-9.0 / (2.0 / t)));
	}
	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 * (0.5 / a))
	t_2 = (x * y) + (t * (z * -9.0))
	tmp = 0
	if t_2 <= -2e+215:
		tmp = t_1 - (z / (a * (0.2222222222222222 / t)))
	elif t_2 <= 1e+183:
		tmp = ((x * y) + (z * (t * -9.0))) / (a * 2.0)
	else:
		tmp = t_1 + ((z / a) * (-9.0 / (2.0 / t)))
	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(y * Float64(0.5 / a)))
	t_2 = Float64(Float64(x * y) + Float64(t * Float64(z * -9.0)))
	tmp = 0.0
	if (t_2 <= -2e+215)
		tmp = Float64(t_1 - Float64(z / Float64(a * Float64(0.2222222222222222 / t))));
	elseif (t_2 <= 1e+183)
		tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t * -9.0))) / Float64(a * 2.0));
	else
		tmp = Float64(t_1 + Float64(Float64(z / a) * Float64(-9.0 / Float64(2.0 / t))));
	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 * (0.5 / a));
	t_2 = (x * y) + (t * (z * -9.0));
	tmp = 0.0;
	if (t_2 <= -2e+215)
		tmp = t_1 - (z / (a * (0.2222222222222222 / t)));
	elseif (t_2 <= 1e+183)
		tmp = ((x * y) + (z * (t * -9.0))) / (a * 2.0);
	else
		tmp = t_1 + ((z / a) * (-9.0 / (2.0 / t)));
	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[(y * N[(0.5 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+215], N[(t$95$1 - N[(z / N[(a * N[(0.2222222222222222 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+183], N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(z / a), $MachinePrecision] * N[(-9.0 / N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2}
\begin{array}{l}
t_1 := x \cdot \left(y \cdot \frac{0.5}{a}\right)\\
t_2 := x \cdot y + t \cdot \left(z \cdot -9\right)\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{+215}:\\
\;\;\;\;t_1 - \frac{z}{a \cdot \frac{0.2222222222222222}{t}}\\

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

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


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original7.7
Target5.7
Herbie1.1
\[\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)) < -1.99999999999999981e215

    1. Initial program 30.4

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

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

      \[\leadsto \color{blue}{x \cdot \left(y \cdot \frac{0.5}{a}\right) - \frac{\left(z \cdot 9\right) \cdot \frac{t}{2}}{a}} \]
      Proof
      (-.f64 (*.f64 x (*.f64 y (/.f64 1/2 a))) (/.f64 (*.f64 (*.f64 z 9) (/.f64 t 2)) a)): 0 points increase in error, 0 points decrease in error
      (-.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 x y) (/.f64 1/2 a))) (/.f64 (*.f64 (*.f64 z 9) (/.f64 t 2)) a)): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 (*.f64 x y) (/.f64 1/2 a)) (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 (*.f64 z 9) a) (/.f64 t 2)))): 4 points increase in error, 0 points decrease in error
      (Rewrite=> sub-neg_binary64 (+.f64 (*.f64 (*.f64 x y) (/.f64 1/2 a)) (neg.f64 (*.f64 (/.f64 (*.f64 z 9) a) (/.f64 t 2))))): 0 points increase in error, 4 points decrease in error
    4. Taylor expanded in z around 0 16.4

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

      \[\leadsto x \cdot \left(y \cdot \frac{0.5}{a}\right) - \color{blue}{\frac{z}{a \cdot \frac{0.2222222222222222}{t}}} \]
      Proof
      (-.f64 (*.f64 x (*.f64 y (/.f64 1/2 a))) (/.f64 z (*.f64 a (/.f64 2/9 t)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 x (*.f64 y (/.f64 1/2 a))) (/.f64 z (*.f64 a (/.f64 (Rewrite<= metadata-eval (/.f64 1 9/2)) t)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 x (*.f64 y (/.f64 1/2 a))) (/.f64 z (*.f64 a (Rewrite<= associate-/r*_binary64 (/.f64 1 (*.f64 9/2 t)))))): 8 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 x (*.f64 y (/.f64 1/2 a))) (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 z (/.f64 1 (*.f64 9/2 t))) a))): 0 points increase in error, 8 points decrease in error
      (-.f64 (*.f64 x (*.f64 y (/.f64 1/2 a))) (/.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 z (*.f64 9/2 t)) 1)) a)): 9 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 x (*.f64 y (/.f64 1/2 a))) (/.f64 (Rewrite=> /-rgt-identity_binary64 (*.f64 z (*.f64 9/2 t))) a)): 0 points increase in error, 3 points decrease in error
      (-.f64 (*.f64 x (*.f64 y (/.f64 1/2 a))) (/.f64 (Rewrite=> *-commutative_binary64 (*.f64 (*.f64 9/2 t) z)) a)): 0 points increase in error, 3 points decrease in error
      (-.f64 (*.f64 x (*.f64 y (/.f64 1/2 a))) (/.f64 (Rewrite<= associate-*r*_binary64 (*.f64 9/2 (*.f64 t z))) a)): 0 points increase in error, 3 points decrease in error
      (-.f64 (*.f64 x (*.f64 y (/.f64 1/2 a))) (Rewrite<= associate-*r/_binary64 (*.f64 9/2 (/.f64 (*.f64 t z) a)))): 9 points increase in error, 0 points decrease in error

    if -1.99999999999999981e215 < (-.f64 (*.f64 x y) (*.f64 (*.f64 z 9) t)) < 9.99999999999999947e182

    1. Initial program 0.9

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

      \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}} \]
      Proof
      (/.f64 (-.f64 (*.f64 x y) (*.f64 z (*.f64 9 t))) (*.f64 a 2)): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (*.f64 x y) (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 z 9) t))) (*.f64 a 2)): 0 points increase in error, 0 points decrease in error

    if 9.99999999999999947e182 < (-.f64 (*.f64 x y) (*.f64 (*.f64 z 9) t))

    1. Initial program 26.8

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

      \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}} \]
      Proof
      (/.f64 (-.f64 (*.f64 x y) (*.f64 z (*.f64 9 t))) (*.f64 a 2)): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (*.f64 x y) (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 z 9) t))) (*.f64 a 2)): 0 points increase in error, 0 points decrease in error
    3. Applied egg-rr15.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)} \]
    4. Simplified1.7

      \[\leadsto \color{blue}{x \cdot \left(y \cdot \frac{0.5}{a}\right) - \frac{z}{a} \cdot \frac{9}{\frac{2}{t}}} \]
      Proof
      (-.f64 (*.f64 x (*.f64 y (/.f64 1/2 a))) (*.f64 (/.f64 z a) (/.f64 9 (/.f64 2 t)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 x y) (/.f64 1/2 a))) (*.f64 (/.f64 z a) (/.f64 9 (/.f64 2 t)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 (*.f64 x y) (/.f64 1/2 a)) (*.f64 (/.f64 z a) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 9 t) 2)))): 2 points increase in error, 0 points decrease in error
      (Rewrite=> sub-neg_binary64 (+.f64 (*.f64 (*.f64 x y) (/.f64 1/2 a)) (neg.f64 (*.f64 (/.f64 z a) (/.f64 (*.f64 9 t) 2))))): 0 points increase in error, 2 points decrease in error
  3. Recombined 3 regimes into one program.
  4. Final simplification1.1

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

Alternatives

Alternative 1
Error0.9
Cost2249
\[\begin{array}{l} t_1 := x \cdot y + t \cdot \left(z \cdot -9\right)\\ \mathbf{if}\;t_1 \leq -2 \cdot 10^{+215} \lor \neg \left(t_1 \leq 10^{+281}\right):\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right) - \frac{z}{a \cdot \frac{0.2222222222222222}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t \cdot -9\right)}{a \cdot 2}\\ \end{array} \]
Alternative 2
Error6.1
Cost2120
\[\begin{array}{l} t_1 := x \cdot y + t \cdot \left(z \cdot -9\right)\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{+297}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t \cdot -9\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \frac{y}{\frac{a}{x}}\\ \end{array} \]
Alternative 3
Error24.4
Cost1505
\[\begin{array}{l} t_1 := -4.5 \cdot \frac{t}{\frac{a}{z}}\\ t_2 := 0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{if}\;x \leq -1.95 \cdot 10^{+209}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -8.8 \cdot 10^{+185}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -4.2 \cdot 10^{+39}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -2.2 \cdot 10^{+20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -6200000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -3.45 \cdot 10^{-44}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{-64} \lor \neg \left(x \leq 2.4 \cdot 10^{-120}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \end{array} \]
Alternative 4
Error24.5
Cost1504
\[\begin{array}{l} t_1 := -4.5 \cdot \frac{t}{\frac{a}{z}}\\ t_2 := 0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ t_3 := 0.5 \cdot \frac{y}{\frac{a}{x}}\\ \mathbf{if}\;x \leq -1.95 \cdot 10^{+209}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -8.4 \cdot 10^{+185}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.6 \cdot 10^{+40}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -3.8 \cdot 10^{+20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -6200000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -3.7 \cdot 10^{-45}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;x \leq -7.8 \cdot 10^{-66}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{-155}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 5
Error24.5
Cost1504
\[\begin{array}{l} t_1 := -4.5 \cdot \frac{t}{\frac{a}{z}}\\ t_2 := 0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{if}\;x \leq -4.5 \cdot 10^{+209}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -8.8 \cdot 10^{+185}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -3.7 \cdot 10^{+40}:\\ \;\;\;\;0.5 \cdot \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;x \leq -2.9 \cdot 10^{+20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -6200000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -5.8 \cdot 10^{-46}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;x \leq -2.9 \cdot 10^{-65}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{-155}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x \cdot 0.5}{a}\\ \end{array} \]
Alternative 6
Error24.2
Cost1504
\[\begin{array}{l} t_1 := -4.5 \cdot \frac{t}{\frac{a}{z}}\\ t_2 := \left(x \cdot y\right) \cdot \frac{0.5}{a}\\ \mathbf{if}\;x \leq -2.45 \cdot 10^{+209}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq -8.8 \cdot 10^{+185}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -7.5 \cdot 10^{+40}:\\ \;\;\;\;0.5 \cdot \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;x \leq -3.6 \cdot 10^{+20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -6000000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -3.75 \cdot 10^{-45}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;x \leq -3.1 \cdot 10^{-60}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{-155}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x \cdot 0.5}{a}\\ \end{array} \]
Alternative 7
Error24.2
Cost1504
\[\begin{array}{l} t_1 := \left(x \cdot y\right) \cdot \frac{0.5}{a}\\ \mathbf{if}\;x \leq -2.1 \cdot 10^{+209}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq -4.1 \cdot 10^{+185}:\\ \;\;\;\;\frac{t}{\frac{\frac{a}{-4.5}}{z}}\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{+40}:\\ \;\;\;\;0.5 \cdot \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;x \leq -4 \cdot 10^{+20}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;x \leq -6500000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -8.5 \cdot 10^{-48}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;x \leq -2.3 \cdot 10^{-60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{-155}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x \cdot 0.5}{a}\\ \end{array} \]
Alternative 8
Error24.2
Cost1504
\[\begin{array}{l} t_1 := \left(x \cdot y\right) \cdot \frac{0.5}{a}\\ \mathbf{if}\;x \leq -1.95 \cdot 10^{+209}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq -8.8 \cdot 10^{+185}:\\ \;\;\;\;\frac{t}{\frac{\frac{a}{-4.5}}{z}}\\ \mathbf{elif}\;x \leq -8.2 \cdot 10^{+39}:\\ \;\;\;\;0.5 \cdot \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;x \leq -2.65 \cdot 10^{+20}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;x \leq -5600000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.55 \cdot 10^{-45}:\\ \;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;x \leq -4.6 \cdot 10^{-60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{-155}:\\ \;\;\;\;\frac{z \cdot \left(t \cdot -4.5\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x \cdot 0.5}{a}\\ \end{array} \]
Alternative 9
Error6.1
Cost1092
\[\begin{array}{l} \mathbf{if}\;x \cdot y \leq 5 \cdot 10^{+287}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(x \cdot y + z \cdot \left(t \cdot -9\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \frac{y}{\frac{a}{x}}\\ \end{array} \]
Alternative 10
Error6.0
Cost1092
\[\begin{array}{l} \mathbf{if}\;x \cdot y \leq 5 \cdot 10^{+287}:\\ \;\;\;\;\frac{x \cdot y - 9 \cdot \left(z \cdot t\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \frac{y}{\frac{a}{x}}\\ \end{array} \]
Alternative 11
Error31.7
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+244}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-110}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \end{array} \]
Alternative 12
Error32.5
Cost580
\[\begin{array}{l} \mathbf{if}\;a \leq 5.5 \cdot 10^{+95}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \end{array} \]
Alternative 13
Error32.6
Cost448
\[-4.5 \cdot \left(z \cdot \frac{t}{a}\right) \]

Error

Reproduce

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