Average Error: 25.0 → 5.4
Time: 38.9s
Precision: binary64
Cost: 26700
\[ \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 - a \cdot t\\ \mathbf{if}\;z \leq -1 \cdot 10^{+68}:\\ \;\;\;\;\frac{x \cdot y}{\frac{0.5 \cdot \frac{a}{\frac{z}{t}} - z}{z}}\\ \mathbf{elif}\;z \leq -2.95 \cdot 10^{-161}:\\ \;\;\;\;y \cdot \frac{x}{\frac{\sqrt{t_1}}{z}}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-177}:\\ \;\;\;\;x \cdot \left(y \cdot \left(z \cdot {\left(e^{-0.5}\right)}^{\left(\log \left(-t\right) + \log a\right)}\right)\right)\\ \mathbf{elif}\;z \leq 0.1:\\ \;\;\;\;x \cdot \left(y \cdot \left(z \cdot {t_1}^{-0.5}\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
 (let* ((t_1 (- (* z z) (* a t))))
   (if (<= z -1e+68)
     (/ (* x y) (/ (- (* 0.5 (/ a (/ z t))) z) z))
     (if (<= z -2.95e-161)
       (* y (/ x (/ (sqrt t_1) z)))
       (if (<= z 4.2e-177)
         (* x (* y (* z (pow (exp -0.5) (+ (log (- t)) (log a))))))
         (if (<= z 0.1)
           (* x (* y (* z (pow t_1 -0.5))))
           (/ (* 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 t_1 = (z * z) - (a * t);
	double tmp;
	if (z <= -1e+68) {
		tmp = (x * y) / (((0.5 * (a / (z / t))) - z) / z);
	} else if (z <= -2.95e-161) {
		tmp = y * (x / (sqrt(t_1) / z));
	} else if (z <= 4.2e-177) {
		tmp = x * (y * (z * pow(exp(-0.5), (log(-t) + log(a)))));
	} else if (z <= 0.1) {
		tmp = x * (y * (z * pow(t_1, -0.5)));
	} else {
		tmp = (x * y) / sqrt((1.0 - ((t / z) * (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) / sqrt(((z * z) - (t * a)))
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) :: tmp
    t_1 = (z * z) - (a * t)
    if (z <= (-1d+68)) then
        tmp = (x * y) / (((0.5d0 * (a / (z / t))) - z) / z)
    else if (z <= (-2.95d-161)) then
        tmp = y * (x / (sqrt(t_1) / z))
    else if (z <= 4.2d-177) then
        tmp = x * (y * (z * (exp((-0.5d0)) ** (log(-t) + log(a)))))
    else if (z <= 0.1d0) then
        tmp = x * (y * (z * (t_1 ** (-0.5d0))))
    else
        tmp = (x * y) / sqrt((1.0d0 - ((t / z) * (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) / Math.sqrt(((z * z) - (t * a)));
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (z * z) - (a * t);
	double tmp;
	if (z <= -1e+68) {
		tmp = (x * y) / (((0.5 * (a / (z / t))) - z) / z);
	} else if (z <= -2.95e-161) {
		tmp = y * (x / (Math.sqrt(t_1) / z));
	} else if (z <= 4.2e-177) {
		tmp = x * (y * (z * Math.pow(Math.exp(-0.5), (Math.log(-t) + Math.log(a)))));
	} else if (z <= 0.1) {
		tmp = x * (y * (z * Math.pow(t_1, -0.5)));
	} else {
		tmp = (x * y) / Math.sqrt((1.0 - ((t / z) * (a / z))));
	}
	return tmp;
}
def code(x, y, z, t, a):
	return ((x * y) * z) / math.sqrt(((z * z) - (t * a)))
def code(x, y, z, t, a):
	t_1 = (z * z) - (a * t)
	tmp = 0
	if z <= -1e+68:
		tmp = (x * y) / (((0.5 * (a / (z / t))) - z) / z)
	elif z <= -2.95e-161:
		tmp = y * (x / (math.sqrt(t_1) / z))
	elif z <= 4.2e-177:
		tmp = x * (y * (z * math.pow(math.exp(-0.5), (math.log(-t) + math.log(a)))))
	elif z <= 0.1:
		tmp = x * (y * (z * math.pow(t_1, -0.5)))
	else:
		tmp = (x * y) / math.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)
	t_1 = Float64(Float64(z * z) - Float64(a * t))
	tmp = 0.0
	if (z <= -1e+68)
		tmp = Float64(Float64(x * y) / Float64(Float64(Float64(0.5 * Float64(a / Float64(z / t))) - z) / z));
	elseif (z <= -2.95e-161)
		tmp = Float64(y * Float64(x / Float64(sqrt(t_1) / z)));
	elseif (z <= 4.2e-177)
		tmp = Float64(x * Float64(y * Float64(z * (exp(-0.5) ^ Float64(log(Float64(-t)) + log(a))))));
	elseif (z <= 0.1)
		tmp = Float64(x * Float64(y * Float64(z * (t_1 ^ -0.5))));
	else
		tmp = Float64(Float64(x * y) / sqrt(Float64(1.0 - Float64(Float64(t / z) * Float64(a / z)))));
	end
	return tmp
end
function tmp = code(x, y, z, t, a)
	tmp = ((x * y) * z) / sqrt(((z * z) - (t * a)));
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (z * z) - (a * t);
	tmp = 0.0;
	if (z <= -1e+68)
		tmp = (x * y) / (((0.5 * (a / (z / t))) - z) / z);
	elseif (z <= -2.95e-161)
		tmp = y * (x / (sqrt(t_1) / z));
	elseif (z <= 4.2e-177)
		tmp = x * (y * (z * (exp(-0.5) ^ (log(-t) + log(a)))));
	elseif (z <= 0.1)
		tmp = x * (y * (z * (t_1 ^ -0.5)));
	else
		tmp = (x * y) / sqrt((1.0 - ((t / z) * (a / z))));
	end
	tmp_2 = 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[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e+68], N[(N[(x * y), $MachinePrecision] / N[(N[(N[(0.5 * N[(a / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.95e-161], N[(y * N[(x / N[(N[Sqrt[t$95$1], $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-177], N[(x * N[(y * N[(z * N[Power[N[Exp[-0.5], $MachinePrecision], N[(N[Log[(-t)], $MachinePrecision] + N[Log[a], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.1], N[(x * N[(y * N[(z * N[Power[t$95$1, -0.5], $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}
t_1 := z \cdot z - a \cdot t\\
\mathbf{if}\;z \leq -1 \cdot 10^{+68}:\\
\;\;\;\;\frac{x \cdot y}{\frac{0.5 \cdot \frac{a}{\frac{z}{t}} - z}{z}}\\

\mathbf{elif}\;z \leq -2.95 \cdot 10^{-161}:\\
\;\;\;\;y \cdot \frac{x}{\frac{\sqrt{t_1}}{z}}\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{-177}:\\
\;\;\;\;x \cdot \left(y \cdot \left(z \cdot {\left(e^{-0.5}\right)}^{\left(\log \left(-t\right) + \log a\right)}\right)\right)\\

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

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


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original25.0
Target7.6
Herbie5.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 5 regimes
  2. if z < -9.99999999999999953e67

    1. Initial program 40.3

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

      \[\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))))): 61 points increase in error, 7 points decrease in error
    3. Taylor expanded in z around -inf 6.3

      \[\leadsto \frac{x \cdot y}{\frac{\color{blue}{0.5 \cdot \frac{a \cdot t}{z} + -1 \cdot z}}{z}} \]
    4. Simplified6.3

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

      \[\leadsto \frac{x \cdot y}{\frac{\color{blue}{0.5 \cdot \frac{a \cdot t}{z}} - z}{z}} \]
    6. Simplified3.0

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

    if -9.99999999999999953e67 < z < -2.9500000000000001e-161

    1. Initial program 8.0

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

      \[\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))))): 61 points increase in error, 7 points decrease in error
    3. Applied egg-rr6.0

      \[\leadsto \frac{x \cdot y}{\color{blue}{{\left(z \cdot z - t \cdot a\right)}^{0.25} \cdot \left({\left(z \cdot z - t \cdot a\right)}^{0.25} \cdot \frac{1}{z}\right)}} \]
    4. Applied egg-rr5.0

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

    if -2.9500000000000001e-161 < z < 4.20000000000000002e-177

    1. Initial program 17.7

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

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

      \[\leadsto \color{blue}{x \cdot \left(y \cdot \left(z \cdot {\left(z \cdot z - a \cdot t\right)}^{-0.5}\right)\right)} \]
      Proof
      (*.f64 x (*.f64 y (*.f64 z (pow.f64 (-.f64 (*.f64 z z) (*.f64 a t)) -1/2)))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 y (*.f64 z (pow.f64 (-.f64 (*.f64 z z) (Rewrite=> *-commutative_binary64 (*.f64 t a))) -1/2)))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 y z) (pow.f64 (-.f64 (*.f64 z z) (*.f64 t a)) -1/2)))): 53 points increase in error, 12 points decrease in error
    4. Taylor expanded in a around inf 15.5

      \[\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. Simplified15.5

      \[\leadsto x \cdot \left(y \cdot \left(z \cdot \color{blue}{{\left(e^{-0.5}\right)}^{\left(\log \left(-t\right) + \log a\right)}}\right)\right) \]
      Proof
      (pow.f64 (exp.f64 -1/2) (+.f64 (log.f64 (neg.f64 t)) (log.f64 a))): 0 points increase in error, 0 points decrease in error
      (pow.f64 (exp.f64 -1/2) (+.f64 (log.f64 (neg.f64 t)) (Rewrite<= remove-double-neg_binary64 (neg.f64 (neg.f64 (log.f64 a)))))): 0 points increase in error, 0 points decrease in error
      (pow.f64 (exp.f64 -1/2) (+.f64 (log.f64 (neg.f64 t)) (neg.f64 (Rewrite<= log-rec_binary64 (log.f64 (/.f64 1 a)))))): 0 points increase in error, 0 points decrease in error
      (pow.f64 (exp.f64 -1/2) (+.f64 (log.f64 (neg.f64 t)) (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (log.f64 (/.f64 1 a)))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= exp-prod_binary64 (exp.f64 (*.f64 -1/2 (+.f64 (log.f64 (neg.f64 t)) (*.f64 -1 (log.f64 (/.f64 1 a))))))): 91 points increase in error, 54 points decrease in error

    if 4.20000000000000002e-177 < z < 0.10000000000000001

    1. Initial program 9.1

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

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

      \[\leadsto \color{blue}{x \cdot \left(y \cdot \left(z \cdot {\left(z \cdot z - a \cdot t\right)}^{-0.5}\right)\right)} \]
      Proof
      (*.f64 x (*.f64 y (*.f64 z (pow.f64 (-.f64 (*.f64 z z) (*.f64 a t)) -1/2)))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (*.f64 y (*.f64 z (pow.f64 (-.f64 (*.f64 z z) (Rewrite=> *-commutative_binary64 (*.f64 t a))) -1/2)))): 0 points increase in error, 0 points decrease in error
      (*.f64 x (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 y z) (pow.f64 (-.f64 (*.f64 z z) (*.f64 t a)) -1/2)))): 53 points increase in error, 12 points decrease in error

    if 0.10000000000000001 < z

    1. Initial program 33.9

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

      \[\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))))): 61 points increase in error, 7 points decrease in error
    3. Applied egg-rr36.5

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

      \[\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)))): 98 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, 6 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 5 regimes into one program.
  4. Final simplification5.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+68}:\\ \;\;\;\;\frac{x \cdot y}{\frac{0.5 \cdot \frac{a}{\frac{z}{t}} - z}{z}}\\ \mathbf{elif}\;z \leq -2.95 \cdot 10^{-161}:\\ \;\;\;\;y \cdot \frac{x}{\frac{\sqrt{z \cdot z - a \cdot t}}{z}}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-177}:\\ \;\;\;\;x \cdot \left(y \cdot \left(z \cdot {\left(e^{-0.5}\right)}^{\left(\log \left(-t\right) + \log a\right)}\right)\right)\\ \mathbf{elif}\;z \leq 0.1:\\ \;\;\;\;x \cdot \left(y \cdot \left(z \cdot {\left(z \cdot z - a \cdot t\right)}^{-0.5}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\sqrt{1 - \frac{t}{z} \cdot \frac{a}{z}}}\\ \end{array} \]

Alternatives

Alternative 1
Error5.4
Cost20492
\[\begin{array}{l} t_1 := z \cdot z - a \cdot t\\ \mathbf{if}\;z \leq -1 \cdot 10^{+68}:\\ \;\;\;\;\frac{x \cdot y}{\frac{0.5 \cdot \frac{a}{\frac{z}{t}} - z}{z}}\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-161}:\\ \;\;\;\;y \cdot \frac{x}{\frac{\sqrt{t_1}}{z}}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-176}:\\ \;\;\;\;x \cdot \left(y \cdot \left(z \cdot e^{-0.5 \cdot \left(\log \left(-t\right) - \log \left(\frac{1}{a}\right)\right)}\right)\right)\\ \mathbf{elif}\;z \leq 0.1:\\ \;\;\;\;x \cdot \left(y \cdot \left(z \cdot {t_1}^{-0.5}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\sqrt{1 - \frac{t}{z} \cdot \frac{a}{z}}}\\ \end{array} \]
Alternative 2
Error5.8
Cost7560
\[\begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+68}:\\ \;\;\;\;\frac{x \cdot y}{\frac{0.5 \cdot \frac{a}{\frac{z}{t}} - z}{z}}\\ \mathbf{elif}\;z \leq 0.1:\\ \;\;\;\;x \cdot \left(y \cdot \left(z \cdot {\left(z \cdot z - a \cdot t\right)}^{-0.5}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\sqrt{1 - \frac{t}{z} \cdot \frac{a}{z}}}\\ \end{array} \]
Alternative 3
Error7.1
Cost7496
\[\begin{array}{l} t_1 := \frac{a}{\frac{z}{t}}\\ \mathbf{if}\;z \leq -2.4 \cdot 10^{+67}:\\ \;\;\;\;\frac{x \cdot y}{\frac{0.5 \cdot t_1 - z}{z}}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+42}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{\sqrt{z \cdot z - a \cdot t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + t_1 \cdot -0.5}{z}}\\ \end{array} \]
Alternative 4
Error6.4
Cost7496
\[\begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+54}:\\ \;\;\;\;\frac{x \cdot y}{\frac{0.5 \cdot \frac{a}{\frac{z}{t}} - z}{z}}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-20}:\\ \;\;\;\;\frac{x}{\frac{\sqrt{z \cdot z - a \cdot t}}{z \cdot y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\sqrt{1 - \frac{t}{z} \cdot \frac{a}{z}}}\\ \end{array} \]
Alternative 5
Error12.0
Cost7368
\[\begin{array}{l} t_1 := \frac{a}{\frac{z}{t}}\\ \mathbf{if}\;z \leq -2.3 \cdot 10^{-92}:\\ \;\;\;\;\frac{x \cdot y}{\frac{0.5 \cdot t_1 - z}{z}}\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-20}:\\ \;\;\;\;x \cdot \left(y \cdot \left(z \cdot {\left(t \cdot \left(-a\right)\right)}^{-0.5}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + t_1 \cdot -0.5}{z}}\\ \end{array} \]
Alternative 6
Error12.0
Cost7304
\[\begin{array}{l} t_1 := \frac{a}{\frac{z}{t}}\\ \mathbf{if}\;z \leq -1.02 \cdot 10^{-92}:\\ \;\;\;\;\frac{x \cdot y}{\frac{0.5 \cdot t_1 - z}{z}}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-20}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{\sqrt{t \cdot \left(-a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + t_1 \cdot -0.5}{z}}\\ \end{array} \]
Alternative 7
Error12.0
Cost7304
\[\begin{array}{l} t_1 := \frac{a}{\frac{z}{t}}\\ \mathbf{if}\;z \leq -3 \cdot 10^{-92}:\\ \;\;\;\;\frac{x \cdot y}{\frac{0.5 \cdot t_1 - z}{z}}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-20}:\\ \;\;\;\;\frac{x}{\frac{\sqrt{t \cdot \left(-a\right)}}{z \cdot y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + t_1 \cdot -0.5}{z}}\\ \end{array} \]
Alternative 8
Error16.4
Cost1224
\[\begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{-160}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+50}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{z + \frac{a}{\frac{z}{t}} \cdot -0.5}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 9
Error17.5
Cost1096
\[\begin{array}{l} \mathbf{if}\;z \leq -7.6 \cdot 10^{-161}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-123}:\\ \;\;\;\;x \cdot \left(-2 \cdot \left(\frac{z}{a} \cdot \frac{y}{\frac{t}{z}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 10
Error17.5
Cost1096
\[\begin{array}{l} \mathbf{if}\;z \leq -3.15 \cdot 10^{-161}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-123}:\\ \;\;\;\;x \cdot \left(-2 \cdot \frac{y}{\frac{t}{z} \cdot \frac{a}{z}}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 11
Error17.4
Cost1096
\[\begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{-161}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-123}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{\frac{a}{z} \cdot \left(t \cdot -0.5\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 12
Error16.0
Cost1092
\[\begin{array}{l} \mathbf{if}\;z \leq -5.9 \cdot 10^{-161}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{\frac{z + \frac{a}{\frac{z}{t}} \cdot -0.5}{z}}\\ \end{array} \]
Alternative 13
Error14.7
Cost1092
\[\begin{array}{l} t_1 := \frac{a}{\frac{z}{t}}\\ \mathbf{if}\;z \leq -9 \cdot 10^{-298}:\\ \;\;\;\;\frac{x \cdot y}{\frac{0.5 \cdot t_1 - z}{z}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{\frac{z + t_1 \cdot -0.5}{z}}\\ \end{array} \]
Alternative 14
Error18.8
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{-270}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-226}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 15
Error18.8
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{-270}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-224}:\\ \;\;\;\;\frac{x}{\frac{z}{z \cdot y}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 16
Error18.3
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{-270}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-122}:\\ \;\;\;\;\frac{z \cdot \left(x \cdot y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 17
Error17.7
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{-86}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-226}:\\ \;\;\;\;-1 + \left(1 - x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 18
Error19.5
Cost388
\[\begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{-298}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 19
Error37.1
Cost192
\[x \cdot y \]

Error

Reproduce

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