?

Average Accuracy: 61.7% → 90.7%
Time: 44.9s
Precision: binary64
Cost: 13964

?

\[ \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} \mathbf{if}\;z \leq -1 \cdot 10^{+89}:\\ \;\;\;\;\frac{x \cdot y}{\frac{\frac{0.5 \cdot a}{\frac{z}{t}} - z}{z}}\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-137}:\\ \;\;\;\;\frac{x \cdot y}{\frac{\sqrt{z \cdot z - a \cdot t}}{z}}\\ \mathbf{elif}\;z \leq 10^{-163}:\\ \;\;\;\;x \cdot \left(\left({a}^{-0.5} \cdot {\left(-t\right)}^{-0.5}\right) \cdot \left(z \cdot y\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 -1e+89)
   (/ (* x y) (/ (- (/ (* 0.5 a) (/ z t)) z) z))
   (if (<= z -1e-137)
     (/ (* x y) (/ (sqrt (- (* z z) (* a t))) z))
     (if (<= z 1e-163)
       (* x (* (* (pow a -0.5) (pow (- t) -0.5)) (* z y)))
       (/ (* 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 <= -1e+89) {
		tmp = (x * y) / ((((0.5 * a) / (z / t)) - z) / z);
	} else if (z <= -1e-137) {
		tmp = (x * y) / (sqrt(((z * z) - (a * t))) / z);
	} else if (z <= 1e-163) {
		tmp = x * ((pow(a, -0.5) * pow(-t, -0.5)) * (z * y));
	} 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) :: tmp
    if (z <= (-1d+89)) then
        tmp = (x * y) / ((((0.5d0 * a) / (z / t)) - z) / z)
    else if (z <= (-1d-137)) then
        tmp = (x * y) / (sqrt(((z * z) - (a * t))) / z)
    else if (z <= 1d-163) then
        tmp = x * (((a ** (-0.5d0)) * (-t ** (-0.5d0))) * (z * y))
    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 tmp;
	if (z <= -1e+89) {
		tmp = (x * y) / ((((0.5 * a) / (z / t)) - z) / z);
	} else if (z <= -1e-137) {
		tmp = (x * y) / (Math.sqrt(((z * z) - (a * t))) / z);
	} else if (z <= 1e-163) {
		tmp = x * ((Math.pow(a, -0.5) * Math.pow(-t, -0.5)) * (z * y));
	} 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):
	tmp = 0
	if z <= -1e+89:
		tmp = (x * y) / ((((0.5 * a) / (z / t)) - z) / z)
	elif z <= -1e-137:
		tmp = (x * y) / (math.sqrt(((z * z) - (a * t))) / z)
	elif z <= 1e-163:
		tmp = x * ((math.pow(a, -0.5) * math.pow(-t, -0.5)) * (z * y))
	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)
	tmp = 0.0
	if (z <= -1e+89)
		tmp = Float64(Float64(x * y) / Float64(Float64(Float64(Float64(0.5 * a) / Float64(z / t)) - z) / z));
	elseif (z <= -1e-137)
		tmp = Float64(Float64(x * y) / Float64(sqrt(Float64(Float64(z * z) - Float64(a * t))) / z));
	elseif (z <= 1e-163)
		tmp = Float64(x * Float64(Float64((a ^ -0.5) * (Float64(-t) ^ -0.5)) * Float64(z * y)));
	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)
	tmp = 0.0;
	if (z <= -1e+89)
		tmp = (x * y) / ((((0.5 * a) / (z / t)) - z) / z);
	elseif (z <= -1e-137)
		tmp = (x * y) / (sqrt(((z * z) - (a * t))) / z);
	elseif (z <= 1e-163)
		tmp = x * (((a ^ -0.5) * (-t ^ -0.5)) * (z * y));
	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_] := If[LessEqual[z, -1e+89], N[(N[(x * y), $MachinePrecision] / N[(N[(N[(N[(0.5 * a), $MachinePrecision] / N[(z / t), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1e-137], 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, 1e-163], N[(x * N[(N[(N[Power[a, -0.5], $MachinePrecision] * N[Power[(-t), -0.5], $MachinePrecision]), $MachinePrecision] * N[(z * y), $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 -1 \cdot 10^{+89}:\\
\;\;\;\;\frac{x \cdot y}{\frac{\frac{0.5 \cdot a}{\frac{z}{t}} - z}{z}}\\

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

\mathbf{elif}\;z \leq 10^{-163}:\\
\;\;\;\;x \cdot \left(\left({a}^{-0.5} \cdot {\left(-t\right)}^{-0.5}\right) \cdot \left(z \cdot y\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

Original61.7%
Target87.6%
Herbie90.7%
\[\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 < -9.99999999999999995e88

    1. Initial program 36.3%

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

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

      [Start]36.3

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

      associate-/l* [=>]40.2

      \[ \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
    3. Taylor expanded in z around -inf 91.9%

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

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

      [Start]91.9

      \[ \frac{x \cdot y}{\frac{0.5 \cdot \frac{a \cdot t}{z} + -1 \cdot z}{z}} \]

      mul-1-neg [=>]91.9

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

      unsub-neg [=>]91.9

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

      associate-/l* [=>]96.5

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

      associate-*r/ [=>]96.5

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

    if -9.99999999999999995e88 < z < -9.99999999999999978e-138

    1. Initial program 88.7%

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

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

      [Start]88.7

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

      associate-/l* [=>]91.9

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

    if -9.99999999999999978e-138 < z < 9.99999999999999923e-164

    1. Initial program 71.0%

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

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

      [Start]71.0

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

      div-inv [=>]71.0

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

      associate-*l* [=>]71.7

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

      associate-*l* [=>]71.9

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

      pow1/2 [=>]71.9

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

      pow-flip [=>]71.9

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

      metadata-eval [=>]71.9

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

      \[\leadsto x \cdot \left(\left(y \cdot z\right) \cdot \color{blue}{e^{-0.5 \cdot \left(\log \left(-t\right) + -1 \cdot \log \left(\frac{1}{a}\right)\right)}}\right) \]
    4. Simplified77.7%

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

      [Start]74.6

      \[ x \cdot \left(\left(y \cdot z\right) \cdot e^{-0.5 \cdot \left(\log \left(-t\right) + -1 \cdot \log \left(\frac{1}{a}\right)\right)}\right) \]

      distribute-lft-in [=>]74.6

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

      +-commutative [=>]74.6

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

      mul-1-neg [=>]74.6

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

      log-rec [=>]74.6

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

      remove-double-neg [=>]74.6

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

      remove-double-neg [<=]74.6

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

      neg-mul-1 [=>]74.6

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

      *-commutative [<=]74.6

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

      exp-sum [=>]74.8

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

      neg-mul-1 [<=]74.8

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

      remove-double-neg [=>]74.8

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

      exp-to-pow [=>]75.2

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

      *-commutative [=>]75.2

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

      neg-mul-1 [=>]75.2

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

      exp-to-pow [=>]77.7

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

    if 9.99999999999999923e-164 < z

    1. Initial program 59.4%

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

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

      [Start]59.4

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

      associate-/l* [=>]63.0

      \[ \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
    3. Applied egg-rr55.2%

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

      [Start]63.0

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

      add-sqr-sqrt [=>]63.0

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

      sqrt-unprod [=>]60.9

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

      frac-times [=>]55.2

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

      add-sqr-sqrt [<=]55.2

      \[ \frac{x \cdot y}{\sqrt{\frac{\color{blue}{z \cdot z - t \cdot a}}{z \cdot z}}} \]
    4. Simplified93.1%

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

      [Start]55.2

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

      unpow2 [<=]55.2

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

      unpow2 [<=]55.2

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

      div-sub [=>]55.1

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

      *-inverses [=>]88.9

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

      unpow2 [=>]88.9

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

      times-frac [=>]93.1

      \[ \frac{x \cdot y}{\sqrt{1 - \color{blue}{\frac{t}{z} \cdot \frac{a}{z}}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification90.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+89}:\\ \;\;\;\;\frac{x \cdot y}{\frac{\frac{0.5 \cdot a}{\frac{z}{t}} - z}{z}}\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-137}:\\ \;\;\;\;\frac{x \cdot y}{\frac{\sqrt{z \cdot z - a \cdot t}}{z}}\\ \mathbf{elif}\;z \leq 10^{-163}:\\ \;\;\;\;x \cdot \left(\left({a}^{-0.5} \cdot {\left(-t\right)}^{-0.5}\right) \cdot \left(z \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\sqrt{1 - \frac{t}{z} \cdot \frac{a}{z}}}\\ \end{array} \]

Alternatives

Alternative 1
Accuracy88.8%
Cost7760
\[\begin{array}{l} t_1 := \sqrt{z \cdot z - a \cdot t}\\ t_2 := y \cdot \frac{z \cdot x}{t_1}\\ \mathbf{if}\;z \leq -4.9 \cdot 10^{+87}:\\ \;\;\;\;\frac{x \cdot y}{\frac{\frac{0.5 \cdot a}{\frac{z}{t}} - z}{z}}\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{-137}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-128}:\\ \;\;\;\;\frac{x}{\frac{t_1}{z \cdot y}}\\ \mathbf{elif}\;z \leq 8.4 \cdot 10^{+55}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}{z}}\\ \end{array} \]
Alternative 2
Accuracy90.2%
Cost7760
\[\begin{array}{l} t_1 := \sqrt{z \cdot z - a \cdot t}\\ t_2 := y \cdot \frac{z \cdot x}{t_1}\\ \mathbf{if}\;z \leq -1.2 \cdot 10^{+86}:\\ \;\;\;\;\frac{x \cdot y}{\frac{\frac{0.5 \cdot a}{\frac{z}{t}} - z}{z}}\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-137}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-130}:\\ \;\;\;\;\frac{x}{\frac{t_1}{z \cdot y}}\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{-7}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\sqrt{1 - \frac{t}{z} \cdot \frac{a}{z}}}\\ \end{array} \]
Alternative 3
Accuracy90.6%
Cost7760
\[\begin{array}{l} t_1 := \sqrt{z \cdot z - a \cdot t}\\ \mathbf{if}\;z \leq -4 \cdot 10^{+88}:\\ \;\;\;\;\frac{x \cdot y}{\frac{\frac{0.5 \cdot a}{\frac{z}{t}} - z}{z}}\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-137}:\\ \;\;\;\;\frac{x \cdot y}{\frac{t_1}{z}}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-130}:\\ \;\;\;\;\frac{x}{\frac{t_1}{z \cdot y}}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-13}:\\ \;\;\;\;y \cdot \frac{z \cdot x}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\sqrt{1 - \frac{t}{z} \cdot \frac{a}{z}}}\\ \end{array} \]
Alternative 4
Accuracy89.1%
Cost7496
\[\begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+86}:\\ \;\;\;\;\frac{x \cdot y}{\frac{\frac{0.5 \cdot a}{\frac{z}{t}} - z}{z}}\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{+55}:\\ \;\;\;\;y \cdot \frac{z \cdot x}{\sqrt{z \cdot z - a \cdot t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}{z}}\\ \end{array} \]
Alternative 5
Accuracy82.5%
Cost7304
\[\begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{-115}:\\ \;\;\;\;\frac{x \cdot y}{\frac{\frac{0.5 \cdot a}{\frac{z}{t}} - z}{z}}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-130}:\\ \;\;\;\;y \cdot \frac{z \cdot x}{\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 6
Accuracy82.1%
Cost7304
\[\begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{-114}:\\ \;\;\;\;\frac{x \cdot y}{\frac{\frac{0.5 \cdot a}{\frac{z}{t}} - z}{z}}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-136}:\\ \;\;\;\;\frac{x}{\frac{\sqrt{a \cdot \left(-t\right)}}{z \cdot y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}{z}}\\ \end{array} \]
Alternative 7
Accuracy74.2%
Cost1224
\[\begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{-138}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-189}:\\ \;\;\;\;y \cdot \frac{z}{\frac{\frac{a \cdot \left(0.5 \cdot t\right)}{z} - z}{x}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 8
Accuracy75.2%
Cost1224
\[\begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{-154}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{+55}:\\ \;\;\;\;y \cdot \frac{z \cdot x}{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 9
Accuracy74.6%
Cost1224
\[\begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+116}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-191}:\\ \;\;\;\;y \cdot \frac{z \cdot x}{\frac{0.5 \cdot a}{\frac{z}{t}} - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 10
Accuracy73.4%
Cost1096
\[\begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{-154}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-189}:\\ \;\;\;\;-2 \cdot \left(\frac{y}{a} \cdot \frac{x}{\frac{t}{z \cdot z}}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 11
Accuracy73.4%
Cost1096
\[\begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{-152}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-191}:\\ \;\;\;\;-2 \cdot \left(\frac{y}{a} \cdot \frac{x \cdot \left(z \cdot z\right)}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 12
Accuracy73.2%
Cost1096
\[\begin{array}{l} \mathbf{if}\;z \leq -7.3 \cdot 10^{-155}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 2.85 \cdot 10^{-192}:\\ \;\;\;\;-2 \cdot \frac{y}{\frac{a \cdot t}{x \cdot \left(z \cdot z\right)}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 13
Accuracy73.1%
Cost1096
\[\begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{-150}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-189}:\\ \;\;\;\;z \cdot \left(2 \cdot \frac{y \cdot \left(z \cdot x\right)}{a \cdot t}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 14
Accuracy73.7%
Cost1092
\[\begin{array}{l} \mathbf{if}\;z \leq -2.45 \cdot 10^{-154}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{1 + -0.5 \cdot \frac{a \cdot t}{z \cdot z}}\\ \end{array} \]
Alternative 15
Accuracy75.7%
Cost1092
\[\begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{-153}:\\ \;\;\;\;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 16
Accuracy77.8%
Cost1092
\[\begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{-258}:\\ \;\;\;\;\frac{x \cdot y}{\frac{\frac{0.5 \cdot a}{\frac{z}{t}} - z}{z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}{z}}\\ \end{array} \]
Alternative 17
Accuracy73.3%
Cost776
\[\begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{-150}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 1.22 \cdot 10^{-213}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{-z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 18
Accuracy71.6%
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{-210}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-212}:\\ \;\;\;\;y \cdot \frac{z \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 19
Accuracy72.9%
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{-154}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-201}:\\ \;\;\;\;\left(1 + x \cdot y\right) + -1\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 20
Accuracy73.3%
Cost712
\[\begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{-154}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{-110}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 21
Accuracy70.1%
Cost388
\[\begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{-297}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
Alternative 22
Accuracy42.0%
Cost192
\[x \cdot y \]

Error

Reproduce?

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