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

Percentage Accurate: 60.9% → 89.5%
Time: 22.3s
Alternatives: 16
Speedup: 18.6×

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 16 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: 60.9% 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: 89.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+139}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+108}:\\ \;\;\;\;\frac{z \cdot \left(y \cdot x\right)}{\sqrt{z \cdot z - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1e+139)
   (* y (- x))
   (if (<= z 2.05e+108) (/ (* z (* y x)) (sqrt (- (* z z) (* t a)))) (* y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1e+139) {
		tmp = y * -x;
	} else if (z <= 2.05e+108) {
		tmp = (z * (y * x)) / sqrt(((z * z) - (t * a)));
	} 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 <= (-1d+139)) then
        tmp = y * -x
    else if (z <= 2.05d+108) then
        tmp = (z * (y * x)) / sqrt(((z * z) - (t * a)))
    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 <= -1e+139) {
		tmp = y * -x;
	} else if (z <= 2.05e+108) {
		tmp = (z * (y * x)) / Math.sqrt(((z * z) - (t * a)));
	} else {
		tmp = y * x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1e+139:
		tmp = y * -x
	elif z <= 2.05e+108:
		tmp = (z * (y * x)) / math.sqrt(((z * z) - (t * a)))
	else:
		tmp = y * x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1e+139)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 2.05e+108)
		tmp = Float64(Float64(z * Float64(y * x)) / sqrt(Float64(Float64(z * z) - Float64(t * a))));
	else
		tmp = Float64(y * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1e+139)
		tmp = y * -x;
	elseif (z <= 2.05e+108)
		tmp = (z * (y * x)) / sqrt(((z * z) - (t * a)));
	else
		tmp = y * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1e+139], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 2.05e+108], N[(N[(z * N[(y * x), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+139}:\\
\;\;\;\;y \cdot \left(-x\right)\\

\mathbf{elif}\;z \leq 2.05 \cdot 10^{+108}:\\
\;\;\;\;\frac{z \cdot \left(y \cdot x\right)}{\sqrt{z \cdot z - t \cdot a}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.00000000000000003e139

    1. Initial program 17.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot y\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg100.0%

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. *-commutative100.0%

        \[\leadsto -\color{blue}{y \cdot x} \]
      3. distribute-rgt-neg-in100.0%

        \[\leadsto \color{blue}{y \cdot \left(-x\right)} \]
    6. Simplified100.0%

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

    if -1.00000000000000003e139 < z < 2.05e108

    1. Initial program 85.5%

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

    if 2.05e108 < z

    1. Initial program 28.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative100.0%

        \[\leadsto \color{blue}{y \cdot x} \]
    6. Simplified100.0%

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

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

Alternative 2: 89.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+148}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{+50}:\\ \;\;\;\;x \cdot \frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.3e+148)
   (* y (- x))
   (if (<= z 1.55e+50) (* x (/ z (/ (sqrt (- (* z z) (* t a))) y))) (* y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.3e+148) {
		tmp = y * -x;
	} else if (z <= 1.55e+50) {
		tmp = x * (z / (sqrt(((z * z) - (t * a))) / 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 <= (-1.3d+148)) then
        tmp = y * -x
    else if (z <= 1.55d+50) then
        tmp = x * (z / (sqrt(((z * z) - (t * a))) / 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 <= -1.3e+148) {
		tmp = y * -x;
	} else if (z <= 1.55e+50) {
		tmp = x * (z / (Math.sqrt(((z * z) - (t * a))) / y));
	} else {
		tmp = y * x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.3e+148:
		tmp = y * -x
	elif z <= 1.55e+50:
		tmp = x * (z / (math.sqrt(((z * z) - (t * a))) / y))
	else:
		tmp = y * x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.3e+148)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 1.55e+50)
		tmp = Float64(x * Float64(z / Float64(sqrt(Float64(Float64(z * z) - Float64(t * a))) / y)));
	else
		tmp = Float64(y * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.3e+148)
		tmp = y * -x;
	elseif (z <= 1.55e+50)
		tmp = x * (z / (sqrt(((z * z) - (t * a))) / y));
	else
		tmp = y * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.3e+148], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 1.55e+50], N[(x * N[(z / N[(N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+148}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.3e148

    1. Initial program 14.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot y\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg100.0%

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. *-commutative100.0%

        \[\leadsto -\color{blue}{y \cdot x} \]
      3. distribute-rgt-neg-in100.0%

        \[\leadsto \color{blue}{y \cdot \left(-x\right)} \]
    6. Simplified100.0%

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

    if -1.3e148 < z < 1.55000000000000001e50

    1. Initial program 84.8%

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

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

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

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

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

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

    if 1.55000000000000001e50 < z

    1. Initial program 38.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative98.6%

        \[\leadsto \color{blue}{y \cdot x} \]
    6. Simplified98.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+148}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{+50}:\\ \;\;\;\;x \cdot \frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 3: 88.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.7 \cdot 10^{+124}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{+107}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{\sqrt{z \cdot z - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -3.7e+124)
   (* y (- x))
   (if (<= z 9.8e+107) (/ (* x (* z y)) (sqrt (- (* z z) (* t a)))) (* y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.7e+124) {
		tmp = y * -x;
	} else if (z <= 9.8e+107) {
		tmp = (x * (z * y)) / sqrt(((z * z) - (t * a)));
	} 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.7d+124)) then
        tmp = y * -x
    else if (z <= 9.8d+107) then
        tmp = (x * (z * y)) / sqrt(((z * z) - (t * a)))
    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.7e+124) {
		tmp = y * -x;
	} else if (z <= 9.8e+107) {
		tmp = (x * (z * y)) / Math.sqrt(((z * z) - (t * a)));
	} else {
		tmp = y * x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -3.7e+124:
		tmp = y * -x
	elif z <= 9.8e+107:
		tmp = (x * (z * y)) / math.sqrt(((z * z) - (t * a)))
	else:
		tmp = y * x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -3.7e+124)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 9.8e+107)
		tmp = Float64(Float64(x * Float64(z * y)) / sqrt(Float64(Float64(z * z) - Float64(t * a))));
	else
		tmp = Float64(y * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -3.7e+124)
		tmp = y * -x;
	elseif (z <= 9.8e+107)
		tmp = (x * (z * y)) / sqrt(((z * z) - (t * a)));
	else
		tmp = y * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.7e+124], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 9.8e+107], N[(N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{+124}:\\
\;\;\;\;y \cdot \left(-x\right)\\

\mathbf{elif}\;z \leq 9.8 \cdot 10^{+107}:\\
\;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{\sqrt{z \cdot z - t \cdot a}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.70000000000000008e124

    1. Initial program 20.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot y\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg100.0%

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. *-commutative100.0%

        \[\leadsto -\color{blue}{y \cdot x} \]
      3. distribute-rgt-neg-in100.0%

        \[\leadsto \color{blue}{y \cdot \left(-x\right)} \]
    6. Simplified100.0%

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

    if -3.70000000000000008e124 < z < 9.8000000000000003e107

    1. Initial program 85.3%

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

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

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

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

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

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

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

    if 9.8000000000000003e107 < z

    1. Initial program 28.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative100.0%

        \[\leadsto \color{blue}{y \cdot x} \]
    6. Simplified100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.7 \cdot 10^{+124}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{+107}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{\sqrt{z \cdot z - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 4: 88.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.6 \cdot 10^{+77}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{+107}:\\ \;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{\sqrt{z \cdot z - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -7.6e+77)
   (* y (- x))
   (if (<= z 9.2e+107) (/ (* y (* z x)) (sqrt (- (* z z) (* t a)))) (* y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -7.6e+77) {
		tmp = y * -x;
	} else if (z <= 9.2e+107) {
		tmp = (y * (z * x)) / sqrt(((z * z) - (t * a)));
	} 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 <= (-7.6d+77)) then
        tmp = y * -x
    else if (z <= 9.2d+107) then
        tmp = (y * (z * x)) / sqrt(((z * z) - (t * a)))
    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 <= -7.6e+77) {
		tmp = y * -x;
	} else if (z <= 9.2e+107) {
		tmp = (y * (z * x)) / Math.sqrt(((z * z) - (t * a)));
	} else {
		tmp = y * x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -7.6e+77:
		tmp = y * -x
	elif z <= 9.2e+107:
		tmp = (y * (z * x)) / math.sqrt(((z * z) - (t * a)))
	else:
		tmp = y * x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -7.6e+77)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 9.2e+107)
		tmp = Float64(Float64(y * Float64(z * x)) / sqrt(Float64(Float64(z * z) - Float64(t * a))));
	else
		tmp = Float64(y * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -7.6e+77)
		tmp = y * -x;
	elseif (z <= 9.2e+107)
		tmp = (y * (z * x)) / sqrt(((z * z) - (t * a)));
	else
		tmp = y * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.6e+77], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 9.2e+107], N[(N[(y * N[(z * x), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.6 \cdot 10^{+77}:\\
\;\;\;\;y \cdot \left(-x\right)\\

\mathbf{elif}\;z \leq 9.2 \cdot 10^{+107}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{\sqrt{z \cdot z - t \cdot a}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.6000000000000002e77

    1. Initial program 32.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot y\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg98.4%

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. *-commutative98.4%

        \[\leadsto -\color{blue}{y \cdot x} \]
      3. distribute-rgt-neg-in98.4%

        \[\leadsto \color{blue}{y \cdot \left(-x\right)} \]
    6. Simplified98.4%

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

    if -7.6000000000000002e77 < z < 9.2000000000000001e107

    1. Initial program 84.5%

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

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

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

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

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

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

    if 9.2000000000000001e107 < z

    1. Initial program 28.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative100.0%

        \[\leadsto \color{blue}{y \cdot x} \]
    6. Simplified100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.6 \cdot 10^{+77}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{+107}:\\ \;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{\sqrt{z \cdot z - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 5: 83.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.24 \cdot 10^{-60}:\\ \;\;\;\;\frac{1}{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} + -1}{y \cdot x}}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-113}:\\ \;\;\;\;x \cdot \frac{z}{\frac{\sqrt{t \cdot \left(-a\right)}}{y}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{z}{z + 0.5 \cdot \left(t \cdot \frac{a}{z}\right)}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.24e-60)
   (/ 1.0 (/ (+ (/ (* 0.5 (* a (/ t z))) z) -1.0) (* y x)))
   (if (<= z 1.1e-113)
     (* x (/ z (/ (sqrt (* t (- a))) y)))
     (* x (* y (/ z (+ z (* 0.5 (* t (/ a z))))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.24e-60) {
		tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x));
	} else if (z <= 1.1e-113) {
		tmp = x * (z / (sqrt((t * -a)) / y));
	} else {
		tmp = x * (y * (z / (z + (0.5 * (t * (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
    real(8) :: tmp
    if (z <= (-1.24d-60)) then
        tmp = 1.0d0 / ((((0.5d0 * (a * (t / z))) / z) + (-1.0d0)) / (y * x))
    else if (z <= 1.1d-113) then
        tmp = x * (z / (sqrt((t * -a)) / y))
    else
        tmp = x * (y * (z / (z + (0.5d0 * (t * (a / z))))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.24e-60) {
		tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x));
	} else if (z <= 1.1e-113) {
		tmp = x * (z / (Math.sqrt((t * -a)) / y));
	} else {
		tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.24e-60:
		tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x))
	elif z <= 1.1e-113:
		tmp = x * (z / (math.sqrt((t * -a)) / y))
	else:
		tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.24e-60)
		tmp = Float64(1.0 / Float64(Float64(Float64(Float64(0.5 * Float64(a * Float64(t / z))) / z) + -1.0) / Float64(y * x)));
	elseif (z <= 1.1e-113)
		tmp = Float64(x * Float64(z / Float64(sqrt(Float64(t * Float64(-a))) / y)));
	else
		tmp = Float64(x * Float64(y * Float64(z / Float64(z + Float64(0.5 * Float64(t * Float64(a / z)))))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.24e-60)
		tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x));
	elseif (z <= 1.1e-113)
		tmp = x * (z / (sqrt((t * -a)) / y));
	else
		tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.24e-60], N[(1.0 / N[(N[(N[(N[(0.5 * N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + -1.0), $MachinePrecision] / N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e-113], N[(x * N[(z / N[(N[Sqrt[N[(t * (-a)), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(z / N[(z + N[(0.5 * N[(t * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.24 \cdot 10^{-60}:\\
\;\;\;\;\frac{1}{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} + -1}{y \cdot x}}\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{-113}:\\
\;\;\;\;x \cdot \frac{z}{\frac{\sqrt{t \cdot \left(-a\right)}}{y}}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{z + 0.5 \cdot \left(t \cdot \frac{a}{z}\right)}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.23999999999999998e-60

    1. Initial program 48.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z}{\color{blue}{z \cdot y}}} \]
    7. Simplified79.8%

      \[\leadsto \color{blue}{\frac{x}{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z}{z \cdot y}}} \]
    8. Step-by-step derivation
      1. clear-num78.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z}{z \cdot y}}{x}}} \]
      2. inv-pow78.9%

        \[\leadsto \color{blue}{{\left(\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z}{z \cdot y}}{x}\right)}^{-1}} \]
      3. associate-/r*90.7%

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

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

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

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

        \[\leadsto {\left(\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - \color{blue}{{z}^{\left(1 - 1\right)}}}{y}}{x}\right)}^{-1} \]
      8. metadata-eval90.7%

        \[\leadsto {\left(\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - {z}^{\color{blue}{0}}}{y}}{x}\right)}^{-1} \]
      9. metadata-eval90.7%

        \[\leadsto {\left(\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - \color{blue}{1}}{y}}{x}\right)}^{-1} \]
    9. Applied egg-rr90.7%

      \[\leadsto \color{blue}{{\left(\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - 1}{y}}{x}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. unpow-190.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - 1}{y}}{x}}} \]
      2. associate-/l/92.1%

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

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

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

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

    if -1.23999999999999998e-60 < z < 1.10000000000000002e-113

    1. Initial program 77.1%

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

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

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

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

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

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

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

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

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

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

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

    if 1.10000000000000002e-113 < z

    1. Initial program 57.2%

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

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

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

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

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

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

      \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{-1 \cdot z + 0.5 \cdot \frac{a \cdot t}{z}}}{y}} \]
    5. Step-by-step derivation
      1. fma-def19.4%

        \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{\mathsf{fma}\left(-1, z, 0.5 \cdot \frac{a \cdot t}{z}\right)}}{y}} \]
      2. associate-/l*19.4%

        \[\leadsto x \cdot \frac{z}{\frac{\mathsf{fma}\left(-1, z, 0.5 \cdot \color{blue}{\frac{a}{\frac{z}{t}}}\right)}{y}} \]
    6. Simplified19.4%

      \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{\mathsf{fma}\left(-1, z, 0.5 \cdot \frac{a}{\frac{z}{t}}\right)}}{y}} \]
    7. Step-by-step derivation
      1. associate-/r/19.1%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{\mathsf{fma}\left(-1, z, 0.5 \cdot \frac{a}{\frac{z}{t}}\right)} \cdot y\right)} \]
      2. fma-udef19.1%

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

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{\left(-z\right)} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      4. add-sqr-sqrt0.0%

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

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      6. sqr-neg49.7%

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

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{\sqrt{z} \cdot \sqrt{z}} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      8. add-sqr-sqrt90.0%

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{z} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      9. associate-/r/90.0%

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z + 0.5 \cdot \left(\frac{a}{z} \cdot t\right)} \cdot y\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification85.0%

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

Alternative 6: 83.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.4 \cdot 10^{-60}:\\ \;\;\;\;\frac{1}{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} + -1}{y \cdot x}}\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{-114}:\\ \;\;\;\;\left(z \cdot x\right) \cdot \frac{y}{\sqrt{t \cdot \left(-a\right)}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{z}{z + 0.5 \cdot \left(t \cdot \frac{a}{z}\right)}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -6.4e-60)
   (/ 1.0 (/ (+ (/ (* 0.5 (* a (/ t z))) z) -1.0) (* y x)))
   (if (<= z 6.4e-114)
     (* (* z x) (/ y (sqrt (* t (- a)))))
     (* x (* y (/ z (+ z (* 0.5 (* t (/ a z))))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -6.4e-60) {
		tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x));
	} else if (z <= 6.4e-114) {
		tmp = (z * x) * (y / sqrt((t * -a)));
	} else {
		tmp = x * (y * (z / (z + (0.5 * (t * (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
    real(8) :: tmp
    if (z <= (-6.4d-60)) then
        tmp = 1.0d0 / ((((0.5d0 * (a * (t / z))) / z) + (-1.0d0)) / (y * x))
    else if (z <= 6.4d-114) then
        tmp = (z * x) * (y / sqrt((t * -a)))
    else
        tmp = x * (y * (z / (z + (0.5d0 * (t * (a / z))))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -6.4e-60) {
		tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x));
	} else if (z <= 6.4e-114) {
		tmp = (z * x) * (y / Math.sqrt((t * -a)));
	} else {
		tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -6.4e-60:
		tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x))
	elif z <= 6.4e-114:
		tmp = (z * x) * (y / math.sqrt((t * -a)))
	else:
		tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -6.4e-60)
		tmp = Float64(1.0 / Float64(Float64(Float64(Float64(0.5 * Float64(a * Float64(t / z))) / z) + -1.0) / Float64(y * x)));
	elseif (z <= 6.4e-114)
		tmp = Float64(Float64(z * x) * Float64(y / sqrt(Float64(t * Float64(-a)))));
	else
		tmp = Float64(x * Float64(y * Float64(z / Float64(z + Float64(0.5 * Float64(t * Float64(a / z)))))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -6.4e-60)
		tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x));
	elseif (z <= 6.4e-114)
		tmp = (z * x) * (y / sqrt((t * -a)));
	else
		tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.4e-60], N[(1.0 / N[(N[(N[(N[(0.5 * N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + -1.0), $MachinePrecision] / N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.4e-114], N[(N[(z * x), $MachinePrecision] * N[(y / N[Sqrt[N[(t * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(z / N[(z + N[(0.5 * N[(t * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.4 \cdot 10^{-60}:\\
\;\;\;\;\frac{1}{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} + -1}{y \cdot x}}\\

\mathbf{elif}\;z \leq 6.4 \cdot 10^{-114}:\\
\;\;\;\;\left(z \cdot x\right) \cdot \frac{y}{\sqrt{t \cdot \left(-a\right)}}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{z + 0.5 \cdot \left(t \cdot \frac{a}{z}\right)}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.4000000000000003e-60

    1. Initial program 48.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z}{\color{blue}{z \cdot y}}} \]
    7. Simplified79.8%

      \[\leadsto \color{blue}{\frac{x}{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z}{z \cdot y}}} \]
    8. Step-by-step derivation
      1. clear-num78.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z}{z \cdot y}}{x}}} \]
      2. inv-pow78.9%

        \[\leadsto \color{blue}{{\left(\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z}{z \cdot y}}{x}\right)}^{-1}} \]
      3. associate-/r*90.7%

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

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

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

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

        \[\leadsto {\left(\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - \color{blue}{{z}^{\left(1 - 1\right)}}}{y}}{x}\right)}^{-1} \]
      8. metadata-eval90.7%

        \[\leadsto {\left(\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - {z}^{\color{blue}{0}}}{y}}{x}\right)}^{-1} \]
      9. metadata-eval90.7%

        \[\leadsto {\left(\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - \color{blue}{1}}{y}}{x}\right)}^{-1} \]
    9. Applied egg-rr90.7%

      \[\leadsto \color{blue}{{\left(\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - 1}{y}}{x}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. unpow-190.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - 1}{y}}{x}}} \]
      2. associate-/l/92.1%

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

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

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

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

    if -6.4000000000000003e-60 < z < 6.4000000000000003e-114

    1. Initial program 77.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.4000000000000003e-114 < z

    1. Initial program 57.2%

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

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

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

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

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

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

      \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{-1 \cdot z + 0.5 \cdot \frac{a \cdot t}{z}}}{y}} \]
    5. Step-by-step derivation
      1. fma-def19.4%

        \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{\mathsf{fma}\left(-1, z, 0.5 \cdot \frac{a \cdot t}{z}\right)}}{y}} \]
      2. associate-/l*19.4%

        \[\leadsto x \cdot \frac{z}{\frac{\mathsf{fma}\left(-1, z, 0.5 \cdot \color{blue}{\frac{a}{\frac{z}{t}}}\right)}{y}} \]
    6. Simplified19.4%

      \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{\mathsf{fma}\left(-1, z, 0.5 \cdot \frac{a}{\frac{z}{t}}\right)}}{y}} \]
    7. Step-by-step derivation
      1. associate-/r/19.1%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{\mathsf{fma}\left(-1, z, 0.5 \cdot \frac{a}{\frac{z}{t}}\right)} \cdot y\right)} \]
      2. fma-udef19.1%

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

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{\left(-z\right)} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      4. add-sqr-sqrt0.0%

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

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      6. sqr-neg49.7%

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

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{\sqrt{z} \cdot \sqrt{z}} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      8. add-sqr-sqrt90.0%

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{z} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      9. associate-/r/90.0%

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z + 0.5 \cdot \left(\frac{a}{z} \cdot t\right)} \cdot y\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification83.9%

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

Alternative 7: 82.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{-54}:\\ \;\;\;\;\frac{1}{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} + -1}{y \cdot x}}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-120}:\\ \;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{\sqrt{t \cdot \left(-a\right)}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{z}{z + 0.5 \cdot \left(t \cdot \frac{a}{z}\right)}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -5e-54)
   (/ 1.0 (/ (+ (/ (* 0.5 (* a (/ t z))) z) -1.0) (* y x)))
   (if (<= z 6e-120)
     (/ (* y (* z x)) (sqrt (* t (- a))))
     (* x (* y (/ z (+ z (* 0.5 (* t (/ a z))))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5e-54) {
		tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x));
	} else if (z <= 6e-120) {
		tmp = (y * (z * x)) / sqrt((t * -a));
	} else {
		tmp = x * (y * (z / (z + (0.5 * (t * (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
    real(8) :: tmp
    if (z <= (-5d-54)) then
        tmp = 1.0d0 / ((((0.5d0 * (a * (t / z))) / z) + (-1.0d0)) / (y * x))
    else if (z <= 6d-120) then
        tmp = (y * (z * x)) / sqrt((t * -a))
    else
        tmp = x * (y * (z / (z + (0.5d0 * (t * (a / z))))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5e-54) {
		tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x));
	} else if (z <= 6e-120) {
		tmp = (y * (z * x)) / Math.sqrt((t * -a));
	} else {
		tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -5e-54:
		tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x))
	elif z <= 6e-120:
		tmp = (y * (z * x)) / math.sqrt((t * -a))
	else:
		tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -5e-54)
		tmp = Float64(1.0 / Float64(Float64(Float64(Float64(0.5 * Float64(a * Float64(t / z))) / z) + -1.0) / Float64(y * x)));
	elseif (z <= 6e-120)
		tmp = Float64(Float64(y * Float64(z * x)) / sqrt(Float64(t * Float64(-a))));
	else
		tmp = Float64(x * Float64(y * Float64(z / Float64(z + Float64(0.5 * Float64(t * Float64(a / z)))))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -5e-54)
		tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x));
	elseif (z <= 6e-120)
		tmp = (y * (z * x)) / sqrt((t * -a));
	else
		tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5e-54], N[(1.0 / N[(N[(N[(N[(0.5 * N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + -1.0), $MachinePrecision] / N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-120], N[(N[(y * N[(z * x), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(t * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(z / N[(z + N[(0.5 * N[(t * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-54}:\\
\;\;\;\;\frac{1}{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} + -1}{y \cdot x}}\\

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

\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{z + 0.5 \cdot \left(t \cdot \frac{a}{z}\right)}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.00000000000000015e-54

    1. Initial program 48.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z}{\color{blue}{z \cdot y}}} \]
    7. Simplified79.8%

      \[\leadsto \color{blue}{\frac{x}{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z}{z \cdot y}}} \]
    8. Step-by-step derivation
      1. clear-num78.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z}{z \cdot y}}{x}}} \]
      2. inv-pow78.9%

        \[\leadsto \color{blue}{{\left(\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z}{z \cdot y}}{x}\right)}^{-1}} \]
      3. associate-/r*90.7%

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

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

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

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

        \[\leadsto {\left(\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - \color{blue}{{z}^{\left(1 - 1\right)}}}{y}}{x}\right)}^{-1} \]
      8. metadata-eval90.7%

        \[\leadsto {\left(\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - {z}^{\color{blue}{0}}}{y}}{x}\right)}^{-1} \]
      9. metadata-eval90.7%

        \[\leadsto {\left(\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - \color{blue}{1}}{y}}{x}\right)}^{-1} \]
    9. Applied egg-rr90.7%

      \[\leadsto \color{blue}{{\left(\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - 1}{y}}{x}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. unpow-190.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - 1}{y}}{x}}} \]
      2. associate-/l/92.1%

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

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

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

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

    if -5.00000000000000015e-54 < z < 6.00000000000000022e-120

    1. Initial program 77.1%

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

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

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

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

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

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

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

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

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

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

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

    if 6.00000000000000022e-120 < z

    1. Initial program 57.2%

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

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

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

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

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

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

      \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{-1 \cdot z + 0.5 \cdot \frac{a \cdot t}{z}}}{y}} \]
    5. Step-by-step derivation
      1. fma-def19.4%

        \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{\mathsf{fma}\left(-1, z, 0.5 \cdot \frac{a \cdot t}{z}\right)}}{y}} \]
      2. associate-/l*19.4%

        \[\leadsto x \cdot \frac{z}{\frac{\mathsf{fma}\left(-1, z, 0.5 \cdot \color{blue}{\frac{a}{\frac{z}{t}}}\right)}{y}} \]
    6. Simplified19.4%

      \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{\mathsf{fma}\left(-1, z, 0.5 \cdot \frac{a}{\frac{z}{t}}\right)}}{y}} \]
    7. Step-by-step derivation
      1. associate-/r/19.1%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{\mathsf{fma}\left(-1, z, 0.5 \cdot \frac{a}{\frac{z}{t}}\right)} \cdot y\right)} \]
      2. fma-udef19.1%

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

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{\left(-z\right)} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      4. add-sqr-sqrt0.0%

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

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      6. sqr-neg49.7%

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

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{\sqrt{z} \cdot \sqrt{z}} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      8. add-sqr-sqrt90.0%

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{z} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      9. associate-/r/90.0%

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z + 0.5 \cdot \left(\frac{a}{z} \cdot t\right)} \cdot y\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification84.7%

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

Alternative 8: 78.6% accurate, 5.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{-292}:\\ \;\;\;\;\frac{1}{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} + -1}{y \cdot x}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{z}{z + 0.5 \cdot \left(t \cdot \frac{a}{z}\right)}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1e-292)
   (/ 1.0 (/ (+ (/ (* 0.5 (* a (/ t z))) z) -1.0) (* y x)))
   (* x (* y (/ z (+ z (* 0.5 (* t (/ a z)))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1e-292) {
		tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x));
	} else {
		tmp = x * (y * (z / (z + (0.5 * (t * (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
    real(8) :: tmp
    if (z <= (-1d-292)) then
        tmp = 1.0d0 / ((((0.5d0 * (a * (t / z))) / z) + (-1.0d0)) / (y * x))
    else
        tmp = x * (y * (z / (z + (0.5d0 * (t * (a / z))))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1e-292) {
		tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x));
	} else {
		tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1e-292:
		tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x))
	else:
		tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1e-292)
		tmp = Float64(1.0 / Float64(Float64(Float64(Float64(0.5 * Float64(a * Float64(t / z))) / z) + -1.0) / Float64(y * x)));
	else
		tmp = Float64(x * Float64(y * Float64(z / Float64(z + Float64(0.5 * Float64(t * Float64(a / z)))))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1e-292)
		tmp = 1.0 / ((((0.5 * (a * (t / z))) / z) + -1.0) / (y * x));
	else
		tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1e-292], N[(1.0 / N[(N[(N[(N[(0.5 * N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + -1.0), $MachinePrecision] / N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(z / N[(z + N[(0.5 * N[(t * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-292}:\\
\;\;\;\;\frac{1}{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} + -1}{y \cdot x}}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{z + 0.5 \cdot \left(t \cdot \frac{a}{z}\right)}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.0000000000000001e-292

    1. Initial program 58.5%

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

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

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

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

        \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{0.5 \cdot \frac{a \cdot t}{z} - z}} \]
    4. Simplified67.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z}{z \cdot y}}} \]
    8. Step-by-step derivation
      1. clear-num65.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z}{z \cdot y}}{x}}} \]
      2. inv-pow65.9%

        \[\leadsto \color{blue}{{\left(\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z}{z \cdot y}}{x}\right)}^{-1}} \]
      3. associate-/r*73.8%

        \[\leadsto {\left(\frac{\color{blue}{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z}{z}}{y}}}{x}\right)}^{-1} \]
      4. div-sub73.8%

        \[\leadsto {\left(\frac{\frac{\color{blue}{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - \frac{z}{z}}}{y}}{x}\right)}^{-1} \]
      5. pow173.8%

        \[\leadsto {\left(\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - \frac{\color{blue}{{z}^{1}}}{z}}{y}}{x}\right)}^{-1} \]
      6. pow173.8%

        \[\leadsto {\left(\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - \frac{{z}^{1}}{\color{blue}{{z}^{1}}}}{y}}{x}\right)}^{-1} \]
      7. pow-div73.8%

        \[\leadsto {\left(\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - \color{blue}{{z}^{\left(1 - 1\right)}}}{y}}{x}\right)}^{-1} \]
      8. metadata-eval73.8%

        \[\leadsto {\left(\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - {z}^{\color{blue}{0}}}{y}}{x}\right)}^{-1} \]
      9. metadata-eval73.8%

        \[\leadsto {\left(\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - \color{blue}{1}}{y}}{x}\right)}^{-1} \]
    9. Applied egg-rr73.8%

      \[\leadsto \color{blue}{{\left(\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - 1}{y}}{x}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. unpow-173.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - 1}{y}}{x}}} \]
      2. associate-/l/74.7%

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

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

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

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

    if -1.0000000000000001e-292 < z

    1. Initial program 62.5%

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

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

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

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

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

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

      \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{-1 \cdot z + 0.5 \cdot \frac{a \cdot t}{z}}}{y}} \]
    5. Step-by-step derivation
      1. fma-def27.5%

        \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{\mathsf{fma}\left(-1, z, 0.5 \cdot \frac{a \cdot t}{z}\right)}}{y}} \]
      2. associate-/l*27.5%

        \[\leadsto x \cdot \frac{z}{\frac{\mathsf{fma}\left(-1, z, 0.5 \cdot \color{blue}{\frac{a}{\frac{z}{t}}}\right)}{y}} \]
    6. Simplified27.5%

      \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{\mathsf{fma}\left(-1, z, 0.5 \cdot \frac{a}{\frac{z}{t}}\right)}}{y}} \]
    7. Step-by-step derivation
      1. associate-/r/27.3%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{\mathsf{fma}\left(-1, z, 0.5 \cdot \frac{a}{\frac{z}{t}}\right)} \cdot y\right)} \]
      2. fma-udef27.3%

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

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{\left(-z\right)} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      4. add-sqr-sqrt0.8%

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

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      6. sqr-neg49.1%

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

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{\sqrt{z} \cdot \sqrt{z}} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      8. add-sqr-sqrt79.9%

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{z} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      9. associate-/r/79.9%

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z + 0.5 \cdot \left(\frac{a}{z} \cdot t\right)} \cdot y\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification77.4%

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

Alternative 9: 75.9% accurate, 6.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{-155}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-209}:\\ \;\;\;\;x \cdot \frac{z}{0.5 \cdot \left(\frac{t}{z} \cdot \frac{a}{y}\right)}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -6.5e-155)
   (* y (- x))
   (if (<= z 7.5e-209) (* x (/ z (* 0.5 (* (/ t z) (/ a y))))) (* y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -6.5e-155) {
		tmp = y * -x;
	} else if (z <= 7.5e-209) {
		tmp = x * (z / (0.5 * ((t / z) * (a / 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 <= (-6.5d-155)) then
        tmp = y * -x
    else if (z <= 7.5d-209) then
        tmp = x * (z / (0.5d0 * ((t / z) * (a / 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 <= -6.5e-155) {
		tmp = y * -x;
	} else if (z <= 7.5e-209) {
		tmp = x * (z / (0.5 * ((t / z) * (a / y))));
	} else {
		tmp = y * x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -6.5e-155:
		tmp = y * -x
	elif z <= 7.5e-209:
		tmp = x * (z / (0.5 * ((t / z) * (a / y))))
	else:
		tmp = y * x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -6.5e-155)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 7.5e-209)
		tmp = Float64(x * Float64(z / Float64(0.5 * Float64(Float64(t / z) * Float64(a / y)))));
	else
		tmp = Float64(y * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -6.5e-155)
		tmp = y * -x;
	elseif (z <= 7.5e-209)
		tmp = x * (z / (0.5 * ((t / z) * (a / y))));
	else
		tmp = y * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.5e-155], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 7.5e-209], N[(x * N[(z / N[(0.5 * N[(N[(t / z), $MachinePrecision] * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{-155}:\\
\;\;\;\;y \cdot \left(-x\right)\\

\mathbf{elif}\;z \leq 7.5 \cdot 10^{-209}:\\
\;\;\;\;x \cdot \frac{z}{0.5 \cdot \left(\frac{t}{z} \cdot \frac{a}{y}\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.5e-155

    1. Initial program 55.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot y\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg81.1%

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

        \[\leadsto -\color{blue}{y \cdot x} \]
      3. distribute-rgt-neg-in81.1%

        \[\leadsto \color{blue}{y \cdot \left(-x\right)} \]
    6. Simplified81.1%

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

    if -6.5e-155 < z < 7.49999999999999965e-209

    1. Initial program 77.7%

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

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

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

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

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

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

      \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{-1 \cdot z + 0.5 \cdot \frac{a \cdot t}{z}}}{y}} \]
    5. Step-by-step derivation
      1. fma-def45.9%

        \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{\mathsf{fma}\left(-1, z, 0.5 \cdot \frac{a \cdot t}{z}\right)}}{y}} \]
      2. associate-/l*46.0%

        \[\leadsto x \cdot \frac{z}{\frac{\mathsf{fma}\left(-1, z, 0.5 \cdot \color{blue}{\frac{a}{\frac{z}{t}}}\right)}{y}} \]
    6. Simplified46.0%

      \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{\mathsf{fma}\left(-1, z, 0.5 \cdot \frac{a}{\frac{z}{t}}\right)}}{y}} \]
    7. Taylor expanded in z around 0 43.9%

      \[\leadsto x \cdot \frac{z}{\color{blue}{0.5 \cdot \frac{a \cdot t}{y \cdot z}}} \]
    8. Step-by-step derivation
      1. times-frac45.7%

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

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

    if 7.49999999999999965e-209 < z

    1. Initial program 57.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative85.4%

        \[\leadsto \color{blue}{y \cdot x} \]
    6. Simplified85.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{-155}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-209}:\\ \;\;\;\;x \cdot \frac{z}{0.5 \cdot \left(\frac{t}{z} \cdot \frac{a}{y}\right)}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 10: 77.0% accurate, 6.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{-155}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{z}{z + 0.5 \cdot \left(t \cdot \frac{a}{z}\right)}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -7.5e-155)
   (* y (- x))
   (* x (* y (/ z (+ z (* 0.5 (* t (/ a z)))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -7.5e-155) {
		tmp = y * -x;
	} else {
		tmp = x * (y * (z / (z + (0.5 * (t * (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
    real(8) :: tmp
    if (z <= (-7.5d-155)) then
        tmp = y * -x
    else
        tmp = x * (y * (z / (z + (0.5d0 * (t * (a / z))))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -7.5e-155) {
		tmp = y * -x;
	} else {
		tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -7.5e-155:
		tmp = y * -x
	else:
		tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -7.5e-155)
		tmp = Float64(y * Float64(-x));
	else
		tmp = Float64(x * Float64(y * Float64(z / Float64(z + Float64(0.5 * Float64(t * Float64(a / z)))))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -7.5e-155)
		tmp = y * -x;
	else
		tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.5e-155], N[(y * (-x)), $MachinePrecision], N[(x * N[(y * N[(z / N[(z + N[(0.5 * N[(t * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{-155}:\\
\;\;\;\;y \cdot \left(-x\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{z + 0.5 \cdot \left(t \cdot \frac{a}{z}\right)}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.5000000000000006e-155

    1. Initial program 55.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot y\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg81.1%

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

        \[\leadsto -\color{blue}{y \cdot x} \]
      3. distribute-rgt-neg-in81.1%

        \[\leadsto \color{blue}{y \cdot \left(-x\right)} \]
    6. Simplified81.1%

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

    if -7.5000000000000006e-155 < z

    1. Initial program 63.8%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{\mathsf{fma}\left(-1, z, 0.5 \cdot \frac{a \cdot t}{z}\right)}}{y}} \]
      2. associate-/l*28.8%

        \[\leadsto x \cdot \frac{z}{\frac{\mathsf{fma}\left(-1, z, 0.5 \cdot \color{blue}{\frac{a}{\frac{z}{t}}}\right)}{y}} \]
    6. Simplified28.8%

      \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{\mathsf{fma}\left(-1, z, 0.5 \cdot \frac{a}{\frac{z}{t}}\right)}}{y}} \]
    7. Step-by-step derivation
      1. associate-/r/28.6%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{\mathsf{fma}\left(-1, z, 0.5 \cdot \frac{a}{\frac{z}{t}}\right)} \cdot y\right)} \]
      2. fma-udef28.6%

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

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{\left(-z\right)} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      4. add-sqr-sqrt5.8%

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

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      6. sqr-neg47.4%

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

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{\sqrt{z} \cdot \sqrt{z}} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      8. add-sqr-sqrt73.9%

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{z} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      9. associate-/r/73.9%

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z + 0.5 \cdot \left(\frac{a}{z} \cdot t\right)} \cdot y\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.7%

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

Alternative 11: 78.4% accurate, 6.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq 5 \cdot 10^{-210}:\\ \;\;\;\;\frac{x}{\frac{-1 + \frac{0.5}{\frac{z}{a \cdot \frac{t}{z}}}}{y}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{z}{z + 0.5 \cdot \left(t \cdot \frac{a}{z}\right)}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z 5e-210)
   (/ x (/ (+ -1.0 (/ 0.5 (/ z (* a (/ t z))))) y))
   (* x (* y (/ z (+ z (* 0.5 (* t (/ a z)))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= 5e-210) {
		tmp = x / ((-1.0 + (0.5 / (z / (a * (t / z))))) / y);
	} else {
		tmp = x * (y * (z / (z + (0.5 * (t * (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
    real(8) :: tmp
    if (z <= 5d-210) then
        tmp = x / (((-1.0d0) + (0.5d0 / (z / (a * (t / z))))) / y)
    else
        tmp = x * (y * (z / (z + (0.5d0 * (t * (a / z))))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= 5e-210) {
		tmp = x / ((-1.0 + (0.5 / (z / (a * (t / z))))) / y);
	} else {
		tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= 5e-210:
		tmp = x / ((-1.0 + (0.5 / (z / (a * (t / z))))) / y)
	else:
		tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= 5e-210)
		tmp = Float64(x / Float64(Float64(-1.0 + Float64(0.5 / Float64(z / Float64(a * Float64(t / z))))) / y));
	else
		tmp = Float64(x * Float64(y * Float64(z / Float64(z + Float64(0.5 * Float64(t * Float64(a / z)))))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= 5e-210)
		tmp = x / ((-1.0 + (0.5 / (z / (a * (t / z))))) / y);
	else
		tmp = x * (y * (z / (z + (0.5 * (t * (a / z))))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, 5e-210], N[(x / N[(N[(-1.0 + N[(0.5 / N[(z / N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(z / N[(z + N[(0.5 * N[(t * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq 5 \cdot 10^{-210}:\\
\;\;\;\;\frac{x}{\frac{-1 + \frac{0.5}{\frac{z}{a \cdot \frac{t}{z}}}}{y}}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{z + 0.5 \cdot \left(t \cdot \frac{a}{z}\right)}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 5.0000000000000002e-210

    1. Initial program 62.6%

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

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

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

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

        \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{0.5 \cdot \frac{a \cdot t}{z} - z}} \]
    4. Simplified64.9%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z}{z \cdot y}}} \]
    8. Taylor expanded in y around 0 63.2%

      \[\leadsto \frac{x}{\color{blue}{\frac{0.5 \cdot \frac{a \cdot t}{z} - z}{y \cdot z}}} \]
    9. Step-by-step derivation
      1. associate-*r/63.9%

        \[\leadsto \frac{x}{\frac{0.5 \cdot \color{blue}{\left(a \cdot \frac{t}{z}\right)} - z}{y \cdot z}} \]
      2. rem-square-sqrt55.4%

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

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

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

        \[\leadsto \frac{x}{\frac{\color{blue}{\frac{\sqrt{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z} \cdot \sqrt{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z}}{z}}}{y}} \]
      6. rem-square-sqrt70.4%

        \[\leadsto \frac{x}{\frac{\frac{\color{blue}{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z}}{z}}{y}} \]
      7. div-sub70.4%

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

        \[\leadsto \frac{x}{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - \frac{\color{blue}{1 \cdot z}}{z}}{y}} \]
      9. associate-*l/70.4%

        \[\leadsto \frac{x}{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - \color{blue}{\frac{1}{z} \cdot z}}{y}} \]
      10. lft-mult-inverse70.4%

        \[\leadsto \frac{x}{\frac{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} - \color{blue}{1}}{y}} \]
      11. sub-neg70.4%

        \[\leadsto \frac{x}{\frac{\color{blue}{\frac{0.5 \cdot \left(a \cdot \frac{t}{z}\right)}{z} + \left(-1\right)}}{y}} \]
      12. associate-/l*70.4%

        \[\leadsto \frac{x}{\frac{\color{blue}{\frac{0.5}{\frac{z}{a \cdot \frac{t}{z}}}} + \left(-1\right)}{y}} \]
      13. metadata-eval70.4%

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

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

    if 5.0000000000000002e-210 < z

    1. Initial program 57.9%

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

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

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

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

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

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

      \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{-1 \cdot z + 0.5 \cdot \frac{a \cdot t}{z}}}{y}} \]
    5. Step-by-step derivation
      1. fma-def21.7%

        \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{\mathsf{fma}\left(-1, z, 0.5 \cdot \frac{a \cdot t}{z}\right)}}{y}} \]
      2. associate-/l*21.7%

        \[\leadsto x \cdot \frac{z}{\frac{\mathsf{fma}\left(-1, z, 0.5 \cdot \color{blue}{\frac{a}{\frac{z}{t}}}\right)}{y}} \]
    6. Simplified21.7%

      \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{\mathsf{fma}\left(-1, z, 0.5 \cdot \frac{a}{\frac{z}{t}}\right)}}{y}} \]
    7. Step-by-step derivation
      1. associate-/r/21.5%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{\mathsf{fma}\left(-1, z, 0.5 \cdot \frac{a}{\frac{z}{t}}\right)} \cdot y\right)} \]
      2. fma-udef21.5%

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

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{\left(-z\right)} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      4. add-sqr-sqrt0.0%

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

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      6. sqr-neg48.5%

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

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{\sqrt{z} \cdot \sqrt{z}} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      8. add-sqr-sqrt86.6%

        \[\leadsto x \cdot \left(\frac{z}{\color{blue}{z} + 0.5 \cdot \frac{a}{\frac{z}{t}}} \cdot y\right) \]
      9. associate-/r/86.6%

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z + 0.5 \cdot \left(\frac{a}{z} \cdot t\right)} \cdot y\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification77.3%

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

Alternative 12: 73.8% accurate, 10.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{-292}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-209}:\\ \;\;\;\;\left(z \cdot x\right) \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -6.5e-292)
   (* y (- x))
   (if (<= z 3.6e-209) (* (* z x) (/ y z)) (* y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -6.5e-292) {
		tmp = y * -x;
	} else if (z <= 3.6e-209) {
		tmp = (z * x) * (y / z);
	} 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 <= (-6.5d-292)) then
        tmp = y * -x
    else if (z <= 3.6d-209) then
        tmp = (z * x) * (y / z)
    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 <= -6.5e-292) {
		tmp = y * -x;
	} else if (z <= 3.6e-209) {
		tmp = (z * x) * (y / z);
	} else {
		tmp = y * x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -6.5e-292:
		tmp = y * -x
	elif z <= 3.6e-209:
		tmp = (z * x) * (y / z)
	else:
		tmp = y * x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -6.5e-292)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 3.6e-209)
		tmp = Float64(Float64(z * x) * Float64(y / z));
	else
		tmp = Float64(y * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -6.5e-292)
		tmp = y * -x;
	elseif (z <= 3.6e-209)
		tmp = (z * x) * (y / z);
	else
		tmp = y * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.5e-292], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 3.6e-209], N[(N[(z * x), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{-292}:\\
\;\;\;\;y \cdot \left(-x\right)\\

\mathbf{elif}\;z \leq 3.6 \cdot 10^{-209}:\\
\;\;\;\;\left(z \cdot x\right) \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.4999999999999997e-292

    1. Initial program 58.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot y\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg71.1%

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

        \[\leadsto -\color{blue}{y \cdot x} \]
      3. distribute-rgt-neg-in71.1%

        \[\leadsto \color{blue}{y \cdot \left(-x\right)} \]
    6. Simplified71.1%

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

    if -6.4999999999999997e-292 < z < 3.60000000000000016e-209

    1. Initial program 82.4%

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

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

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

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

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

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

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

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

    if 3.60000000000000016e-209 < z

    1. Initial program 57.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative85.4%

        \[\leadsto \color{blue}{y \cdot x} \]
    6. Simplified85.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{-292}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-209}:\\ \;\;\;\;\left(z \cdot x\right) \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 13: 75.5% accurate, 10.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{-263}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-140}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.15e-263)
   (* y (- x))
   (if (<= z 6.5e-140) (/ (* x (* z y)) z) (* y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.15e-263) {
		tmp = y * -x;
	} else if (z <= 6.5e-140) {
		tmp = (x * (z * y)) / z;
	} 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 <= (-1.15d-263)) then
        tmp = y * -x
    else if (z <= 6.5d-140) then
        tmp = (x * (z * y)) / z
    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 <= -1.15e-263) {
		tmp = y * -x;
	} else if (z <= 6.5e-140) {
		tmp = (x * (z * y)) / z;
	} else {
		tmp = y * x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.15e-263:
		tmp = y * -x
	elif z <= 6.5e-140:
		tmp = (x * (z * y)) / z
	else:
		tmp = y * x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.15e-263)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 6.5e-140)
		tmp = Float64(Float64(x * Float64(z * y)) / z);
	else
		tmp = Float64(y * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.15e-263)
		tmp = y * -x;
	elseif (z <= 6.5e-140)
		tmp = (x * (z * y)) / z;
	else
		tmp = y * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.15e-263], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 6.5e-140], N[(N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{-263}:\\
\;\;\;\;y \cdot \left(-x\right)\\

\mathbf{elif}\;z \leq 6.5 \cdot 10^{-140}:\\
\;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.15000000000000001e-263

    1. Initial program 57.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot y\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg73.3%

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. *-commutative73.3%

        \[\leadsto -\color{blue}{y \cdot x} \]
      3. distribute-rgt-neg-in73.3%

        \[\leadsto \color{blue}{y \cdot \left(-x\right)} \]
    6. Simplified73.3%

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

    if -1.15000000000000001e-263 < z < 6.4999999999999995e-140

    1. Initial program 76.0%

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

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

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

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

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

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

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

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

    if 6.4999999999999995e-140 < z

    1. Initial program 57.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative86.3%

        \[\leadsto \color{blue}{y \cdot x} \]
    6. Simplified86.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{-263}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-140}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 14: 73.2% accurate, 12.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{-307}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{\frac{1}{x}}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -2.7e-307) (* y (- x)) (/ 1.0 (/ (/ 1.0 x) y))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.7e-307) {
		tmp = y * -x;
	} else {
		tmp = 1.0 / ((1.0 / x) / y);
	}
	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 <= (-2.7d-307)) then
        tmp = y * -x
    else
        tmp = 1.0d0 / ((1.0d0 / x) / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.7e-307) {
		tmp = y * -x;
	} else {
		tmp = 1.0 / ((1.0 / x) / y);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2.7e-307:
		tmp = y * -x
	else:
		tmp = 1.0 / ((1.0 / x) / y)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -2.7e-307)
		tmp = Float64(y * Float64(-x));
	else
		tmp = Float64(1.0 / Float64(Float64(1.0 / x) / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -2.7e-307)
		tmp = y * -x;
	else
		tmp = 1.0 / ((1.0 / x) / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.7e-307], N[(y * (-x)), $MachinePrecision], N[(1.0 / N[(N[(1.0 / x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{-307}:\\
\;\;\;\;y \cdot \left(-x\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\frac{1}{x}}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.69999999999999985e-307

    1. Initial program 58.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot y\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg69.5%

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. *-commutative69.5%

        \[\leadsto -\color{blue}{y \cdot x} \]
      3. distribute-rgt-neg-in69.5%

        \[\leadsto \color{blue}{y \cdot \left(-x\right)} \]
    6. Simplified69.5%

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

    if -2.69999999999999985e-307 < z

    1. Initial program 62.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\frac{\sqrt{{z}^{2} - t \cdot a}}{z \cdot \left(y \cdot x\right)}}} \]
    6. Taylor expanded in z around inf 74.2%

      \[\leadsto \frac{1}{\color{blue}{\frac{1}{x \cdot y}}} \]
    7. Step-by-step derivation
      1. associate-/r*74.0%

        \[\leadsto \frac{1}{\color{blue}{\frac{\frac{1}{x}}{y}}} \]
    8. Simplified74.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{-307}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{\frac{1}{x}}{y}}\\ \end{array} \]

Alternative 15: 73.4% accurate, 18.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{-310}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -5e-310) (* y (- x)) (* y x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5e-310) {
		tmp = y * -x;
	} 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 <= (-5d-310)) then
        tmp = y * -x
    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 <= -5e-310) {
		tmp = y * -x;
	} else {
		tmp = y * x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -5e-310:
		tmp = y * -x
	else:
		tmp = y * x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -5e-310)
		tmp = Float64(y * Float64(-x));
	else
		tmp = Float64(y * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -5e-310)
		tmp = y * -x;
	else
		tmp = y * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5e-310], N[(y * (-x)), $MachinePrecision], N[(y * x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-310}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.999999999999985e-310

    1. Initial program 58.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot y\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg69.5%

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. *-commutative69.5%

        \[\leadsto -\color{blue}{y \cdot x} \]
      3. distribute-rgt-neg-in69.5%

        \[\leadsto \color{blue}{y \cdot \left(-x\right)} \]
    6. Simplified69.5%

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

    if -4.999999999999985e-310 < z

    1. Initial program 62.4%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative73.9%

        \[\leadsto \color{blue}{y \cdot x} \]
    6. Simplified73.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{-310}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 16: 43.0% accurate, 37.7× speedup?

\[\begin{array}{l} \\ y \cdot x \end{array} \]
(FPCore (x y z t a) :precision binary64 (* y x))
double code(double x, double y, double z, double t, double a) {
	return y * x;
}
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 = y * x
end function
public static double code(double x, double y, double z, double t, double a) {
	return y * x;
}
def code(x, y, z, t, a):
	return y * x
function code(x, y, z, t, a)
	return Float64(y * x)
end
function tmp = code(x, y, z, t, a)
	tmp = y * x;
end
code[x_, y_, z_, t_, a_] := N[(y * x), $MachinePrecision]
\begin{array}{l}

\\
y \cdot x
\end{array}
Derivation
  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.8%

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

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

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

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

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

    \[\leadsto \color{blue}{x \cdot y} \]
  5. Step-by-step derivation
    1. *-commutative43.9%

      \[\leadsto \color{blue}{y \cdot x} \]
  6. Simplified43.9%

    \[\leadsto \color{blue}{y \cdot x} \]
  7. Final simplification43.9%

    \[\leadsto y \cdot x \]

Developer target: 89.3% accurate, 1.0× 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 2023318 
(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)))))