Average Error: 24.9 → 6.4
Time: 57.8s
Precision: binary64
Cost: 26896
\[ \begin{array}{c}[x, y] = \mathsf{sort}([x, y])\\ [t, a] = \mathsf{sort}([t, a])\\ \end{array} \]
\[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
\[\begin{array}{l} t_1 := z \cdot z - t \cdot a\\ t_2 := x \cdot \left(y \cdot \left(z \cdot \left({\left(-t\right)}^{-0.5} \cdot {a}^{-0.5}\right)\right)\right)\\ \mathbf{if}\;z \leq -9.593372636256208 \cdot 10^{+112}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-150}:\\ \;\;\;\;x \cdot \left(y \cdot \left(z \cdot {t_1}^{-0.5}\right)\right)\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-248}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 10^{-100}:\\ \;\;\;\;x \cdot {\left(\sqrt[3]{z \cdot \frac{y}{\mathsf{hypot}\left(z, \sqrt{t \cdot \left(-a\right)}\right)}}\right)}^{3}\\ \mathbf{elif}\;z \leq 10^{-71}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+40}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{\sqrt{t_1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{\mathsf{fma}\left(-0.5, t \cdot \frac{a}{z}, z\right)} \cdot \left(y \cdot x\right)\\ \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- (* z z) (* t a)))
        (t_2 (* x (* y (* z (* (pow (- t) -0.5) (pow a -0.5)))))))
   (if (<= z -9.593372636256208e+112)
     (* y (- x))
     (if (<= z -1e-150)
       (* x (* y (* z (pow t_1 -0.5))))
       (if (<= z 2.8e-248)
         t_2
         (if (<= z 1e-100)
           (* x (pow (cbrt (* z (/ y (hypot z (sqrt (* t (- a))))))) 3.0))
           (if (<= z 1e-71)
             t_2
             (if (<= z 8.5e+40)
               (* x (/ (* z y) (sqrt t_1)))
               (* (/ z (fma -0.5 (* t (/ a z)) z)) (* y x))))))))))
double code(double x, double y, double z, double t, double a) {
	return ((x * y) * z) / sqrt(((z * z) - (t * a)));
}
double code(double x, double y, double z, double t, double a) {
	double t_1 = (z * z) - (t * a);
	double t_2 = x * (y * (z * (pow(-t, -0.5) * pow(a, -0.5))));
	double tmp;
	if (z <= -9.593372636256208e+112) {
		tmp = y * -x;
	} else if (z <= -1e-150) {
		tmp = x * (y * (z * pow(t_1, -0.5)));
	} else if (z <= 2.8e-248) {
		tmp = t_2;
	} else if (z <= 1e-100) {
		tmp = x * pow(cbrt((z * (y / hypot(z, sqrt((t * -a)))))), 3.0);
	} else if (z <= 1e-71) {
		tmp = t_2;
	} else if (z <= 8.5e+40) {
		tmp = x * ((z * y) / sqrt(t_1));
	} else {
		tmp = (z / fma(-0.5, (t * (a / z)), z)) * (y * x);
	}
	return tmp;
}
function code(x, y, z, t, a)
	return Float64(Float64(Float64(x * y) * z) / sqrt(Float64(Float64(z * z) - Float64(t * a))))
end
function code(x, y, z, t, a)
	t_1 = Float64(Float64(z * z) - Float64(t * a))
	t_2 = Float64(x * Float64(y * Float64(z * Float64((Float64(-t) ^ -0.5) * (a ^ -0.5)))))
	tmp = 0.0
	if (z <= -9.593372636256208e+112)
		tmp = Float64(y * Float64(-x));
	elseif (z <= -1e-150)
		tmp = Float64(x * Float64(y * Float64(z * (t_1 ^ -0.5))));
	elseif (z <= 2.8e-248)
		tmp = t_2;
	elseif (z <= 1e-100)
		tmp = Float64(x * (cbrt(Float64(z * Float64(y / hypot(z, sqrt(Float64(t * Float64(-a))))))) ^ 3.0));
	elseif (z <= 1e-71)
		tmp = t_2;
	elseif (z <= 8.5e+40)
		tmp = Float64(x * Float64(Float64(z * y) / sqrt(t_1)));
	else
		tmp = Float64(Float64(z / fma(-0.5, Float64(t * Float64(a / z)), z)) * Float64(y * x));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(y * N[(z * N[(N[Power[(-t), -0.5], $MachinePrecision] * N[Power[a, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.593372636256208e+112], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, -1e-150], N[(x * N[(y * N[(z * N[Power[t$95$1, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e-248], t$95$2, If[LessEqual[z, 1e-100], N[(x * N[Power[N[Power[N[(z * N[(y / N[Sqrt[z ^ 2 + N[Sqrt[N[(t * (-a)), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e-71], t$95$2, If[LessEqual[z, 8.5e+40], N[(x * N[(N[(z * y), $MachinePrecision] / N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / N[(-0.5 * N[(t * N[(a / z), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] * N[(y * x), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}
\begin{array}{l}
t_1 := z \cdot z - t \cdot a\\
t_2 := x \cdot \left(y \cdot \left(z \cdot \left({\left(-t\right)}^{-0.5} \cdot {a}^{-0.5}\right)\right)\right)\\
\mathbf{if}\;z \leq -9.593372636256208 \cdot 10^{+112}:\\
\;\;\;\;y \cdot \left(-x\right)\\

\mathbf{elif}\;z \leq -1 \cdot 10^{-150}:\\
\;\;\;\;x \cdot \left(y \cdot \left(z \cdot {t_1}^{-0.5}\right)\right)\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{-248}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 10^{-100}:\\
\;\;\;\;x \cdot {\left(\sqrt[3]{z \cdot \frac{y}{\mathsf{hypot}\left(z, \sqrt{t \cdot \left(-a\right)}\right)}}\right)}^{3}\\

\mathbf{elif}\;z \leq 10^{-71}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 8.5 \cdot 10^{+40}:\\
\;\;\;\;x \cdot \frac{z \cdot y}{\sqrt{t_1}}\\

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


\end{array}

Error

Target

Original24.9
Target7.8
Herbie6.4
\[\begin{array}{l} \mathbf{if}\;z < -3.1921305903852764 \cdot 10^{+46}:\\ \;\;\;\;-y \cdot x\\ \mathbf{elif}\;z < 5.976268120920894 \cdot 10^{+90}:\\ \;\;\;\;\frac{x \cdot z}{\frac{\sqrt{z \cdot z - a \cdot t}}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Derivation

  1. Split input into 6 regimes
  2. if z < -9.59337263625620788e112

    1. Initial program 45.6

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Taylor expanded in z around -inf 18.9

      \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{-1 \cdot z}} \]
    3. Simplified18.9

      \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{-z}} \]
      Proof
      (neg.f64 z): 0 points increase in error, 0 points decrease in error
      (Rewrite<= mul-1-neg_binary64 (*.f64 -1 z)): 0 points increase in error, 0 points decrease in error
    4. Taylor expanded in x around 0 2.1

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot x\right)} \]
    5. Simplified2.1

      \[\leadsto \color{blue}{y \cdot \left(-x\right)} \]
      Proof
      (*.f64 y (neg.f64 x)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 y x))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (*.f64 y x))): 0 points increase in error, 0 points decrease in error

    if -9.59337263625620788e112 < z < -1.00000000000000001e-150

    1. Initial program 7.4

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

      \[\leadsto \color{blue}{x \cdot \frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
      Proof
      (*.f64 x (/.f64 (*.f64 y z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))): 0 points increase in error, 0 points decrease in error
      (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 x (*.f64 y z)) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))): 44 points increase in error, 14 points decrease in error
      (/.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 x y) z)) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))): 10 points increase in error, 40 points decrease in error
    3. Applied egg-rr4.9

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

    if -1.00000000000000001e-150 < z < 2.8000000000000001e-248 or 1e-100 < z < 9.9999999999999992e-72

    1. Initial program 16.7

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Simplified15.5

      \[\leadsto \color{blue}{x \cdot \frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
      Proof
      (*.f64 x (/.f64 (*.f64 y z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))): 0 points increase in error, 0 points decrease in error
      (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 x (*.f64 y z)) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))): 44 points increase in error, 14 points decrease in error
      (/.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 x y) z)) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))): 10 points increase in error, 40 points decrease in error
    3. Applied egg-rr16.4

      \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(z \cdot {\left(z \cdot z - t \cdot a\right)}^{-0.5}\right)\right)} \]
    4. Taylor expanded in a around inf 16.7

      \[\leadsto x \cdot \left(y \cdot \left(z \cdot \color{blue}{e^{-0.5 \cdot \left(\log \left(-t\right) + -1 \cdot \log \left(\frac{1}{a}\right)\right)}}\right)\right) \]
    5. Simplified14.9

      \[\leadsto x \cdot \left(y \cdot \left(z \cdot \color{blue}{\left({\left(-t\right)}^{-0.5} \cdot {a}^{-0.5}\right)}\right)\right) \]
      Proof
      (*.f64 (pow.f64 (neg.f64 t) -1/2) (pow.f64 a -1/2)): 0 points increase in error, 0 points decrease in error
      (*.f64 (Rewrite<= exp-to-pow_binary64 (exp.f64 (*.f64 (log.f64 (neg.f64 t)) -1/2))) (pow.f64 a -1/2)): 79 points increase in error, 83 points decrease in error
      (*.f64 (exp.f64 (*.f64 (log.f64 (neg.f64 t)) -1/2)) (Rewrite<= exp-to-pow_binary64 (exp.f64 (*.f64 (log.f64 a) -1/2)))): 75 points increase in error, 87 points decrease in error
      (*.f64 (exp.f64 (*.f64 (log.f64 (neg.f64 t)) -1/2)) (exp.f64 (*.f64 (Rewrite<= remove-double-neg_binary64 (neg.f64 (neg.f64 (log.f64 a)))) -1/2))): 0 points increase in error, 0 points decrease in error
      (*.f64 (exp.f64 (*.f64 (log.f64 (neg.f64 t)) -1/2)) (exp.f64 (*.f64 (neg.f64 (Rewrite<= log-rec_binary64 (log.f64 (/.f64 1 a)))) -1/2))): 0 points increase in error, 0 points decrease in error
      (*.f64 (exp.f64 (*.f64 (log.f64 (neg.f64 t)) -1/2)) (exp.f64 (*.f64 (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (log.f64 (/.f64 1 a)))) -1/2))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= exp-sum_binary64 (exp.f64 (+.f64 (*.f64 (log.f64 (neg.f64 t)) -1/2) (*.f64 (*.f64 -1 (log.f64 (/.f64 1 a))) -1/2)))): 59 points increase in error, 53 points decrease in error
      (exp.f64 (Rewrite<= distribute-rgt-in_binary64 (*.f64 -1/2 (+.f64 (log.f64 (neg.f64 t)) (*.f64 -1 (log.f64 (/.f64 1 a))))))): 0 points increase in error, 0 points decrease in error

    if 2.8000000000000001e-248 < z < 1e-100

    1. Initial program 15.6

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

      \[\leadsto \color{blue}{x \cdot \frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
      Proof
      (*.f64 x (/.f64 (*.f64 y z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))): 0 points increase in error, 0 points decrease in error
      (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 x (*.f64 y z)) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))): 44 points increase in error, 14 points decrease in error
      (/.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 x y) z)) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))): 10 points increase in error, 40 points decrease in error
    3. Applied egg-rr13.0

      \[\leadsto x \cdot \color{blue}{{\left(\sqrt[3]{\frac{y}{\mathsf{hypot}\left(z, \sqrt{t \cdot \left(-a\right)}\right)} \cdot z}\right)}^{3}} \]

    if 9.9999999999999992e-72 < z < 8.49999999999999996e40

    1. Initial program 6.4

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Simplified6.6

      \[\leadsto \color{blue}{x \cdot \frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
      Proof
      (*.f64 x (/.f64 (*.f64 y z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))): 0 points increase in error, 0 points decrease in error
      (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 x (*.f64 y z)) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))): 44 points increase in error, 14 points decrease in error
      (/.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 x y) z)) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))): 10 points increase in error, 40 points decrease in error

    if 8.49999999999999996e40 < z

    1. Initial program 35.9

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Taylor expanded in z around inf 19.6

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

      \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{\mathsf{fma}\left(-0.5, \frac{a}{z} \cdot t, z\right)}} \]
      Proof
      (fma.f64 -1/2 (*.f64 (/.f64 a z) t) z): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/2 (Rewrite<= associate-/r/_binary64 (/.f64 a (/.f64 z t))) z): 19 points increase in error, 15 points decrease in error
      (fma.f64 -1/2 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 a t) z)) z): 14 points increase in error, 19 points decrease in error
      (Rewrite<= fma-def_binary64 (+.f64 (*.f64 -1/2 (/.f64 (*.f64 a t) z)) z)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= +-commutative_binary64 (+.f64 z (*.f64 -1/2 (/.f64 (*.f64 a t) z)))): 0 points increase in error, 0 points decrease in error
    4. Applied egg-rr3.7

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.593372636256208 \cdot 10^{+112}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-150}:\\ \;\;\;\;x \cdot \left(y \cdot \left(z \cdot {\left(z \cdot z - t \cdot a\right)}^{-0.5}\right)\right)\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-248}:\\ \;\;\;\;x \cdot \left(y \cdot \left(z \cdot \left({\left(-t\right)}^{-0.5} \cdot {a}^{-0.5}\right)\right)\right)\\ \mathbf{elif}\;z \leq 10^{-100}:\\ \;\;\;\;x \cdot {\left(\sqrt[3]{z \cdot \frac{y}{\mathsf{hypot}\left(z, \sqrt{t \cdot \left(-a\right)}\right)}}\right)}^{3}\\ \mathbf{elif}\;z \leq 10^{-71}:\\ \;\;\;\;x \cdot \left(y \cdot \left(z \cdot \left({\left(-t\right)}^{-0.5} \cdot {a}^{-0.5}\right)\right)\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+40}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{\sqrt{z \cdot z - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{\mathsf{fma}\left(-0.5, t \cdot \frac{a}{z}, z\right)} \cdot \left(y \cdot x\right)\\ \end{array} \]

Alternatives

Alternative 1
Error6.5
Cost26832
\[\begin{array}{l} t_1 := z \cdot z - t \cdot a\\ t_2 := x \cdot \left(y \cdot \left(z \cdot \left({\left(-t\right)}^{-0.5} \cdot {a}^{-0.5}\right)\right)\right)\\ \mathbf{if}\;z \leq -9.593372636256208 \cdot 10^{+112}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-150}:\\ \;\;\;\;x \cdot \left(y \cdot \left(z \cdot {t_1}^{-0.5}\right)\right)\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-248}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 10^{-100}:\\ \;\;\;\;\frac{z \cdot \left(y \cdot x\right)}{e^{\log \left(\mathsf{hypot}\left(z, \sqrt{t \cdot \left(-a\right)}\right)\right)}}\\ \mathbf{elif}\;z \leq 10^{-71}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+40}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{\sqrt{t_1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{\mathsf{fma}\left(-0.5, t \cdot \frac{a}{z}, z\right)} \cdot \left(y \cdot x\right)\\ \end{array} \]
Alternative 2
Error6.9
Cost13964
\[\begin{array}{l} t_1 := z \cdot z - t \cdot a\\ \mathbf{if}\;z \leq -9.593372636256208 \cdot 10^{+112}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-150}:\\ \;\;\;\;x \cdot \left(y \cdot \left(z \cdot {t_1}^{-0.5}\right)\right)\\ \mathbf{elif}\;z \leq 10^{-71}:\\ \;\;\;\;x \cdot \left(y \cdot \left(z \cdot \left({\left(-t\right)}^{-0.5} \cdot {a}^{-0.5}\right)\right)\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+40}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{\sqrt{t_1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{\mathsf{fma}\left(-0.5, t \cdot \frac{a}{z}, z\right)} \cdot \left(y \cdot x\right)\\ \end{array} \]
Alternative 3
Error6.7
Cost7560
\[\begin{array}{l} \mathbf{if}\;z \leq -9.593372636256208 \cdot 10^{+112}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+40}:\\ \;\;\;\;x \cdot \left(y \cdot \left(z \cdot {\left(z \cdot z - t \cdot a\right)}^{-0.5}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
Alternative 4
Error6.6
Cost7560
\[\begin{array}{l} \mathbf{if}\;z \leq -9.593372636256208 \cdot 10^{+112}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+40}:\\ \;\;\;\;x \cdot \left(y \cdot \left(z \cdot {\left(z \cdot z - t \cdot a\right)}^{-0.5}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{\mathsf{fma}\left(-0.5, t \cdot \frac{a}{z}, z\right)} \cdot \left(y \cdot x\right)\\ \end{array} \]
Alternative 5
Error7.9
Cost7496
\[\begin{array}{l} \mathbf{if}\;z \leq -3400000000000:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+40}:\\ \;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{\sqrt{z \cdot z - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
Alternative 6
Error7.9
Cost7496
\[\begin{array}{l} \mathbf{if}\;z \leq -3400000000000:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+40}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{\sqrt{z \cdot z - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
Alternative 7
Error7.4
Cost7496
\[\begin{array}{l} \mathbf{if}\;z \leq -5.725399653063007 \cdot 10^{+110}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+40}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{\sqrt{z \cdot z - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
Alternative 8
Error12.0
Cost7368
\[\begin{array}{l} \mathbf{if}\;z \leq -4.7 \cdot 10^{-92}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-72}:\\ \;\;\;\;x \cdot \left(y \cdot \left(z \cdot {\left(t \cdot \left(-a\right)\right)}^{-0.5}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
Alternative 9
Error11.9
Cost7304
\[\begin{array}{l} \mathbf{if}\;z \leq -4.7 \cdot 10^{-92}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-72}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{\sqrt{t \cdot \left(-a\right)}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
Alternative 10
Error11.9
Cost7304
\[\begin{array}{l} \mathbf{if}\;z \leq -4.7 \cdot 10^{-92}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-72}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{\sqrt{t \cdot \left(-a\right)}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
Alternative 11
Error16.2
Cost1224
\[\begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{-212}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 48:\\ \;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{z + -0.5 \cdot \frac{t \cdot a}{z}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
Alternative 12
Error16.1
Cost1224
\[\begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{-212}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 48:\\ \;\;\;\;x \cdot \frac{z \cdot y}{z + -0.5 \cdot \frac{t \cdot a}{z}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
Alternative 13
Error16.1
Cost1224
\[\begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{-212}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+40}:\\ \;\;\;\;\frac{z \cdot \left(y \cdot x\right)}{z + -0.5 \cdot \frac{t \cdot a}{z}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
Alternative 14
Error17.2
Cost968
\[\begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{-238}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-85}:\\ \;\;\;\;\left(1 + \left(y \cdot x\right) \cdot \frac{z}{z}\right) + -1\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
Alternative 15
Error17.6
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{-238}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-231}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
Alternative 16
Error17.5
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{-268}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-85}:\\ \;\;\;\;\frac{z \cdot \left(y \cdot x\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
Alternative 17
Error19.0
Cost388
\[\begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{-307}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
Alternative 18
Error36.4
Cost192
\[y \cdot x \]

Error

Reproduce

herbie shell --seed 2022318 
(FPCore (x y z t a)
  :name "Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2"
  :precision binary64

  :herbie-target
  (if (< z -3.1921305903852764e+46) (- (* y x)) (if (< z 5.976268120920894e+90) (/ (* x z) (/ (sqrt (- (* z z) (* a t))) y)) (* y x)))

  (/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))