Average Error: 7.9 → 0.9
Time: 16.9s
Precision: binary64
Cost: 8520
\[ \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 := 0.5 \cdot \mathsf{fma}\left(-9, \frac{z}{\frac{a}{t}}, y \cdot \frac{x}{a}\right)\\ t_2 := x \cdot y + t \cdot \left(z \cdot -9\right)\\ \mathbf{if}\;t_2 \leq -4 \cdot 10^{+175}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{+244}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t \cdot -9\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \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 (* 0.5 (fma -9.0 (/ z (/ a t)) (* y (/ x a)))))
        (t_2 (+ (* x y) (* t (* z -9.0)))))
   (if (<= t_2 -4e+175)
     t_1
     (if (<= t_2 4e+244) (/ (+ (* x y) (* z (* t -9.0))) (* a 2.0)) t_1))))
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 = 0.5 * fma(-9.0, (z / (a / t)), (y * (x / a)));
	double t_2 = (x * y) + (t * (z * -9.0));
	double tmp;
	if (t_2 <= -4e+175) {
		tmp = t_1;
	} else if (t_2 <= 4e+244) {
		tmp = ((x * y) + (z * (t * -9.0))) / (a * 2.0);
	} else {
		tmp = t_1;
	}
	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(0.5 * fma(-9.0, Float64(z / Float64(a / t)), Float64(y * Float64(x / a))))
	t_2 = Float64(Float64(x * y) + Float64(t * Float64(z * -9.0)))
	tmp = 0.0
	if (t_2 <= -4e+175)
		tmp = t_1;
	elseif (t_2 <= 4e+244)
		tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t * -9.0))) / Float64(a * 2.0));
	else
		tmp = t_1;
	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[(0.5 * N[(-9.0 * N[(z / N[(a / t), $MachinePrecision]), $MachinePrecision] + N[(y * N[(x / a), $MachinePrecision]), $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, -4e+175], t$95$1, If[LessEqual[t$95$2, 4e+244], N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2}
\begin{array}{l}
t_1 := 0.5 \cdot \mathsf{fma}\left(-9, \frac{z}{\frac{a}{t}}, y \cdot \frac{x}{a}\right)\\
t_2 := x \cdot y + t \cdot \left(z \cdot -9\right)\\
\mathbf{if}\;t_2 \leq -4 \cdot 10^{+175}:\\
\;\;\;\;t_1\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}

Error

Target

Original7.9
Target6.0
Herbie0.9
\[\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 2 regimes
  2. if (-.f64 (*.f64 x y) (*.f64 (*.f64 z 9) t)) < -3.9999999999999997e175 or 4.0000000000000003e244 < (-.f64 (*.f64 x y) (*.f64 (*.f64 z 9) t))

    1. Initial program 30.0

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

      \[\leadsto \color{blue}{0.5 \cdot \frac{\mathsf{fma}\left(x, y, z \cdot \left(t \cdot -9\right)\right)}{a}} \]
      Proof
      (*.f64 1/2 (/.f64 (fma.f64 x y (*.f64 z (*.f64 t -9))) a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (Rewrite<= metadata-eval (/.f64 1 2)) (/.f64 (fma.f64 x y (*.f64 z (*.f64 t -9))) a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (Rewrite<= metadata-eval (neg.f64 -1)) 2) (/.f64 (fma.f64 x y (*.f64 z (*.f64 t -9))) a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (neg.f64 -1) 2) (/.f64 (fma.f64 x y (*.f64 z (*.f64 t (Rewrite<= metadata-eval (neg.f64 9))))) a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (neg.f64 -1) 2) (/.f64 (fma.f64 x y (*.f64 z (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 t 9))))) a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (neg.f64 -1) 2) (/.f64 (fma.f64 x y (*.f64 z (neg.f64 (Rewrite<= *-commutative_binary64 (*.f64 9 t))))) a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (neg.f64 -1) 2) (/.f64 (fma.f64 x y (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 z (*.f64 9 t))))) a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (neg.f64 -1) 2) (/.f64 (fma.f64 x y (neg.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 z 9) t)))) a)): 20 points increase in error, 10 points decrease in error
      (*.f64 (/.f64 (neg.f64 -1) 2) (/.f64 (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 x y) (*.f64 (*.f64 z 9) t))) a)): 1 points increase in error, 1 points decrease in error
      (*.f64 (/.f64 (neg.f64 -1) 2) (/.f64 (-.f64 (Rewrite<= +-rgt-identity_binary64 (+.f64 (*.f64 x y) 0)) (*.f64 (*.f64 z 9) t)) a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (neg.f64 -1) 2) (Rewrite=> div-sub_binary64 (-.f64 (/.f64 (+.f64 (*.f64 x y) 0) a) (/.f64 (*.f64 (*.f64 z 9) t) a)))): 0 points increase in error, 2 points decrease in error
      (*.f64 (/.f64 (neg.f64 -1) 2) (-.f64 (/.f64 (Rewrite=> +-rgt-identity_binary64 (*.f64 x y)) a) (/.f64 (*.f64 (*.f64 z 9) t) a))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (neg.f64 -1) 2) (Rewrite<= div-sub_binary64 (/.f64 (-.f64 (*.f64 x y) (*.f64 (*.f64 z 9) t)) a))): 2 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (neg.f64 -1) 2) (/.f64 (Rewrite=> sub-neg_binary64 (+.f64 (*.f64 x y) (neg.f64 (*.f64 (*.f64 z 9) t)))) a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (neg.f64 -1) 2) (/.f64 (+.f64 (Rewrite<= remove-double-neg_binary64 (neg.f64 (neg.f64 (*.f64 x y)))) (neg.f64 (*.f64 (*.f64 z 9) t))) a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (neg.f64 -1) 2) (/.f64 (Rewrite<= distribute-neg-in_binary64 (neg.f64 (+.f64 (neg.f64 (*.f64 x y)) (*.f64 (*.f64 z 9) t)))) a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (neg.f64 -1) 2) (/.f64 (neg.f64 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 (*.f64 z 9) t) (neg.f64 (*.f64 x y))))) a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (neg.f64 -1) 2) (/.f64 (neg.f64 (Rewrite<= sub-neg_binary64 (-.f64 (*.f64 (*.f64 z 9) t) (*.f64 x y)))) a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (neg.f64 -1) 2) (Rewrite=> distribute-frac-neg_binary64 (neg.f64 (/.f64 (-.f64 (*.f64 (*.f64 z 9) t) (*.f64 x y)) a)))): 0 points increase in error, 0 points decrease in error
      (Rewrite=> distribute-rgt-neg-out_binary64 (neg.f64 (*.f64 (/.f64 (neg.f64 -1) 2) (/.f64 (-.f64 (*.f64 (*.f64 z 9) t) (*.f64 x y)) a)))): 0 points increase in error, 0 points decrease in error
      (neg.f64 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 (neg.f64 -1) (-.f64 (*.f64 (*.f64 z 9) t) (*.f64 x y))) (*.f64 2 a)))): 0 points increase in error, 1 points decrease in error
      (neg.f64 (/.f64 (*.f64 (Rewrite=> metadata-eval 1) (-.f64 (*.f64 (*.f64 z 9) t) (*.f64 x y))) (*.f64 2 a))): 0 points increase in error, 0 points decrease in error
      (neg.f64 (/.f64 (Rewrite=> *-lft-identity_binary64 (-.f64 (*.f64 (*.f64 z 9) t) (*.f64 x y))) (*.f64 2 a))): 0 points increase in error, 0 points decrease in error
      (neg.f64 (/.f64 (-.f64 (*.f64 (*.f64 z 9) t) (*.f64 x y)) (Rewrite<= *-commutative_binary64 (*.f64 a 2)))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= distribute-frac-neg_binary64 (/.f64 (neg.f64 (-.f64 (*.f64 (*.f64 z 9) t) (*.f64 x y))) (*.f64 a 2))): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= sub0-neg_binary64 (-.f64 0 (-.f64 (*.f64 (*.f64 z 9) t) (*.f64 x y)))) (*.f64 a 2)): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 0 (*.f64 (*.f64 z 9) t)) (*.f64 x y))) (*.f64 a 2)): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (Rewrite<= neg-sub0_binary64 (neg.f64 (*.f64 (*.f64 z 9) t))) (*.f64 x y)) (*.f64 a 2)): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (Rewrite<= distribute-lft-neg-out_binary64 (*.f64 (neg.f64 (*.f64 z 9)) t)) (*.f64 x y)) (*.f64 a 2)): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 x y) (*.f64 (neg.f64 (*.f64 z 9)) t))) (*.f64 a 2)): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= cancel-sign-sub-inv_binary64 (-.f64 (*.f64 x y) (*.f64 (*.f64 z 9) t))) (*.f64 a 2)): 0 points increase in error, 0 points decrease in error
    3. Taylor expanded in x around 0 29.8

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

      \[\leadsto 0.5 \cdot \color{blue}{\mathsf{fma}\left(-9, \frac{z}{\frac{a}{t}}, y \cdot \frac{x}{a}\right)} \]
      Proof
      (fma.f64 -9 (/.f64 z (/.f64 a t)) (*.f64 y (/.f64 x a))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -9 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 z t) a)) (*.f64 y (/.f64 x a))): 39 points increase in error, 26 points decrease in error
      (fma.f64 -9 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 t z)) a) (*.f64 y (/.f64 x a))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -9 (/.f64 (*.f64 t z) a) (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 y x) a))): 28 points increase in error, 29 points decrease in error
      (Rewrite<= fma-def_binary64 (+.f64 (*.f64 -9 (/.f64 (*.f64 t z) a)) (/.f64 (*.f64 y x) a))): 3 points increase in error, 3 points decrease in error

    if -3.9999999999999997e175 < (-.f64 (*.f64 x y) (*.f64 (*.f64 z 9) t)) < 4.0000000000000003e244

    1. Initial program 0.8

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

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

      \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot \left(t \cdot 9\right)}}{a \cdot 2} \]
      Proof
      (*.f64 z (*.f64 t 9)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 z t) 9)): 36 points increase in error, 40 points decrease in error
      (*.f64 (Rewrite<= *-commutative_binary64 (*.f64 t z)) 9): 0 points increase in error, 0 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 9 (*.f64 t z))): 0 points increase in error, 0 points decrease in error
  3. Recombined 2 regimes into one program.
  4. Final simplification0.9

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

Alternatives

Alternative 1
Error1.0
Cost2760
\[\begin{array}{l} t_1 := 0.5 \cdot \left(y \cdot \frac{x}{a} + -9 \cdot \left(z \cdot \frac{t}{a}\right)\right)\\ t_2 := \frac{x \cdot y + t \cdot \left(z \cdot -9\right)}{a \cdot 2}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq 10^{+290}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t \cdot -9\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error4.3
Cost2120
\[\begin{array}{l} t_1 := x \cdot y + t \cdot \left(z \cdot -9\right)\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{x \cdot \frac{y}{a}}{2}\\ \mathbf{elif}\;t_1 \leq 10^{+294}:\\ \;\;\;\;\frac{x \cdot y + z \cdot \left(t \cdot -9\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z \cdot \frac{-4.5}{a}\right)\\ \end{array} \]
Alternative 3
Error26.7
Cost1504
\[\begin{array}{l} t_1 := -4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ t_2 := \frac{x \cdot \frac{y}{a}}{2}\\ \mathbf{if}\;z \leq -3 \cdot 10^{+81}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{+59}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -5.078567843735174 \cdot 10^{-77}:\\ \;\;\;\;t \cdot \left(z \cdot \frac{-4.5}{a}\right)\\ \mathbf{elif}\;z \leq -3.0885104819956485 \cdot 10^{-110}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.977735304782181 \cdot 10^{-180}:\\ \;\;\;\;\frac{z \cdot \left(t \cdot -4.5\right)}{a}\\ \mathbf{elif}\;z \leq 6.2585830831467165 \cdot 10^{-223}:\\ \;\;\;\;\frac{\frac{x \cdot y}{a}}{2}\\ \mathbf{elif}\;z \leq 7.118634105368095 \cdot 10^{-183}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.7817797922750637 \cdot 10^{-147}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error25.7
Cost1240
\[\begin{array}{l} t_1 := \frac{x \cdot \frac{y}{a}}{2}\\ t_2 := t \cdot \left(z \cdot \frac{-4.5}{a}\right)\\ t_3 := \frac{z \cdot \left(t \cdot -4.5\right)}{a}\\ \mathbf{if}\;t \leq -1.4070084008218308 \cdot 10^{-154}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.8016239397804074 \cdot 10^{-95}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.0153873648796613 \cdot 10^{-21}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 3.5640609540202397:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 10^{+202}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 10^{+285}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error25.1
Cost1240
\[\begin{array}{l} t_1 := \frac{\frac{x \cdot y}{a}}{2}\\ t_2 := t \cdot \left(z \cdot \frac{-4.5}{a}\right)\\ t_3 := \frac{z \cdot \left(t \cdot -4.5\right)}{a}\\ \mathbf{if}\;t \leq -1.4070084008218308 \cdot 10^{-154}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.8016239397804074 \cdot 10^{-95}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.750167281289854 \cdot 10^{-14}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 426638915198.51843:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 10^{+202}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 10^{+285}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error24.9
Cost1240
\[\begin{array}{l} t_1 := \frac{y}{\frac{a}{\frac{x}{2}}}\\ t_2 := \frac{z \cdot \left(t \cdot -4.5\right)}{a}\\ \mathbf{if}\;t \leq -1.906795633342993 \cdot 10^{-156}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;t \leq 1.8016239397804074 \cdot 10^{-95}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4.6895457389654756 \cdot 10^{-39}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 426638915198.51843:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 10^{+202}:\\ \;\;\;\;\frac{t \cdot -4.5}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 10^{+285}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z \cdot \frac{-4.5}{a}\right)\\ \end{array} \]
Alternative 7
Error24.9
Cost1240
\[\begin{array}{l} t_1 := \frac{y}{\frac{a}{\frac{x}{2}}}\\ \mathbf{if}\;t \leq -1.906795633342993 \cdot 10^{-156}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;t \leq 1.8016239397804074 \cdot 10^{-95}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4.6895457389654756 \cdot 10^{-39}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{elif}\;t \leq 426638915198.51843:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 10^{+202}:\\ \;\;\;\;\frac{t \cdot -4.5}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 10^{+285}:\\ \;\;\;\;\frac{z \cdot \left(t \cdot -4.5\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z \cdot \frac{-4.5}{a}\right)\\ \end{array} \]
Alternative 8
Error25.0
Cost1240
\[\begin{array}{l} \mathbf{if}\;t \leq -1.906795633342993 \cdot 10^{-156}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;t \leq 1.8016239397804074 \cdot 10^{-95}:\\ \;\;\;\;\frac{y}{\frac{a}{\frac{x}{2}}}\\ \mathbf{elif}\;t \leq 4.6895457389654756 \cdot 10^{-39}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{elif}\;t \leq 426638915198.51843:\\ \;\;\;\;y \cdot \frac{x}{\frac{a}{0.5}}\\ \mathbf{elif}\;t \leq 10^{+202}:\\ \;\;\;\;\frac{t \cdot -4.5}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 10^{+285}:\\ \;\;\;\;\frac{z \cdot \left(t \cdot -4.5\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z \cdot \frac{-4.5}{a}\right)\\ \end{array} \]
Alternative 9
Error24.3
Cost1104
\[\begin{array}{l} \mathbf{if}\;t \leq -1.906795633342993 \cdot 10^{-156}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;t \leq 1.8016239397804074 \cdot 10^{-95}:\\ \;\;\;\;\frac{y}{\frac{a}{\frac{x}{2}}}\\ \mathbf{elif}\;t \leq 4.6895457389654756 \cdot 10^{-39}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{elif}\;t \leq 426638915198.51843:\\ \;\;\;\;y \cdot \frac{x}{\frac{a}{0.5}}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(-9 \cdot \frac{z}{\frac{a}{t}}\right)\\ \end{array} \]
Alternative 10
Error24.3
Cost976
\[\begin{array}{l} t_1 := t \cdot \left(z \cdot \frac{-4.5}{a}\right)\\ t_2 := \frac{x \cdot \frac{y}{a}}{2}\\ \mathbf{if}\;y \leq -3.7505881839280476 \cdot 10^{-138}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+53}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{+68}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+111}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error24.2
Cost976
\[\begin{array}{l} t_1 := \frac{y}{\frac{a}{\frac{x}{2}}}\\ \mathbf{if}\;t \leq -1.906795633342993 \cdot 10^{-156}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;t \leq 1.8016239397804074 \cdot 10^{-95}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4.6895457389654756 \cdot 10^{-39}:\\ \;\;\;\;\frac{z \cdot \left(t \cdot -4.5\right)}{a}\\ \mathbf{elif}\;t \leq 426638915198.51843:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z \cdot \frac{-4.5}{a}\right)\\ \end{array} \]
Alternative 12
Error33.6
Cost448
\[t \cdot \left(z \cdot \frac{-4.5}{a}\right) \]

Error

Reproduce

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