Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2

Percentage Accurate: 61.0% → 90.5%
Time: 16.3s
Alternatives: 12
Speedup: 37.7×

Specification

?
\[\begin{array}{l} \\ \frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))
double code(double x, double y, double z, double t, double a) {
	return ((x * y) * z) / sqrt(((z * z) - (t * a)));
}
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
public static double code(double x, double y, double z, double t, double a) {
	return ((x * y) * z) / Math.sqrt(((z * z) - (t * a)));
}
def code(x, y, z, t, a):
	return ((x * y) * z) / math.sqrt(((z * z) - (t * a)))
function code(x, y, z, t, a)
	return Float64(Float64(Float64(x * y) * z) / sqrt(Float64(Float64(z * z) - Float64(t * a))))
end
function tmp = code(x, y, z, t, a)
	tmp = ((x * y) * z) / sqrt(((z * z) - (t * a)));
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]
\begin{array}{l}

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 12 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 61.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))
double code(double x, double y, double z, double t, double a) {
	return ((x * y) * z) / sqrt(((z * z) - (t * a)));
}
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
public static double code(double x, double y, double z, double t, double a) {
	return ((x * y) * z) / Math.sqrt(((z * z) - (t * a)));
}
def code(x, y, z, t, a):
	return ((x * y) * z) / math.sqrt(((z * z) - (t * a)))
function code(x, y, z, t, a)
	return Float64(Float64(Float64(x * y) * z) / sqrt(Float64(Float64(z * z) - Float64(t * a))))
end
function tmp = code(x, y, z, t, a)
	tmp = ((x * y) * z) / sqrt(((z * z) - (t * a)));
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]
\begin{array}{l}

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

Alternative 1: 90.5% accurate, 0.5× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ z_m = \left|z\right| \\ z_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\ \\ z\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 3.3 \cdot 10^{+75}:\\ \;\;\;\;\left(z\_m \cdot \frac{y}{\sqrt{{z\_m}^{2} - t \cdot a}}\right) \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\_m\\ \end{array}\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s x_s x_m y z_m t a)
 :precision binary64
 (*
  z_s
  (*
   x_s
   (if (<= z_m 3.3e+75)
     (* (* z_m (/ y (sqrt (- (pow z_m 2.0) (* t a))))) x_m)
     (* y x_m)))))
x_m = fabs(x);
x_s = copysign(1.0, x);
z_m = fabs(z);
z_s = copysign(1.0, z);
assert(x_m < y && y < z_m && z_m < t && t < a);
double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 3.3e+75) {
		tmp = (z_m * (y / sqrt((pow(z_m, 2.0) - (t * a))))) * x_m;
	} else {
		tmp = y * x_m;
	}
	return z_s * (x_s * tmp);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
z_m = abs(z)
z_s = copysign(1.0d0, z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, x_s, x_m, y, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 3.3d+75) then
        tmp = (z_m * (y / sqrt(((z_m ** 2.0d0) - (t * a))))) * x_m
    else
        tmp = y * x_m
    end if
    code = z_s * (x_s * tmp)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
assert x_m < y && y < z_m && z_m < t && t < a;
public static double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 3.3e+75) {
		tmp = (z_m * (y / Math.sqrt((Math.pow(z_m, 2.0) - (t * a))))) * x_m;
	} else {
		tmp = y * x_m;
	}
	return z_s * (x_s * tmp);
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
z_m = math.fabs(z)
z_s = math.copysign(1.0, z)
[x_m, y, z_m, t, a] = sort([x_m, y, z_m, t, a])
def code(z_s, x_s, x_m, y, z_m, t, a):
	tmp = 0
	if z_m <= 3.3e+75:
		tmp = (z_m * (y / math.sqrt((math.pow(z_m, 2.0) - (t * a))))) * x_m
	else:
		tmp = y * x_m
	return z_s * (x_s * tmp)
x_m = abs(x)
x_s = copysign(1.0, x)
z_m = abs(z)
z_s = copysign(1.0, z)
x_m, y, z_m, t, a = sort([x_m, y, z_m, t, a])
function code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0
	if (z_m <= 3.3e+75)
		tmp = Float64(Float64(z_m * Float64(y / sqrt(Float64((z_m ^ 2.0) - Float64(t * a))))) * x_m);
	else
		tmp = Float64(y * x_m);
	end
	return Float64(z_s * Float64(x_s * tmp))
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
z_m = abs(z);
z_s = sign(z) * abs(1.0);
x_m, y, z_m, t, a = num2cell(sort([x_m, y, z_m, t, a])){:}
function tmp_2 = code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 3.3e+75)
		tmp = (z_m * (y / sqrt(((z_m ^ 2.0) - (t * a))))) * x_m;
	else
		tmp = y * x_m;
	end
	tmp_2 = z_s * (x_s * tmp);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, x$95$s_, x$95$m_, y_, z$95$m_, t_, a_] := N[(z$95$s * N[(x$95$s * If[LessEqual[z$95$m, 3.3e+75], N[(N[(z$95$m * N[(y / N[Sqrt[N[(N[Power[z$95$m, 2.0], $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x$95$m), $MachinePrecision], N[(y * x$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\
\\
z\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 3.3 \cdot 10^{+75}:\\
\;\;\;\;\left(z\_m \cdot \frac{y}{\sqrt{{z\_m}^{2} - t \cdot a}}\right) \cdot x\_m\\

\mathbf{else}:\\
\;\;\;\;y \cdot x\_m\\


\end{array}\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 3.29999999999999998e75

    1. Initial program 64.7%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Step-by-step derivation
      1. associate-*l*64.8%

        \[\leadsto \frac{\color{blue}{x \cdot \left(y \cdot z\right)}}{\sqrt{z \cdot z - t \cdot a}} \]
      2. *-commutative64.8%

        \[\leadsto \frac{x \cdot \color{blue}{\left(z \cdot y\right)}}{\sqrt{z \cdot z - t \cdot a}} \]
      3. associate-*l*64.4%

        \[\leadsto \frac{\color{blue}{\left(x \cdot z\right) \cdot y}}{\sqrt{z \cdot z - t \cdot a}} \]
      4. *-commutative64.4%

        \[\leadsto \frac{\color{blue}{y \cdot \left(x \cdot z\right)}}{\sqrt{z \cdot z - t \cdot a}} \]
      5. associate-/l*65.0%

        \[\leadsto \color{blue}{\frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{x \cdot z}}} \]
    3. Simplified65.0%

      \[\leadsto \color{blue}{\frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{x \cdot z}}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/r/64.0%

        \[\leadsto \color{blue}{\frac{y}{\sqrt{z \cdot z - t \cdot a}} \cdot \left(x \cdot z\right)} \]
      2. *-commutative64.0%

        \[\leadsto \frac{y}{\sqrt{z \cdot z - t \cdot a}} \cdot \color{blue}{\left(z \cdot x\right)} \]
      3. associate-*r*64.5%

        \[\leadsto \color{blue}{\left(\frac{y}{\sqrt{z \cdot z - t \cdot a}} \cdot z\right) \cdot x} \]
      4. pow264.5%

        \[\leadsto \left(\frac{y}{\sqrt{\color{blue}{{z}^{2}} - t \cdot a}} \cdot z\right) \cdot x \]
    6. Applied egg-rr64.5%

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

    if 3.29999999999999998e75 < z

    1. Initial program 43.8%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Step-by-step derivation
      1. associate-/l*49.0%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      2. associate-*l/49.1%

        \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}} \cdot y} \]
      3. *-commutative49.1%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      4. associate-/l*44.0%

        \[\leadsto y \cdot \color{blue}{\frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    3. Simplified44.0%

      \[\leadsto \color{blue}{y \cdot \frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 100.0%

      \[\leadsto y \cdot \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 3.3 \cdot 10^{+75}:\\ \;\;\;\;\left(z \cdot \frac{y}{\sqrt{{z}^{2} - t \cdot a}}\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 88.8% accurate, 0.9× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ z_m = \left|z\right| \\ z_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\ \\ z\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 5.1 \cdot 10^{-102}:\\ \;\;\;\;\frac{x\_m \cdot \left(z\_m \cdot y\right)}{\sqrt{t \cdot \left(-a\right)}}\\ \mathbf{elif}\;z\_m \leq 2.9 \cdot 10^{+76}:\\ \;\;\;\;y \cdot \frac{z\_m \cdot x\_m}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\_m\\ \end{array}\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s x_s x_m y z_m t a)
 :precision binary64
 (*
  z_s
  (*
   x_s
   (if (<= z_m 5.1e-102)
     (/ (* x_m (* z_m y)) (sqrt (* t (- a))))
     (if (<= z_m 2.9e+76)
       (* y (/ (* z_m x_m) (sqrt (- (* z_m z_m) (* t a)))))
       (* y x_m))))))
x_m = fabs(x);
x_s = copysign(1.0, x);
z_m = fabs(z);
z_s = copysign(1.0, z);
assert(x_m < y && y < z_m && z_m < t && t < a);
double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 5.1e-102) {
		tmp = (x_m * (z_m * y)) / sqrt((t * -a));
	} else if (z_m <= 2.9e+76) {
		tmp = y * ((z_m * x_m) / sqrt(((z_m * z_m) - (t * a))));
	} else {
		tmp = y * x_m;
	}
	return z_s * (x_s * tmp);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
z_m = abs(z)
z_s = copysign(1.0d0, z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, x_s, x_m, y, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 5.1d-102) then
        tmp = (x_m * (z_m * y)) / sqrt((t * -a))
    else if (z_m <= 2.9d+76) then
        tmp = y * ((z_m * x_m) / sqrt(((z_m * z_m) - (t * a))))
    else
        tmp = y * x_m
    end if
    code = z_s * (x_s * tmp)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
assert x_m < y && y < z_m && z_m < t && t < a;
public static double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 5.1e-102) {
		tmp = (x_m * (z_m * y)) / Math.sqrt((t * -a));
	} else if (z_m <= 2.9e+76) {
		tmp = y * ((z_m * x_m) / Math.sqrt(((z_m * z_m) - (t * a))));
	} else {
		tmp = y * x_m;
	}
	return z_s * (x_s * tmp);
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
z_m = math.fabs(z)
z_s = math.copysign(1.0, z)
[x_m, y, z_m, t, a] = sort([x_m, y, z_m, t, a])
def code(z_s, x_s, x_m, y, z_m, t, a):
	tmp = 0
	if z_m <= 5.1e-102:
		tmp = (x_m * (z_m * y)) / math.sqrt((t * -a))
	elif z_m <= 2.9e+76:
		tmp = y * ((z_m * x_m) / math.sqrt(((z_m * z_m) - (t * a))))
	else:
		tmp = y * x_m
	return z_s * (x_s * tmp)
x_m = abs(x)
x_s = copysign(1.0, x)
z_m = abs(z)
z_s = copysign(1.0, z)
x_m, y, z_m, t, a = sort([x_m, y, z_m, t, a])
function code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0
	if (z_m <= 5.1e-102)
		tmp = Float64(Float64(x_m * Float64(z_m * y)) / sqrt(Float64(t * Float64(-a))));
	elseif (z_m <= 2.9e+76)
		tmp = Float64(y * Float64(Float64(z_m * x_m) / sqrt(Float64(Float64(z_m * z_m) - Float64(t * a)))));
	else
		tmp = Float64(y * x_m);
	end
	return Float64(z_s * Float64(x_s * tmp))
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
z_m = abs(z);
z_s = sign(z) * abs(1.0);
x_m, y, z_m, t, a = num2cell(sort([x_m, y, z_m, t, a])){:}
function tmp_2 = code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 5.1e-102)
		tmp = (x_m * (z_m * y)) / sqrt((t * -a));
	elseif (z_m <= 2.9e+76)
		tmp = y * ((z_m * x_m) / sqrt(((z_m * z_m) - (t * a))));
	else
		tmp = y * x_m;
	end
	tmp_2 = z_s * (x_s * tmp);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, x$95$s_, x$95$m_, y_, z$95$m_, t_, a_] := N[(z$95$s * N[(x$95$s * If[LessEqual[z$95$m, 5.1e-102], N[(N[(x$95$m * N[(z$95$m * y), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(t * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[z$95$m, 2.9e+76], N[(y * N[(N[(z$95$m * x$95$m), $MachinePrecision] / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x$95$m), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\
\\
z\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 5.1 \cdot 10^{-102}:\\
\;\;\;\;\frac{x\_m \cdot \left(z\_m \cdot y\right)}{\sqrt{t \cdot \left(-a\right)}}\\

\mathbf{elif}\;z\_m \leq 2.9 \cdot 10^{+76}:\\
\;\;\;\;y \cdot \frac{z\_m \cdot x\_m}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\

\mathbf{else}:\\
\;\;\;\;y \cdot x\_m\\


\end{array}\right)
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < 5.09999999999999999e-102

    1. Initial program 60.8%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Step-by-step derivation
      1. associate-*l*60.4%

        \[\leadsto \frac{\color{blue}{x \cdot \left(y \cdot z\right)}}{\sqrt{z \cdot z - t \cdot a}} \]
    3. Simplified60.4%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y \cdot z\right)}{\sqrt{z \cdot z - t \cdot a}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 43.5%

      \[\leadsto \frac{x \cdot \left(y \cdot z\right)}{\sqrt{\color{blue}{-1 \cdot \left(a \cdot t\right)}}} \]
    6. Step-by-step derivation
      1. mul-1-neg44.3%

        \[\leadsto y \cdot \frac{x \cdot z}{\sqrt{\color{blue}{-a \cdot t}}} \]
      2. *-commutative44.3%

        \[\leadsto y \cdot \frac{x \cdot z}{\sqrt{-\color{blue}{t \cdot a}}} \]
      3. distribute-rgt-neg-in44.3%

        \[\leadsto y \cdot \frac{x \cdot z}{\sqrt{\color{blue}{t \cdot \left(-a\right)}}} \]
    7. Simplified43.5%

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

    if 5.09999999999999999e-102 < z < 2.9000000000000002e76

    1. Initial program 81.6%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Step-by-step derivation
      1. associate-/l*84.1%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      2. associate-*l/89.3%

        \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}} \cdot y} \]
      3. *-commutative89.3%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      4. associate-/l*84.3%

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

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

    if 2.9000000000000002e76 < z

    1. Initial program 43.8%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Step-by-step derivation
      1. associate-/l*49.0%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      2. associate-*l/49.1%

        \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}} \cdot y} \]
      3. *-commutative49.1%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      4. associate-/l*44.0%

        \[\leadsto y \cdot \color{blue}{\frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    3. Simplified44.0%

      \[\leadsto \color{blue}{y \cdot \frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 100.0%

      \[\leadsto y \cdot \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification62.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 5.1 \cdot 10^{-102}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{\sqrt{t \cdot \left(-a\right)}}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+76}:\\ \;\;\;\;y \cdot \frac{z \cdot x}{\sqrt{z \cdot z - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 90.2% accurate, 1.0× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ z_m = \left|z\right| \\ z_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\ \\ z\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 2.45 \cdot 10^{+35}:\\ \;\;\;\;\frac{x\_m \cdot \left(z\_m \cdot y\right)}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\_m\\ \end{array}\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s x_s x_m y z_m t a)
 :precision binary64
 (*
  z_s
  (*
   x_s
   (if (<= z_m 2.45e+35)
     (/ (* x_m (* z_m y)) (sqrt (- (* z_m z_m) (* t a))))
     (* y x_m)))))
x_m = fabs(x);
x_s = copysign(1.0, x);
z_m = fabs(z);
z_s = copysign(1.0, z);
assert(x_m < y && y < z_m && z_m < t && t < a);
double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 2.45e+35) {
		tmp = (x_m * (z_m * y)) / sqrt(((z_m * z_m) - (t * a)));
	} else {
		tmp = y * x_m;
	}
	return z_s * (x_s * tmp);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
z_m = abs(z)
z_s = copysign(1.0d0, z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, x_s, x_m, y, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 2.45d+35) then
        tmp = (x_m * (z_m * y)) / sqrt(((z_m * z_m) - (t * a)))
    else
        tmp = y * x_m
    end if
    code = z_s * (x_s * tmp)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
assert x_m < y && y < z_m && z_m < t && t < a;
public static double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 2.45e+35) {
		tmp = (x_m * (z_m * y)) / Math.sqrt(((z_m * z_m) - (t * a)));
	} else {
		tmp = y * x_m;
	}
	return z_s * (x_s * tmp);
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
z_m = math.fabs(z)
z_s = math.copysign(1.0, z)
[x_m, y, z_m, t, a] = sort([x_m, y, z_m, t, a])
def code(z_s, x_s, x_m, y, z_m, t, a):
	tmp = 0
	if z_m <= 2.45e+35:
		tmp = (x_m * (z_m * y)) / math.sqrt(((z_m * z_m) - (t * a)))
	else:
		tmp = y * x_m
	return z_s * (x_s * tmp)
x_m = abs(x)
x_s = copysign(1.0, x)
z_m = abs(z)
z_s = copysign(1.0, z)
x_m, y, z_m, t, a = sort([x_m, y, z_m, t, a])
function code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0
	if (z_m <= 2.45e+35)
		tmp = Float64(Float64(x_m * Float64(z_m * y)) / sqrt(Float64(Float64(z_m * z_m) - Float64(t * a))));
	else
		tmp = Float64(y * x_m);
	end
	return Float64(z_s * Float64(x_s * tmp))
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
z_m = abs(z);
z_s = sign(z) * abs(1.0);
x_m, y, z_m, t, a = num2cell(sort([x_m, y, z_m, t, a])){:}
function tmp_2 = code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 2.45e+35)
		tmp = (x_m * (z_m * y)) / sqrt(((z_m * z_m) - (t * a)));
	else
		tmp = y * x_m;
	end
	tmp_2 = z_s * (x_s * tmp);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, x$95$s_, x$95$m_, y_, z$95$m_, t_, a_] := N[(z$95$s * N[(x$95$s * If[LessEqual[z$95$m, 2.45e+35], N[(N[(x$95$m * N[(z$95$m * y), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y * x$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\
\\
z\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 2.45 \cdot 10^{+35}:\\
\;\;\;\;\frac{x\_m \cdot \left(z\_m \cdot y\right)}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\

\mathbf{else}:\\
\;\;\;\;y \cdot x\_m\\


\end{array}\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 2.45000000000000013e35

    1. Initial program 63.5%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Step-by-step derivation
      1. associate-*l*63.6%

        \[\leadsto \frac{\color{blue}{x \cdot \left(y \cdot z\right)}}{\sqrt{z \cdot z - t \cdot a}} \]
    3. Simplified63.6%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y \cdot z\right)}{\sqrt{z \cdot z - t \cdot a}}} \]
    4. Add Preprocessing

    if 2.45000000000000013e35 < z

    1. Initial program 50.7%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Step-by-step derivation
      1. associate-/l*56.3%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      2. associate-*l/56.4%

        \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}} \cdot y} \]
      3. *-commutative56.4%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      4. associate-/l*50.8%

        \[\leadsto y \cdot \color{blue}{\frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    3. Simplified50.8%

      \[\leadsto \color{blue}{y \cdot \frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 97.2%

      \[\leadsto y \cdot \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 2.45 \cdot 10^{+35}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{\sqrt{z \cdot z - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 79.5% accurate, 1.0× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ z_m = \left|z\right| \\ z_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\ \\ z\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 0.0085:\\ \;\;\;\;y \cdot \frac{z\_m \cdot x\_m}{\sqrt{t \cdot \left(-a\right)}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\_m\\ \end{array}\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s x_s x_m y z_m t a)
 :precision binary64
 (*
  z_s
  (*
   x_s
   (if (<= z_m 0.0085) (* y (/ (* z_m x_m) (sqrt (* t (- a))))) (* y x_m)))))
x_m = fabs(x);
x_s = copysign(1.0, x);
z_m = fabs(z);
z_s = copysign(1.0, z);
assert(x_m < y && y < z_m && z_m < t && t < a);
double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 0.0085) {
		tmp = y * ((z_m * x_m) / sqrt((t * -a)));
	} else {
		tmp = y * x_m;
	}
	return z_s * (x_s * tmp);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
z_m = abs(z)
z_s = copysign(1.0d0, z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, x_s, x_m, y, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 0.0085d0) then
        tmp = y * ((z_m * x_m) / sqrt((t * -a)))
    else
        tmp = y * x_m
    end if
    code = z_s * (x_s * tmp)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
assert x_m < y && y < z_m && z_m < t && t < a;
public static double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 0.0085) {
		tmp = y * ((z_m * x_m) / Math.sqrt((t * -a)));
	} else {
		tmp = y * x_m;
	}
	return z_s * (x_s * tmp);
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
z_m = math.fabs(z)
z_s = math.copysign(1.0, z)
[x_m, y, z_m, t, a] = sort([x_m, y, z_m, t, a])
def code(z_s, x_s, x_m, y, z_m, t, a):
	tmp = 0
	if z_m <= 0.0085:
		tmp = y * ((z_m * x_m) / math.sqrt((t * -a)))
	else:
		tmp = y * x_m
	return z_s * (x_s * tmp)
x_m = abs(x)
x_s = copysign(1.0, x)
z_m = abs(z)
z_s = copysign(1.0, z)
x_m, y, z_m, t, a = sort([x_m, y, z_m, t, a])
function code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0
	if (z_m <= 0.0085)
		tmp = Float64(y * Float64(Float64(z_m * x_m) / sqrt(Float64(t * Float64(-a)))));
	else
		tmp = Float64(y * x_m);
	end
	return Float64(z_s * Float64(x_s * tmp))
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
z_m = abs(z);
z_s = sign(z) * abs(1.0);
x_m, y, z_m, t, a = num2cell(sort([x_m, y, z_m, t, a])){:}
function tmp_2 = code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 0.0085)
		tmp = y * ((z_m * x_m) / sqrt((t * -a)));
	else
		tmp = y * x_m;
	end
	tmp_2 = z_s * (x_s * tmp);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, x$95$s_, x$95$m_, y_, z$95$m_, t_, a_] := N[(z$95$s * N[(x$95$s * If[LessEqual[z$95$m, 0.0085], N[(y * N[(N[(z$95$m * x$95$m), $MachinePrecision] / N[Sqrt[N[(t * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\
\\
z\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 0.0085:\\
\;\;\;\;y \cdot \frac{z\_m \cdot x\_m}{\sqrt{t \cdot \left(-a\right)}}\\

\mathbf{else}:\\
\;\;\;\;y \cdot x\_m\\


\end{array}\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 0.0085000000000000006

    1. Initial program 63.0%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Step-by-step derivation
      1. associate-/l*63.8%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      2. associate-*l/65.9%

        \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}} \cdot y} \]
      3. *-commutative65.9%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      4. associate-/l*63.4%

        \[\leadsto y \cdot \color{blue}{\frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    3. Simplified63.4%

      \[\leadsto \color{blue}{y \cdot \frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 45.1%

      \[\leadsto y \cdot \frac{x \cdot z}{\sqrt{\color{blue}{-1 \cdot \left(a \cdot t\right)}}} \]
    6. Step-by-step derivation
      1. mul-1-neg45.1%

        \[\leadsto y \cdot \frac{x \cdot z}{\sqrt{\color{blue}{-a \cdot t}}} \]
      2. *-commutative45.1%

        \[\leadsto y \cdot \frac{x \cdot z}{\sqrt{-\color{blue}{t \cdot a}}} \]
      3. distribute-rgt-neg-in45.1%

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

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

    if 0.0085000000000000006 < z

    1. Initial program 52.7%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Step-by-step derivation
      1. associate-/l*57.9%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      2. associate-*l/58.1%

        \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}} \cdot y} \]
      3. *-commutative58.1%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      4. associate-/l*52.8%

        \[\leadsto y \cdot \color{blue}{\frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    3. Simplified52.8%

      \[\leadsto \color{blue}{y \cdot \frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 94.9%

      \[\leadsto y \cdot \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification59.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 0.0085:\\ \;\;\;\;y \cdot \frac{z \cdot x}{\sqrt{t \cdot \left(-a\right)}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 81.7% accurate, 1.0× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ z_m = \left|z\right| \\ z_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\ \\ z\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 0.0085:\\ \;\;\;\;\frac{x\_m \cdot \left(z\_m \cdot y\right)}{\sqrt{t \cdot \left(-a\right)}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\_m\\ \end{array}\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s x_s x_m y z_m t a)
 :precision binary64
 (*
  z_s
  (*
   x_s
   (if (<= z_m 0.0085) (/ (* x_m (* z_m y)) (sqrt (* t (- a)))) (* y x_m)))))
x_m = fabs(x);
x_s = copysign(1.0, x);
z_m = fabs(z);
z_s = copysign(1.0, z);
assert(x_m < y && y < z_m && z_m < t && t < a);
double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 0.0085) {
		tmp = (x_m * (z_m * y)) / sqrt((t * -a));
	} else {
		tmp = y * x_m;
	}
	return z_s * (x_s * tmp);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
z_m = abs(z)
z_s = copysign(1.0d0, z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, x_s, x_m, y, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 0.0085d0) then
        tmp = (x_m * (z_m * y)) / sqrt((t * -a))
    else
        tmp = y * x_m
    end if
    code = z_s * (x_s * tmp)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
assert x_m < y && y < z_m && z_m < t && t < a;
public static double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 0.0085) {
		tmp = (x_m * (z_m * y)) / Math.sqrt((t * -a));
	} else {
		tmp = y * x_m;
	}
	return z_s * (x_s * tmp);
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
z_m = math.fabs(z)
z_s = math.copysign(1.0, z)
[x_m, y, z_m, t, a] = sort([x_m, y, z_m, t, a])
def code(z_s, x_s, x_m, y, z_m, t, a):
	tmp = 0
	if z_m <= 0.0085:
		tmp = (x_m * (z_m * y)) / math.sqrt((t * -a))
	else:
		tmp = y * x_m
	return z_s * (x_s * tmp)
x_m = abs(x)
x_s = copysign(1.0, x)
z_m = abs(z)
z_s = copysign(1.0, z)
x_m, y, z_m, t, a = sort([x_m, y, z_m, t, a])
function code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0
	if (z_m <= 0.0085)
		tmp = Float64(Float64(x_m * Float64(z_m * y)) / sqrt(Float64(t * Float64(-a))));
	else
		tmp = Float64(y * x_m);
	end
	return Float64(z_s * Float64(x_s * tmp))
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
z_m = abs(z);
z_s = sign(z) * abs(1.0);
x_m, y, z_m, t, a = num2cell(sort([x_m, y, z_m, t, a])){:}
function tmp_2 = code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 0.0085)
		tmp = (x_m * (z_m * y)) / sqrt((t * -a));
	else
		tmp = y * x_m;
	end
	tmp_2 = z_s * (x_s * tmp);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, x$95$s_, x$95$m_, y_, z$95$m_, t_, a_] := N[(z$95$s * N[(x$95$s * If[LessEqual[z$95$m, 0.0085], N[(N[(x$95$m * N[(z$95$m * y), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(t * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y * x$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\
\\
z\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 0.0085:\\
\;\;\;\;\frac{x\_m \cdot \left(z\_m \cdot y\right)}{\sqrt{t \cdot \left(-a\right)}}\\

\mathbf{else}:\\
\;\;\;\;y \cdot x\_m\\


\end{array}\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 0.0085000000000000006

    1. Initial program 63.0%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Step-by-step derivation
      1. associate-*l*63.2%

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

      \[\leadsto \color{blue}{\frac{x \cdot \left(y \cdot z\right)}{\sqrt{z \cdot z - t \cdot a}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 43.9%

      \[\leadsto \frac{x \cdot \left(y \cdot z\right)}{\sqrt{\color{blue}{-1 \cdot \left(a \cdot t\right)}}} \]
    6. Step-by-step derivation
      1. mul-1-neg45.1%

        \[\leadsto y \cdot \frac{x \cdot z}{\sqrt{\color{blue}{-a \cdot t}}} \]
      2. *-commutative45.1%

        \[\leadsto y \cdot \frac{x \cdot z}{\sqrt{-\color{blue}{t \cdot a}}} \]
      3. distribute-rgt-neg-in45.1%

        \[\leadsto y \cdot \frac{x \cdot z}{\sqrt{\color{blue}{t \cdot \left(-a\right)}}} \]
    7. Simplified43.9%

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

    if 0.0085000000000000006 < z

    1. Initial program 52.7%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Step-by-step derivation
      1. associate-/l*57.9%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      2. associate-*l/58.1%

        \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}} \cdot y} \]
      3. *-commutative58.1%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      4. associate-/l*52.8%

        \[\leadsto y \cdot \color{blue}{\frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    3. Simplified52.8%

      \[\leadsto \color{blue}{y \cdot \frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 94.9%

      \[\leadsto y \cdot \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification58.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 0.0085:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{\sqrt{t \cdot \left(-a\right)}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 72.6% accurate, 5.1× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ z_m = \left|z\right| \\ z_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\ \\ z\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;y \cdot x\_m \leq 2 \cdot 10^{-64}:\\ \;\;\;\;y \cdot \frac{z\_m \cdot x\_m}{z\_m + -0.5 \cdot \left(a \cdot \frac{t}{z\_m}\right)}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\_m\\ \end{array}\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s x_s x_m y z_m t a)
 :precision binary64
 (*
  z_s
  (*
   x_s
   (if (<= (* y x_m) 2e-64)
     (* y (/ (* z_m x_m) (+ z_m (* -0.5 (* a (/ t z_m))))))
     (* y x_m)))))
x_m = fabs(x);
x_s = copysign(1.0, x);
z_m = fabs(z);
z_s = copysign(1.0, z);
assert(x_m < y && y < z_m && z_m < t && t < a);
double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if ((y * x_m) <= 2e-64) {
		tmp = y * ((z_m * x_m) / (z_m + (-0.5 * (a * (t / z_m)))));
	} else {
		tmp = y * x_m;
	}
	return z_s * (x_s * tmp);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
z_m = abs(z)
z_s = copysign(1.0d0, z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, x_s, x_m, y, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((y * x_m) <= 2d-64) then
        tmp = y * ((z_m * x_m) / (z_m + ((-0.5d0) * (a * (t / z_m)))))
    else
        tmp = y * x_m
    end if
    code = z_s * (x_s * tmp)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
assert x_m < y && y < z_m && z_m < t && t < a;
public static double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if ((y * x_m) <= 2e-64) {
		tmp = y * ((z_m * x_m) / (z_m + (-0.5 * (a * (t / z_m)))));
	} else {
		tmp = y * x_m;
	}
	return z_s * (x_s * tmp);
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
z_m = math.fabs(z)
z_s = math.copysign(1.0, z)
[x_m, y, z_m, t, a] = sort([x_m, y, z_m, t, a])
def code(z_s, x_s, x_m, y, z_m, t, a):
	tmp = 0
	if (y * x_m) <= 2e-64:
		tmp = y * ((z_m * x_m) / (z_m + (-0.5 * (a * (t / z_m)))))
	else:
		tmp = y * x_m
	return z_s * (x_s * tmp)
x_m = abs(x)
x_s = copysign(1.0, x)
z_m = abs(z)
z_s = copysign(1.0, z)
x_m, y, z_m, t, a = sort([x_m, y, z_m, t, a])
function code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0
	if (Float64(y * x_m) <= 2e-64)
		tmp = Float64(y * Float64(Float64(z_m * x_m) / Float64(z_m + Float64(-0.5 * Float64(a * Float64(t / z_m))))));
	else
		tmp = Float64(y * x_m);
	end
	return Float64(z_s * Float64(x_s * tmp))
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
z_m = abs(z);
z_s = sign(z) * abs(1.0);
x_m, y, z_m, t, a = num2cell(sort([x_m, y, z_m, t, a])){:}
function tmp_2 = code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0;
	if ((y * x_m) <= 2e-64)
		tmp = y * ((z_m * x_m) / (z_m + (-0.5 * (a * (t / z_m)))));
	else
		tmp = y * x_m;
	end
	tmp_2 = z_s * (x_s * tmp);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, x$95$s_, x$95$m_, y_, z$95$m_, t_, a_] := N[(z$95$s * N[(x$95$s * If[LessEqual[N[(y * x$95$m), $MachinePrecision], 2e-64], N[(y * N[(N[(z$95$m * x$95$m), $MachinePrecision] / N[(z$95$m + N[(-0.5 * N[(a * N[(t / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\
\\
z\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \cdot x\_m \leq 2 \cdot 10^{-64}:\\
\;\;\;\;y \cdot \frac{z\_m \cdot x\_m}{z\_m + -0.5 \cdot \left(a \cdot \frac{t}{z\_m}\right)}\\

\mathbf{else}:\\
\;\;\;\;y \cdot x\_m\\


\end{array}\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < 1.99999999999999993e-64

    1. Initial program 66.4%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Step-by-step derivation
      1. associate-/l*68.3%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      2. associate-*l/68.8%

        \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}} \cdot y} \]
      3. *-commutative68.8%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      4. associate-/l*64.7%

        \[\leadsto y \cdot \color{blue}{\frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    3. Simplified64.7%

      \[\leadsto \color{blue}{y \cdot \frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 49.7%

      \[\leadsto y \cdot \frac{x \cdot z}{\color{blue}{z + -0.5 \cdot \frac{a \cdot t}{z}}} \]
    6. Step-by-step derivation
      1. associate-/l*50.3%

        \[\leadsto y \cdot \frac{x \cdot z}{z + -0.5 \cdot \color{blue}{\frac{a}{\frac{z}{t}}}} \]
    7. Simplified50.3%

      \[\leadsto y \cdot \frac{x \cdot z}{\color{blue}{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}} \]
    8. Step-by-step derivation
      1. clear-num50.3%

        \[\leadsto y \cdot \frac{x \cdot z}{z + -0.5 \cdot \color{blue}{\frac{1}{\frac{\frac{z}{t}}{a}}}} \]
      2. associate-/r/50.3%

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

        \[\leadsto y \cdot \frac{x \cdot z}{z + -0.5 \cdot \left(\color{blue}{\frac{t}{z}} \cdot a\right)} \]
    9. Applied egg-rr50.3%

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

    if 1.99999999999999993e-64 < (*.f64 x y)

    1. Initial program 45.0%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Step-by-step derivation
      1. associate-/l*47.7%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      2. associate-*l/51.5%

        \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}} \cdot y} \]
      3. *-commutative51.5%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      4. associate-/l*50.0%

        \[\leadsto y \cdot \color{blue}{\frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    3. Simplified50.0%

      \[\leadsto \color{blue}{y \cdot \frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 27.4%

      \[\leadsto y \cdot \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification43.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot x \leq 2 \cdot 10^{-64}:\\ \;\;\;\;y \cdot \frac{z \cdot x}{z + -0.5 \cdot \left(a \cdot \frac{t}{z}\right)}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 78.1% accurate, 5.6× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ z_m = \left|z\right| \\ z_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\ \\ z\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 9500000:\\ \;\;\;\;\frac{x\_m \cdot \left(z\_m \cdot y\right)}{z\_m + -0.5 \cdot \frac{t \cdot a}{z\_m}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\_m\\ \end{array}\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s x_s x_m y z_m t a)
 :precision binary64
 (*
  z_s
  (*
   x_s
   (if (<= z_m 9500000.0)
     (/ (* x_m (* z_m y)) (+ z_m (* -0.5 (/ (* t a) z_m))))
     (* y x_m)))))
x_m = fabs(x);
x_s = copysign(1.0, x);
z_m = fabs(z);
z_s = copysign(1.0, z);
assert(x_m < y && y < z_m && z_m < t && t < a);
double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 9500000.0) {
		tmp = (x_m * (z_m * y)) / (z_m + (-0.5 * ((t * a) / z_m)));
	} else {
		tmp = y * x_m;
	}
	return z_s * (x_s * tmp);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
z_m = abs(z)
z_s = copysign(1.0d0, z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, x_s, x_m, y, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 9500000.0d0) then
        tmp = (x_m * (z_m * y)) / (z_m + ((-0.5d0) * ((t * a) / z_m)))
    else
        tmp = y * x_m
    end if
    code = z_s * (x_s * tmp)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
assert x_m < y && y < z_m && z_m < t && t < a;
public static double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 9500000.0) {
		tmp = (x_m * (z_m * y)) / (z_m + (-0.5 * ((t * a) / z_m)));
	} else {
		tmp = y * x_m;
	}
	return z_s * (x_s * tmp);
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
z_m = math.fabs(z)
z_s = math.copysign(1.0, z)
[x_m, y, z_m, t, a] = sort([x_m, y, z_m, t, a])
def code(z_s, x_s, x_m, y, z_m, t, a):
	tmp = 0
	if z_m <= 9500000.0:
		tmp = (x_m * (z_m * y)) / (z_m + (-0.5 * ((t * a) / z_m)))
	else:
		tmp = y * x_m
	return z_s * (x_s * tmp)
x_m = abs(x)
x_s = copysign(1.0, x)
z_m = abs(z)
z_s = copysign(1.0, z)
x_m, y, z_m, t, a = sort([x_m, y, z_m, t, a])
function code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0
	if (z_m <= 9500000.0)
		tmp = Float64(Float64(x_m * Float64(z_m * y)) / Float64(z_m + Float64(-0.5 * Float64(Float64(t * a) / z_m))));
	else
		tmp = Float64(y * x_m);
	end
	return Float64(z_s * Float64(x_s * tmp))
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
z_m = abs(z);
z_s = sign(z) * abs(1.0);
x_m, y, z_m, t, a = num2cell(sort([x_m, y, z_m, t, a])){:}
function tmp_2 = code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 9500000.0)
		tmp = (x_m * (z_m * y)) / (z_m + (-0.5 * ((t * a) / z_m)));
	else
		tmp = y * x_m;
	end
	tmp_2 = z_s * (x_s * tmp);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, x$95$s_, x$95$m_, y_, z$95$m_, t_, a_] := N[(z$95$s * N[(x$95$s * If[LessEqual[z$95$m, 9500000.0], N[(N[(x$95$m * N[(z$95$m * y), $MachinePrecision]), $MachinePrecision] / N[(z$95$m + N[(-0.5 * N[(N[(t * a), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\
\\
z\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 9500000:\\
\;\;\;\;\frac{x\_m \cdot \left(z\_m \cdot y\right)}{z\_m + -0.5 \cdot \frac{t \cdot a}{z\_m}}\\

\mathbf{else}:\\
\;\;\;\;y \cdot x\_m\\


\end{array}\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 9.5e6

    1. Initial program 63.0%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Step-by-step derivation
      1. associate-*l*63.2%

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

      \[\leadsto \color{blue}{\frac{x \cdot \left(y \cdot z\right)}{\sqrt{z \cdot z - t \cdot a}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 26.9%

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

    if 9.5e6 < z

    1. Initial program 52.7%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Step-by-step derivation
      1. associate-/l*57.9%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      2. associate-*l/58.1%

        \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}} \cdot y} \]
      3. *-commutative58.1%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      4. associate-/l*52.8%

        \[\leadsto y \cdot \color{blue}{\frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    3. Simplified52.8%

      \[\leadsto \color{blue}{y \cdot \frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 94.9%

      \[\leadsto y \cdot \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification46.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 9500000:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{z + -0.5 \cdot \frac{t \cdot a}{z}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 78.5% accurate, 5.6× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ z_m = \left|z\right| \\ z_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\ \\ z\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 15200000:\\ \;\;\;\;\frac{z\_m \cdot \left(y \cdot x\_m\right)}{z\_m + -0.5 \cdot \frac{t \cdot a}{z\_m}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\_m\\ \end{array}\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s x_s x_m y z_m t a)
 :precision binary64
 (*
  z_s
  (*
   x_s
   (if (<= z_m 15200000.0)
     (/ (* z_m (* y x_m)) (+ z_m (* -0.5 (/ (* t a) z_m))))
     (* y x_m)))))
x_m = fabs(x);
x_s = copysign(1.0, x);
z_m = fabs(z);
z_s = copysign(1.0, z);
assert(x_m < y && y < z_m && z_m < t && t < a);
double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 15200000.0) {
		tmp = (z_m * (y * x_m)) / (z_m + (-0.5 * ((t * a) / z_m)));
	} else {
		tmp = y * x_m;
	}
	return z_s * (x_s * tmp);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
z_m = abs(z)
z_s = copysign(1.0d0, z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, x_s, x_m, y, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 15200000.0d0) then
        tmp = (z_m * (y * x_m)) / (z_m + ((-0.5d0) * ((t * a) / z_m)))
    else
        tmp = y * x_m
    end if
    code = z_s * (x_s * tmp)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
assert x_m < y && y < z_m && z_m < t && t < a;
public static double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 15200000.0) {
		tmp = (z_m * (y * x_m)) / (z_m + (-0.5 * ((t * a) / z_m)));
	} else {
		tmp = y * x_m;
	}
	return z_s * (x_s * tmp);
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
z_m = math.fabs(z)
z_s = math.copysign(1.0, z)
[x_m, y, z_m, t, a] = sort([x_m, y, z_m, t, a])
def code(z_s, x_s, x_m, y, z_m, t, a):
	tmp = 0
	if z_m <= 15200000.0:
		tmp = (z_m * (y * x_m)) / (z_m + (-0.5 * ((t * a) / z_m)))
	else:
		tmp = y * x_m
	return z_s * (x_s * tmp)
x_m = abs(x)
x_s = copysign(1.0, x)
z_m = abs(z)
z_s = copysign(1.0, z)
x_m, y, z_m, t, a = sort([x_m, y, z_m, t, a])
function code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0
	if (z_m <= 15200000.0)
		tmp = Float64(Float64(z_m * Float64(y * x_m)) / Float64(z_m + Float64(-0.5 * Float64(Float64(t * a) / z_m))));
	else
		tmp = Float64(y * x_m);
	end
	return Float64(z_s * Float64(x_s * tmp))
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
z_m = abs(z);
z_s = sign(z) * abs(1.0);
x_m, y, z_m, t, a = num2cell(sort([x_m, y, z_m, t, a])){:}
function tmp_2 = code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 15200000.0)
		tmp = (z_m * (y * x_m)) / (z_m + (-0.5 * ((t * a) / z_m)));
	else
		tmp = y * x_m;
	end
	tmp_2 = z_s * (x_s * tmp);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, x$95$s_, x$95$m_, y_, z$95$m_, t_, a_] := N[(z$95$s * N[(x$95$s * If[LessEqual[z$95$m, 15200000.0], N[(N[(z$95$m * N[(y * x$95$m), $MachinePrecision]), $MachinePrecision] / N[(z$95$m + N[(-0.5 * N[(N[(t * a), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\
\\
z\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 15200000:\\
\;\;\;\;\frac{z\_m \cdot \left(y \cdot x\_m\right)}{z\_m + -0.5 \cdot \frac{t \cdot a}{z\_m}}\\

\mathbf{else}:\\
\;\;\;\;y \cdot x\_m\\


\end{array}\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 1.52e7

    1. Initial program 63.0%

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

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

    if 1.52e7 < z

    1. Initial program 52.7%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Step-by-step derivation
      1. associate-/l*57.9%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      2. associate-*l/58.1%

        \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}} \cdot y} \]
      3. *-commutative58.1%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      4. associate-/l*52.8%

        \[\leadsto y \cdot \color{blue}{\frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    3. Simplified52.8%

      \[\leadsto \color{blue}{y \cdot \frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 94.9%

      \[\leadsto y \cdot \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification47.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 15200000:\\ \;\;\;\;\frac{z \cdot \left(y \cdot x\right)}{z + -0.5 \cdot \frac{t \cdot a}{z}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 75.7% accurate, 8.1× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ z_m = \left|z\right| \\ z_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\ \\ z\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 8.2 \cdot 10^{-105}:\\ \;\;\;\;\frac{y}{z\_m \cdot \frac{1}{z\_m \cdot x\_m}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\_m\\ \end{array}\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s x_s x_m y z_m t a)
 :precision binary64
 (*
  z_s
  (* x_s (if (<= z_m 8.2e-105) (/ y (* z_m (/ 1.0 (* z_m x_m)))) (* y x_m)))))
x_m = fabs(x);
x_s = copysign(1.0, x);
z_m = fabs(z);
z_s = copysign(1.0, z);
assert(x_m < y && y < z_m && z_m < t && t < a);
double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 8.2e-105) {
		tmp = y / (z_m * (1.0 / (z_m * x_m)));
	} else {
		tmp = y * x_m;
	}
	return z_s * (x_s * tmp);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
z_m = abs(z)
z_s = copysign(1.0d0, z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, x_s, x_m, y, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 8.2d-105) then
        tmp = y / (z_m * (1.0d0 / (z_m * x_m)))
    else
        tmp = y * x_m
    end if
    code = z_s * (x_s * tmp)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
assert x_m < y && y < z_m && z_m < t && t < a;
public static double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 8.2e-105) {
		tmp = y / (z_m * (1.0 / (z_m * x_m)));
	} else {
		tmp = y * x_m;
	}
	return z_s * (x_s * tmp);
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
z_m = math.fabs(z)
z_s = math.copysign(1.0, z)
[x_m, y, z_m, t, a] = sort([x_m, y, z_m, t, a])
def code(z_s, x_s, x_m, y, z_m, t, a):
	tmp = 0
	if z_m <= 8.2e-105:
		tmp = y / (z_m * (1.0 / (z_m * x_m)))
	else:
		tmp = y * x_m
	return z_s * (x_s * tmp)
x_m = abs(x)
x_s = copysign(1.0, x)
z_m = abs(z)
z_s = copysign(1.0, z)
x_m, y, z_m, t, a = sort([x_m, y, z_m, t, a])
function code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0
	if (z_m <= 8.2e-105)
		tmp = Float64(y / Float64(z_m * Float64(1.0 / Float64(z_m * x_m))));
	else
		tmp = Float64(y * x_m);
	end
	return Float64(z_s * Float64(x_s * tmp))
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
z_m = abs(z);
z_s = sign(z) * abs(1.0);
x_m, y, z_m, t, a = num2cell(sort([x_m, y, z_m, t, a])){:}
function tmp_2 = code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 8.2e-105)
		tmp = y / (z_m * (1.0 / (z_m * x_m)));
	else
		tmp = y * x_m;
	end
	tmp_2 = z_s * (x_s * tmp);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, x$95$s_, x$95$m_, y_, z$95$m_, t_, a_] := N[(z$95$s * N[(x$95$s * If[LessEqual[z$95$m, 8.2e-105], N[(y / N[(z$95$m * N[(1.0 / N[(z$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\
\\
z\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 8.2 \cdot 10^{-105}:\\
\;\;\;\;\frac{y}{z\_m \cdot \frac{1}{z\_m \cdot x\_m}}\\

\mathbf{else}:\\
\;\;\;\;y \cdot x\_m\\


\end{array}\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 8.20000000000000061e-105

    1. Initial program 60.6%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Step-by-step derivation
      1. associate-*l*60.2%

        \[\leadsto \frac{\color{blue}{x \cdot \left(y \cdot z\right)}}{\sqrt{z \cdot z - t \cdot a}} \]
      2. *-commutative60.2%

        \[\leadsto \frac{x \cdot \color{blue}{\left(z \cdot y\right)}}{\sqrt{z \cdot z - t \cdot a}} \]
      3. associate-*l*60.3%

        \[\leadsto \frac{\color{blue}{\left(x \cdot z\right) \cdot y}}{\sqrt{z \cdot z - t \cdot a}} \]
      4. *-commutative60.3%

        \[\leadsto \frac{\color{blue}{y \cdot \left(x \cdot z\right)}}{\sqrt{z \cdot z - t \cdot a}} \]
      5. associate-/l*60.4%

        \[\leadsto \color{blue}{\frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{x \cdot z}}} \]
    3. Simplified60.4%

      \[\leadsto \color{blue}{\frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{x \cdot z}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 20.8%

      \[\leadsto \frac{y}{\frac{\color{blue}{z}}{x \cdot z}} \]
    6. Step-by-step derivation
      1. div-inv20.8%

        \[\leadsto \frac{y}{\color{blue}{z \cdot \frac{1}{x \cdot z}}} \]
      2. *-commutative20.8%

        \[\leadsto \frac{y}{z \cdot \frac{1}{\color{blue}{z \cdot x}}} \]
    7. Applied egg-rr20.8%

      \[\leadsto \frac{y}{\color{blue}{z \cdot \frac{1}{z \cdot x}}} \]

    if 8.20000000000000061e-105 < z

    1. Initial program 59.0%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Step-by-step derivation
      1. associate-/l*63.1%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      2. associate-*l/65.1%

        \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}} \cdot y} \]
      3. *-commutative65.1%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      4. associate-/l*60.1%

        \[\leadsto y \cdot \color{blue}{\frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    3. Simplified60.1%

      \[\leadsto \color{blue}{y \cdot \frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 85.4%

      \[\leadsto y \cdot \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification45.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 8.2 \cdot 10^{-105}:\\ \;\;\;\;\frac{y}{z \cdot \frac{1}{z \cdot x}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 75.6% accurate, 9.4× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ z_m = \left|z\right| \\ z_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\ \\ z\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 1.15 \cdot 10^{-108}:\\ \;\;\;\;y \cdot \frac{z\_m \cdot x\_m}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\_m\\ \end{array}\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s x_s x_m y z_m t a)
 :precision binary64
 (* z_s (* x_s (if (<= z_m 1.15e-108) (* y (/ (* z_m x_m) z_m)) (* y x_m)))))
x_m = fabs(x);
x_s = copysign(1.0, x);
z_m = fabs(z);
z_s = copysign(1.0, z);
assert(x_m < y && y < z_m && z_m < t && t < a);
double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 1.15e-108) {
		tmp = y * ((z_m * x_m) / z_m);
	} else {
		tmp = y * x_m;
	}
	return z_s * (x_s * tmp);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
z_m = abs(z)
z_s = copysign(1.0d0, z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, x_s, x_m, y, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 1.15d-108) then
        tmp = y * ((z_m * x_m) / z_m)
    else
        tmp = y * x_m
    end if
    code = z_s * (x_s * tmp)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
assert x_m < y && y < z_m && z_m < t && t < a;
public static double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 1.15e-108) {
		tmp = y * ((z_m * x_m) / z_m);
	} else {
		tmp = y * x_m;
	}
	return z_s * (x_s * tmp);
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
z_m = math.fabs(z)
z_s = math.copysign(1.0, z)
[x_m, y, z_m, t, a] = sort([x_m, y, z_m, t, a])
def code(z_s, x_s, x_m, y, z_m, t, a):
	tmp = 0
	if z_m <= 1.15e-108:
		tmp = y * ((z_m * x_m) / z_m)
	else:
		tmp = y * x_m
	return z_s * (x_s * tmp)
x_m = abs(x)
x_s = copysign(1.0, x)
z_m = abs(z)
z_s = copysign(1.0, z)
x_m, y, z_m, t, a = sort([x_m, y, z_m, t, a])
function code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0
	if (z_m <= 1.15e-108)
		tmp = Float64(y * Float64(Float64(z_m * x_m) / z_m));
	else
		tmp = Float64(y * x_m);
	end
	return Float64(z_s * Float64(x_s * tmp))
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
z_m = abs(z);
z_s = sign(z) * abs(1.0);
x_m, y, z_m, t, a = num2cell(sort([x_m, y, z_m, t, a])){:}
function tmp_2 = code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 1.15e-108)
		tmp = y * ((z_m * x_m) / z_m);
	else
		tmp = y * x_m;
	end
	tmp_2 = z_s * (x_s * tmp);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, x$95$s_, x$95$m_, y_, z$95$m_, t_, a_] := N[(z$95$s * N[(x$95$s * If[LessEqual[z$95$m, 1.15e-108], N[(y * N[(N[(z$95$m * x$95$m), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision], N[(y * x$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\
\\
z\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 1.15 \cdot 10^{-108}:\\
\;\;\;\;y \cdot \frac{z\_m \cdot x\_m}{z\_m}\\

\mathbf{else}:\\
\;\;\;\;y \cdot x\_m\\


\end{array}\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 1.14999999999999998e-108

    1. Initial program 60.6%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Step-by-step derivation
      1. associate-/l*61.5%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      2. associate-*l/62.7%

        \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}} \cdot y} \]
      3. *-commutative62.7%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      4. associate-/l*60.4%

        \[\leadsto y \cdot \color{blue}{\frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    3. Simplified60.4%

      \[\leadsto \color{blue}{y \cdot \frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 20.8%

      \[\leadsto y \cdot \frac{x \cdot z}{\color{blue}{z}} \]

    if 1.14999999999999998e-108 < z

    1. Initial program 59.0%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Step-by-step derivation
      1. associate-/l*63.1%

        \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      2. associate-*l/65.1%

        \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}} \cdot y} \]
      3. *-commutative65.1%

        \[\leadsto \color{blue}{y \cdot \frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      4. associate-/l*60.1%

        \[\leadsto y \cdot \color{blue}{\frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    3. Simplified60.1%

      \[\leadsto \color{blue}{y \cdot \frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 85.4%

      \[\leadsto y \cdot \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification45.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 1.15 \cdot 10^{-108}:\\ \;\;\;\;y \cdot \frac{z \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 69.9% accurate, 12.6× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ z_m = \left|z\right| \\ z_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\ \\ z\_s \cdot \left(x\_s \cdot \frac{y}{z\_m \cdot \frac{\frac{1}{z\_m}}{x\_m}}\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s x_s x_m y z_m t a)
 :precision binary64
 (* z_s (* x_s (/ y (* z_m (/ (/ 1.0 z_m) x_m))))))
x_m = fabs(x);
x_s = copysign(1.0, x);
z_m = fabs(z);
z_s = copysign(1.0, z);
assert(x_m < y && y < z_m && z_m < t && t < a);
double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	return z_s * (x_s * (y / (z_m * ((1.0 / z_m) / x_m))));
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
z_m = abs(z)
z_s = copysign(1.0d0, z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, x_s, x_m, y, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = z_s * (x_s * (y / (z_m * ((1.0d0 / z_m) / x_m))))
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
assert x_m < y && y < z_m && z_m < t && t < a;
public static double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	return z_s * (x_s * (y / (z_m * ((1.0 / z_m) / x_m))));
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
z_m = math.fabs(z)
z_s = math.copysign(1.0, z)
[x_m, y, z_m, t, a] = sort([x_m, y, z_m, t, a])
def code(z_s, x_s, x_m, y, z_m, t, a):
	return z_s * (x_s * (y / (z_m * ((1.0 / z_m) / x_m))))
x_m = abs(x)
x_s = copysign(1.0, x)
z_m = abs(z)
z_s = copysign(1.0, z)
x_m, y, z_m, t, a = sort([x_m, y, z_m, t, a])
function code(z_s, x_s, x_m, y, z_m, t, a)
	return Float64(z_s * Float64(x_s * Float64(y / Float64(z_m * Float64(Float64(1.0 / z_m) / x_m)))))
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
z_m = abs(z);
z_s = sign(z) * abs(1.0);
x_m, y, z_m, t, a = num2cell(sort([x_m, y, z_m, t, a])){:}
function tmp = code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = z_s * (x_s * (y / (z_m * ((1.0 / z_m) / x_m))));
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, x$95$s_, x$95$m_, y_, z$95$m_, t_, a_] := N[(z$95$s * N[(x$95$s * N[(y / N[(z$95$m * N[(N[(1.0 / z$95$m), $MachinePrecision] / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\
\\
z\_s \cdot \left(x\_s \cdot \frac{y}{z\_m \cdot \frac{\frac{1}{z\_m}}{x\_m}}\right)
\end{array}
Derivation
  1. Initial program 60.0%

    \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
  2. Step-by-step derivation
    1. associate-*l*58.9%

      \[\leadsto \frac{\color{blue}{x \cdot \left(y \cdot z\right)}}{\sqrt{z \cdot z - t \cdot a}} \]
    2. *-commutative58.9%

      \[\leadsto \frac{x \cdot \color{blue}{\left(z \cdot y\right)}}{\sqrt{z \cdot z - t \cdot a}} \]
    3. associate-*l*59.4%

      \[\leadsto \frac{\color{blue}{\left(x \cdot z\right) \cdot y}}{\sqrt{z \cdot z - t \cdot a}} \]
    4. *-commutative59.4%

      \[\leadsto \frac{\color{blue}{y \cdot \left(x \cdot z\right)}}{\sqrt{z \cdot z - t \cdot a}} \]
    5. associate-/l*60.2%

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

    \[\leadsto \color{blue}{\frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{x \cdot z}}} \]
  4. Add Preprocessing
  5. Taylor expanded in z around inf 41.2%

    \[\leadsto \frac{y}{\frac{\color{blue}{z}}{x \cdot z}} \]
  6. Step-by-step derivation
    1. div-inv41.2%

      \[\leadsto \frac{y}{\color{blue}{z \cdot \frac{1}{x \cdot z}}} \]
    2. *-commutative41.2%

      \[\leadsto \frac{y}{z \cdot \frac{1}{\color{blue}{z \cdot x}}} \]
  7. Applied egg-rr41.2%

    \[\leadsto \frac{y}{\color{blue}{z \cdot \frac{1}{z \cdot x}}} \]
  8. Step-by-step derivation
    1. *-un-lft-identity41.2%

      \[\leadsto \frac{y}{z \cdot \color{blue}{\left(1 \cdot \frac{1}{z \cdot x}\right)}} \]
    2. associate-/r*41.3%

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

    \[\leadsto \frac{y}{z \cdot \color{blue}{\left(1 \cdot \frac{\frac{1}{z}}{x}\right)}} \]
  10. Final simplification41.3%

    \[\leadsto \frac{y}{z \cdot \frac{\frac{1}{z}}{x}} \]
  11. Add Preprocessing

Alternative 12: 72.8% accurate, 37.7× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ z_m = \left|z\right| \\ z_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\ \\ z\_s \cdot \left(x\_s \cdot \left(y \cdot x\_m\right)\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s x_s x_m y z_m t a) :precision binary64 (* z_s (* x_s (* y x_m))))
x_m = fabs(x);
x_s = copysign(1.0, x);
z_m = fabs(z);
z_s = copysign(1.0, z);
assert(x_m < y && y < z_m && z_m < t && t < a);
double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	return z_s * (x_s * (y * x_m));
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
z_m = abs(z)
z_s = copysign(1.0d0, z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, x_s, x_m, y, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = z_s * (x_s * (y * x_m))
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
assert x_m < y && y < z_m && z_m < t && t < a;
public static double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	return z_s * (x_s * (y * x_m));
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
z_m = math.fabs(z)
z_s = math.copysign(1.0, z)
[x_m, y, z_m, t, a] = sort([x_m, y, z_m, t, a])
def code(z_s, x_s, x_m, y, z_m, t, a):
	return z_s * (x_s * (y * x_m))
x_m = abs(x)
x_s = copysign(1.0, x)
z_m = abs(z)
z_s = copysign(1.0, z)
x_m, y, z_m, t, a = sort([x_m, y, z_m, t, a])
function code(z_s, x_s, x_m, y, z_m, t, a)
	return Float64(z_s * Float64(x_s * Float64(y * x_m)))
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
z_m = abs(z);
z_s = sign(z) * abs(1.0);
x_m, y, z_m, t, a = num2cell(sort([x_m, y, z_m, t, a])){:}
function tmp = code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = z_s * (x_s * (y * x_m));
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, x$95$s_, x$95$m_, y_, z$95$m_, t_, a_] := N[(z$95$s * N[(x$95$s * N[(y * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\
\\
z\_s \cdot \left(x\_s \cdot \left(y \cdot x\_m\right)\right)
\end{array}
Derivation
  1. Initial program 60.0%

    \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
  2. Step-by-step derivation
    1. associate-/l*62.1%

      \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
    2. associate-*l/63.6%

      \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}} \cdot y} \]
    3. *-commutative63.6%

      \[\leadsto \color{blue}{y \cdot \frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
    4. associate-/l*60.3%

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

    \[\leadsto \color{blue}{y \cdot \frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
  4. Add Preprocessing
  5. Taylor expanded in z around inf 41.5%

    \[\leadsto y \cdot \color{blue}{x} \]
  6. Final simplification41.5%

    \[\leadsto y \cdot x \]
  7. Add Preprocessing

Developer target: 88.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \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} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (< z -3.1921305903852764e+46)
   (- (* y x))
   (if (< z 5.976268120920894e+90)
     (/ (* x z) (/ (sqrt (- (* z z) (* a t))) y))
     (* y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z < -3.1921305903852764e+46) {
		tmp = -(y * x);
	} else if (z < 5.976268120920894e+90) {
		tmp = (x * z) / (sqrt(((z * z) - (a * t))) / y);
	} else {
		tmp = y * x;
	}
	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
    real(8) :: tmp
    if (z < (-3.1921305903852764d+46)) then
        tmp = -(y * x)
    else if (z < 5.976268120920894d+90) then
        tmp = (x * z) / (sqrt(((z * z) - (a * t))) / y)
    else
        tmp = y * x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z < -3.1921305903852764e+46) {
		tmp = -(y * x);
	} else if (z < 5.976268120920894e+90) {
		tmp = (x * z) / (Math.sqrt(((z * z) - (a * t))) / y);
	} else {
		tmp = y * x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z < -3.1921305903852764e+46:
		tmp = -(y * x)
	elif z < 5.976268120920894e+90:
		tmp = (x * z) / (math.sqrt(((z * z) - (a * t))) / y)
	else:
		tmp = y * x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z < -3.1921305903852764e+46)
		tmp = Float64(-Float64(y * x));
	elseif (z < 5.976268120920894e+90)
		tmp = Float64(Float64(x * z) / Float64(sqrt(Float64(Float64(z * z) - Float64(a * t))) / y));
	else
		tmp = Float64(y * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z < -3.1921305903852764e+46)
		tmp = -(y * x);
	elseif (z < 5.976268120920894e+90)
		tmp = (x * z) / (sqrt(((z * z) - (a * t))) / y);
	else
		tmp = y * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Less[z, -3.1921305903852764e+46], (-N[(y * x), $MachinePrecision]), If[Less[z, 5.976268120920894e+90], N[(N[(x * z), $MachinePrecision] / N[(N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}

\\
\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}
\end{array}

Reproduce

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