Average Error: 24.7 → 5.8
Time: 2.2min
Precision: binary64
Cost: 20292
\[ \begin{array}{c}[x, y] = \mathsf{sort}([x, y])\\ \end{array} \]
\[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
\[\begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+57}:\\ \;\;\;\;\frac{x \cdot y}{\mathsf{fma}\left(-0.5, \frac{a}{\left|z\right|} \cdot \frac{t}{z}, \frac{\left|z\right|}{z}\right)}\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-165}:\\ \;\;\;\;\frac{x \cdot y}{\frac{\sqrt{z \cdot z - a \cdot t}}{z}}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-70}:\\ \;\;\;\;y \cdot \left(z \cdot \frac{x}{\mathsf{hypot}\left(z, \sqrt{a \cdot \left(-t\right)}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\sqrt{1 - \frac{t}{z} \cdot \frac{a}{z}}}\\ \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
 (if (<= z -2e+57)
   (/ (* x y) (fma -0.5 (* (/ a (fabs z)) (/ t z)) (/ (fabs z) z)))
   (if (<= z -9.5e-165)
     (/ (* x y) (/ (sqrt (- (* z z) (* a t))) z))
     (if (<= z 6e-70)
       (* y (* z (/ x (hypot z (sqrt (* a (- t)))))))
       (/ (* x y) (sqrt (- 1.0 (* (/ t z) (/ a z)))))))))
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 tmp;
	if (z <= -2e+57) {
		tmp = (x * y) / fma(-0.5, ((a / fabs(z)) * (t / z)), (fabs(z) / z));
	} else if (z <= -9.5e-165) {
		tmp = (x * y) / (sqrt(((z * z) - (a * t))) / z);
	} else if (z <= 6e-70) {
		tmp = y * (z * (x / hypot(z, sqrt((a * -t)))));
	} else {
		tmp = (x * y) / sqrt((1.0 - ((t / z) * (a / z))));
	}
	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)
	tmp = 0.0
	if (z <= -2e+57)
		tmp = Float64(Float64(x * y) / fma(-0.5, Float64(Float64(a / abs(z)) * Float64(t / z)), Float64(abs(z) / z)));
	elseif (z <= -9.5e-165)
		tmp = Float64(Float64(x * y) / Float64(sqrt(Float64(Float64(z * z) - Float64(a * t))) / z));
	elseif (z <= 6e-70)
		tmp = Float64(y * Float64(z * Float64(x / hypot(z, sqrt(Float64(a * Float64(-t)))))));
	else
		tmp = Float64(Float64(x * y) / sqrt(Float64(1.0 - Float64(Float64(t / z) * Float64(a / z)))));
	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_] := If[LessEqual[z, -2e+57], N[(N[(x * y), $MachinePrecision] / N[(-0.5 * N[(N[(a / N[Abs[z], $MachinePrecision]), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision] + N[(N[Abs[z], $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9.5e-165], N[(N[(x * y), $MachinePrecision] / N[(N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-70], N[(y * N[(z * N[(x / N[Sqrt[z ^ 2 + N[Sqrt[N[(a * (-t)), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / N[Sqrt[N[(1.0 - N[(N[(t / z), $MachinePrecision] * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+57}:\\
\;\;\;\;\frac{x \cdot y}{\mathsf{fma}\left(-0.5, \frac{a}{\left|z\right|} \cdot \frac{t}{z}, \frac{\left|z\right|}{z}\right)}\\

\mathbf{elif}\;z \leq -9.5 \cdot 10^{-165}:\\
\;\;\;\;\frac{x \cdot y}{\frac{\sqrt{z \cdot z - a \cdot t}}{z}}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{\sqrt{1 - \frac{t}{z} \cdot \frac{a}{z}}}\\


\end{array}

Error

Target

Original24.7
Target7.8
Herbie5.8
\[\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 4 regimes
  2. if z < -2.0000000000000001e57

    1. Initial program 37.4

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      Proof
      (/.f64 (*.f64 x y) (/.f64 (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))) z)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))): 42 points increase in error, 13 points decrease in error
    3. Taylor expanded in t around 0 35.5

      \[\leadsto \frac{x \cdot y}{\color{blue}{-0.5 \cdot \frac{a \cdot t}{\sqrt{{z}^{2}} \cdot z} + \frac{\sqrt{{z}^{2}}}{z}}} \]
    4. Simplified2.7

      \[\leadsto \frac{x \cdot y}{\color{blue}{\mathsf{fma}\left(-0.5, \frac{a}{\left|z\right|} \cdot \frac{t}{z}, \frac{\left|z\right|}{z}\right)}} \]
      Proof
      (fma.f64 -1/2 (*.f64 (/.f64 a (fabs.f64 z)) (/.f64 t z)) (/.f64 (fabs.f64 z) z)): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/2 (*.f64 (/.f64 a (Rewrite<= rem-sqrt-square_binary64 (sqrt.f64 (*.f64 z z)))) (/.f64 t z)) (/.f64 (fabs.f64 z) z)): 11 points increase in error, 1 points decrease in error
      (fma.f64 -1/2 (*.f64 (/.f64 a (sqrt.f64 (Rewrite<= unpow2_binary64 (pow.f64 z 2)))) (/.f64 t z)) (/.f64 (fabs.f64 z) z)): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/2 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 a t) (*.f64 (sqrt.f64 (pow.f64 z 2)) z))) (/.f64 (fabs.f64 z) z)): 14 points increase in error, 7 points decrease in error
      (fma.f64 -1/2 (/.f64 (*.f64 a t) (*.f64 (sqrt.f64 (pow.f64 z 2)) z)) (/.f64 (Rewrite<= rem-sqrt-square_binary64 (sqrt.f64 (*.f64 z z))) z)): 80 points increase in error, 0 points decrease in error
      (fma.f64 -1/2 (/.f64 (*.f64 a t) (*.f64 (sqrt.f64 (pow.f64 z 2)) z)) (/.f64 (sqrt.f64 (Rewrite<= unpow2_binary64 (pow.f64 z 2))) z)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= fma-def_binary64 (+.f64 (*.f64 -1/2 (/.f64 (*.f64 a t) (*.f64 (sqrt.f64 (pow.f64 z 2)) z))) (/.f64 (sqrt.f64 (pow.f64 z 2)) z))): 0 points increase in error, 0 points decrease in error

    if -2.0000000000000001e57 < z < -9.49999999999999973e-165

    1. Initial program 7.9

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

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

    if -9.49999999999999973e-165 < z < 6.0000000000000003e-70

    1. Initial program 16.9

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

      \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{y \cdot z}}} \]
      Proof
      (/.f64 x (/.f64 (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))) (*.f64 y z))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 x (*.f64 y z)) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))): 37 points increase in error, 22 points decrease in error
      (/.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 x y) z)) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))): 6 points increase in error, 54 points decrease in error
    3. Applied egg-rr14.9

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

    if 6.0000000000000003e-70 < z

    1. Initial program 28.4

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      Proof
      (/.f64 (*.f64 x y) (/.f64 (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))) z)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))): 42 points increase in error, 13 points decrease in error
    3. Applied egg-rr30.7

      \[\leadsto \frac{x \cdot y}{\color{blue}{\sqrt{\frac{z \cdot z - t \cdot a}{z \cdot z}}}} \]
    4. Simplified1.9

      \[\leadsto \frac{x \cdot y}{\color{blue}{\sqrt{1 - \frac{t}{z} \cdot \frac{a}{z}}}} \]
      Proof
      (sqrt.f64 (-.f64 1 (*.f64 (/.f64 t z) (/.f64 a z)))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (-.f64 (Rewrite<= *-inverses_binary64 (/.f64 (*.f64 z z) (*.f64 z z))) (*.f64 (/.f64 t z) (/.f64 a z)))): 94 points increase in error, 0 points decrease in error
      (sqrt.f64 (-.f64 (/.f64 (*.f64 z z) (*.f64 z z)) (Rewrite<= times-frac_binary64 (/.f64 (*.f64 t a) (*.f64 z z))))): 8 points increase in error, 5 points decrease in error
      (sqrt.f64 (Rewrite<= div-sub_binary64 (/.f64 (-.f64 (*.f64 z z) (*.f64 t a)) (*.f64 z z)))): 0 points increase in error, 1 points decrease in error
  3. Recombined 4 regimes into one program.
  4. Final simplification5.8

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+57}:\\ \;\;\;\;\frac{x \cdot y}{\mathsf{fma}\left(-0.5, \frac{a}{\left|z\right|} \cdot \frac{t}{z}, \frac{\left|z\right|}{z}\right)}\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-165}:\\ \;\;\;\;\frac{x \cdot y}{\frac{\sqrt{z \cdot z - a \cdot t}}{z}}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-70}:\\ \;\;\;\;y \cdot \left(z \cdot \frac{x}{\mathsf{hypot}\left(z, \sqrt{a \cdot \left(-t\right)}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\sqrt{1 - \frac{t}{z} \cdot \frac{a}{z}}}\\ \end{array} \]

Alternatives

Alternative 1
Error6.0
Cost13900
\[\begin{array}{l} \mathbf{if}\;z \leq -2.15 \cdot 10^{+57}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq -7.1 \cdot 10^{-165}:\\ \;\;\;\;\frac{x \cdot y}{\frac{\sqrt{z \cdot z - a \cdot t}}{z}}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-77}:\\ \;\;\;\;y \cdot \left(z \cdot \frac{x}{\mathsf{hypot}\left(z, \sqrt{a \cdot \left(-t\right)}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\sqrt{1 - \frac{t}{z} \cdot \frac{a}{z}}}\\ \end{array} \]
Alternative 2
Error7.6
Cost7760
\[\begin{array}{l} t_1 := x \cdot \frac{z \cdot y}{\sqrt{z \cdot z - a \cdot t}}\\ \mathbf{if}\;z \leq -1.9 \cdot 10^{+57}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-172}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-226}:\\ \;\;\;\;y \cdot \left(z \cdot \frac{x}{\sqrt{a \cdot \left(-t\right)}}\right)\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{+39}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}{z}}\\ \end{array} \]
Alternative 3
Error7.6
Cost7496
\[\begin{array}{l} \mathbf{if}\;z \leq -1.18 \cdot 10^{+51}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+60}:\\ \;\;\;\;\frac{y}{\sqrt{z \cdot z - a \cdot t}} \cdot \left(z \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}{z}}\\ \end{array} \]
Alternative 4
Error7.6
Cost7496
\[\begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+50}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-250}:\\ \;\;\;\;\frac{y}{\sqrt{z \cdot z - a \cdot t}} \cdot \left(z \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\sqrt{1 - \frac{t}{z} \cdot \frac{a}{z}}}\\ \end{array} \]
Alternative 5
Error12.4
Cost7304
\[\begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{-157}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-76}:\\ \;\;\;\;x \cdot \left(z \cdot \frac{y}{\sqrt{a \cdot \left(-t\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}{z}}\\ \end{array} \]
Alternative 6
Error12.1
Cost7304
\[\begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{-135}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-80}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{\sqrt{a \cdot \left(-t\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}{z}}\\ \end{array} \]
Alternative 7
Error12.5
Cost7304
\[\begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{-157}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-80}:\\ \;\;\;\;y \cdot \left(z \cdot \frac{x}{\sqrt{a \cdot \left(-t\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}{z}}\\ \end{array} \]
Alternative 8
Error16.5
Cost1224
\[\begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{-167}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-90}:\\ \;\;\;\;\frac{x}{\frac{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}{z \cdot y}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 9
Error16.5
Cost1224
\[\begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{-168}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-89}:\\ \;\;\;\;\frac{x}{\frac{z + -0.5 \cdot \frac{a \cdot t}{z}}{z \cdot y}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 10
Error17.1
Cost1096
\[\begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{-168}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-111}:\\ \;\;\;\;-2 \cdot \left(\frac{z \cdot z}{a} \cdot \frac{x \cdot y}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 11
Error17.1
Cost1096
\[\begin{array}{l} \mathbf{if}\;z \leq -8.2 \cdot 10^{-167}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-109}:\\ \;\;\;\;\frac{x \cdot y}{t \cdot \frac{a}{z}} \cdot \frac{z}{-0.5}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 12
Error15.9
Cost1092
\[\begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{-169}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}{z}}\\ \end{array} \]
Alternative 13
Error15.5
Cost1092
\[\begin{array}{l} \mathbf{if}\;z \leq 2 \cdot 10^{-306}:\\ \;\;\;\;\frac{x \cdot y}{\frac{0.5 \cdot \frac{a \cdot t}{z} - z}{z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}{z}}\\ \end{array} \]
Alternative 14
Error17.1
Cost1032
\[\begin{array}{l} \mathbf{if}\;z \leq -8.2 \cdot 10^{-171}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 10^{-110}:\\ \;\;\;\;\frac{-1 + \left(1 + y \cdot \left(z \cdot x\right)\right)}{-z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 15
Error18.5
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{-217}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-225}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 16
Error19.0
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{-268}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-111}:\\ \;\;\;\;\left(z \cdot x\right) \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 17
Error17.8
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{-229}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-166}:\\ \;\;\;\;\frac{z \cdot \left(x \cdot y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 18
Error17.5
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{-158}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-109}:\\ \;\;\;\;-1 + \left(1 - x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 19
Error19.3
Cost388
\[\begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{-308}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 20
Error37.5
Cost192
\[x \cdot y \]

Error

Reproduce

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