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

Percentage Accurate: 61.2% → 89.2%
Time: 27.3s
Alternatives: 12
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 12 alternatives:

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

Initial Program: 61.2% 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.2% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq 0.00036:\\
\;\;\;\;z \cdot \frac{y \cdot x}{\sqrt{z \cdot z - t \cdot a}}\\

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


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

    1. Initial program 37.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.8%

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

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

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

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

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

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

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

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

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

    if -9.9999999999999996e30 < z < 3.60000000000000023e-4

    1. Initial program 89.3%

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

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

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

    if 3.60000000000000023e-4 < z

    1. Initial program 32.4%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{\mathsf{fma}\left(-0.5, \color{blue}{\frac{a}{\frac{z}{t}}}, z\right)} \cdot \left(x \cdot y\right) \]
    6. Applied egg-rr91.9%

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

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

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

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

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

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

Alternative 2: 89.2% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}\\
\mathbf{if}\;z \leq -6 \cdot 10^{+51}:\\
\;\;\;\;y \cdot \left(-x\right)\\

\mathbf{elif}\;z \leq -3.4 \cdot 10^{-151}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 0.00036:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6e51

    1. Initial program 33.0%

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

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

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

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

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

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

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

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

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

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

    if -6e51 < z < -3.4000000000000003e-151 or 7.1999999999999998e-168 < z < 3.60000000000000023e-4

    1. Initial program 92.3%

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

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

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

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

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

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

    if -3.4000000000000003e-151 < z < 7.1999999999999998e-168

    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. *-commutative84.8%

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

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

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

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

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

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

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

    if 3.60000000000000023e-4 < z

    1. Initial program 32.4%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{\mathsf{fma}\left(-0.5, \color{blue}{\frac{a}{\frac{z}{t}}}, z\right)} \cdot \left(x \cdot y\right) \]
    6. Applied egg-rr91.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+51}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-151}:\\ \;\;\;\;x \cdot \frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-168}:\\ \;\;\;\;\frac{z}{\frac{\sqrt{t \cdot \left(-a\right)}}{y \cdot x}}\\ \mathbf{elif}\;z \leq 0.00036:\\ \;\;\;\;x \cdot \frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot x\right) \cdot \frac{z}{z + -0.5 \cdot \left(a \cdot \frac{t}{z}\right)}\\ \end{array} \]

Alternative 3: 82.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{z}{\frac{\sqrt{t \cdot \left(-a\right)}}{y}}\\
\mathbf{if}\;z \leq -3.6 \cdot 10^{-44}:\\
\;\;\;\;y \cdot \left(-x\right)\\

\mathbf{elif}\;z \leq -2.55 \cdot 10^{-69}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-88}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.5999999999999999e-44

    1. Initial program 46.1%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-y \cdot x} \]
      2. distribute-rgt-neg-in91.8%

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

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

    if -3.5999999999999999e-44 < z < -2.54999999999999993e-69 or -5.2000000000000001e-199 < z < 2.1e-88

    1. Initial program 82.1%

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

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

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

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

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

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

      \[\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-neg75.1%

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

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

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

    if -2.54999999999999993e-69 < z < -5.2000000000000001e-199

    1. Initial program 99.7%

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

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

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

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

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

    if 2.1e-88 < z

    1. Initial program 44.6%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{\mathsf{fma}\left(-0.5, \color{blue}{\frac{a}{\frac{z}{t}}}, z\right)} \cdot \left(x \cdot y\right) \]
    6. Applied egg-rr91.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{-44}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -2.55 \cdot 10^{-69}:\\ \;\;\;\;x \cdot \frac{z}{\frac{\sqrt{t \cdot \left(-a\right)}}{y}}\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{-199}:\\ \;\;\;\;\frac{z \cdot \left(y \cdot x\right)}{0.5 \cdot \frac{t \cdot a}{z} - z}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-88}:\\ \;\;\;\;x \cdot \frac{z}{\frac{\sqrt{t \cdot \left(-a\right)}}{y}}\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot x\right) \cdot \frac{z}{z + -0.5 \cdot \left(a \cdot \frac{t}{z}\right)}\\ \end{array} \]

Alternative 4: 83.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := z \cdot \frac{y \cdot x}{\sqrt{t \cdot \left(-a\right)}}\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{-44}:\\
\;\;\;\;y \cdot \left(-x\right)\\

\mathbf{elif}\;z \leq -1.8 \cdot 10^{-65}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 4.1 \cdot 10^{-87}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.19999999999999995e-44

    1. Initial program 46.1%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-y \cdot x} \]
      2. distribute-rgt-neg-in91.8%

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

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

    if -3.19999999999999995e-44 < z < -1.7999999999999999e-65 or -1.10000000000000002e-105 < z < 4.10000000000000033e-87

    1. Initial program 85.2%

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

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

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

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

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

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

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

    if -1.7999999999999999e-65 < z < -1.10000000000000002e-105

    1. Initial program 99.7%

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

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

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

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

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

    if 4.10000000000000033e-87 < z

    1. Initial program 44.6%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{\mathsf{fma}\left(-0.5, \color{blue}{\frac{a}{\frac{z}{t}}}, z\right)} \cdot \left(x \cdot y\right) \]
    6. Applied egg-rr91.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{-44}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-65}:\\ \;\;\;\;z \cdot \frac{y \cdot x}{\sqrt{t \cdot \left(-a\right)}}\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-105}:\\ \;\;\;\;\frac{z \cdot \left(y \cdot x\right)}{0.5 \cdot \frac{t \cdot a}{z} - z}\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{-87}:\\ \;\;\;\;z \cdot \frac{y \cdot x}{\sqrt{t \cdot \left(-a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot x\right) \cdot \frac{z}{z + -0.5 \cdot \left(a \cdot \frac{t}{z}\right)}\\ \end{array} \]

Alternative 5: 83.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{z}{\frac{\sqrt{t \cdot \left(-a\right)}}{y \cdot x}}\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{-43}:\\
\;\;\;\;y \cdot \left(-x\right)\\

\mathbf{elif}\;z \leq -2.2 \cdot 10^{-66}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 6.5 \cdot 10^{-88}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.9000000000000001e-43

    1. Initial program 46.1%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-y \cdot x} \]
      2. distribute-rgt-neg-in91.8%

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

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

    if -2.9000000000000001e-43 < z < -2.2000000000000001e-66 or -1.04e-106 < z < 6.50000000000000006e-88

    1. Initial program 85.2%

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

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

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

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

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

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

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

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

    if -2.2000000000000001e-66 < z < -1.04e-106

    1. Initial program 99.7%

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

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

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

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

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

    if 6.50000000000000006e-88 < z

    1. Initial program 44.6%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{\mathsf{fma}\left(-0.5, \color{blue}{\frac{a}{\frac{z}{t}}}, z\right)} \cdot \left(x \cdot y\right) \]
    6. Applied egg-rr91.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{-43}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-66}:\\ \;\;\;\;\frac{z}{\frac{\sqrt{t \cdot \left(-a\right)}}{y \cdot x}}\\ \mathbf{elif}\;z \leq -1.04 \cdot 10^{-106}:\\ \;\;\;\;\frac{z \cdot \left(y \cdot x\right)}{0.5 \cdot \frac{t \cdot a}{z} - z}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-88}:\\ \;\;\;\;\frac{z}{\frac{\sqrt{t \cdot \left(-a\right)}}{y \cdot x}}\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot x\right) \cdot \frac{z}{z + -0.5 \cdot \left(a \cdot \frac{t}{z}\right)}\\ \end{array} \]

Alternative 6: 76.6% accurate, 5.9× speedup?

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

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

\mathbf{elif}\;z \leq 1.32 \cdot 10^{-33}:\\
\;\;\;\;x \cdot \frac{z}{\frac{z + -0.5 \cdot \frac{t \cdot a}{z}}{y}}\\

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


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

    1. Initial program 61.4%

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

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

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

        \[\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 80.3%

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

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

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

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

    if -2.9e-199 < z < 1.31999999999999993e-33

    1. Initial program 83.6%

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

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

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

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

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

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

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

    if 1.31999999999999993e-33 < z

    1. Initial program 39.0%

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

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

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

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

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

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

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

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

Alternative 7: 76.0% accurate, 6.6× speedup?

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

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

\mathbf{elif}\;z \leq 2.9 \cdot 10^{-154}:\\
\;\;\;\;-2 \cdot \frac{\frac{\left(z \cdot y\right) \cdot \left(z \cdot x\right)}{a}}{t}\\

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


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

    1. Initial program 61.4%

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

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

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

        \[\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 80.3%

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

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

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

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

    if -2.6000000000000001e-199 < z < 2.9e-154

    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. *-commutative84.5%

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{\mathsf{fma}\left(-0.5, \color{blue}{\frac{a}{\frac{z}{t}}}, z\right)} \cdot \left(x \cdot y\right) \]
    6. Applied egg-rr66.9%

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

      \[\leadsto \color{blue}{-2 \cdot \frac{y \cdot \left({z}^{2} \cdot x\right)}{a \cdot t}} \]
    8. Step-by-step derivation
      1. times-frac64.3%

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

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

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

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

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

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

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

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

    if 2.9e-154 < z

    1. Initial program 48.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{-199}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-154}:\\ \;\;\;\;-2 \cdot \frac{\frac{\left(z \cdot y\right) \cdot \left(z \cdot x\right)}{a}}{t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 8: 77.5% accurate, 6.6× speedup?

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

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

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


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

    1. Initial program 61.4%

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

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

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

        \[\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 80.3%

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

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

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

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

    if -7.2000000000000003e-199 < z

    1. Initial program 59.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 75.6% accurate, 10.2× speedup?

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

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

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

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


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

    1. Initial program 61.4%

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

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

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

        \[\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 80.3%

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

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

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

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

    if -1.55000000000000006e-199 < z < 4.40000000000000015e-83

    1. Initial program 81.7%

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

      \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{z}} \]
    3. Taylor expanded in x around 0 54.1%

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

    if 4.40000000000000015e-83 < z

    1. Initial program 43.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{-199}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-83}:\\ \;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 10: 75.2% accurate, 10.2× speedup?

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

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

\mathbf{elif}\;z \leq 8.5 \cdot 10^{-86}:\\
\;\;\;\;\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 < -2.45000000000000006e-257

    1. Initial program 62.8%

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

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

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

        \[\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 77.5%

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

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

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

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

    if -2.45000000000000006e-257 < z < 8.499999999999999e-86

    1. Initial program 81.1%

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

      \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{z}} \]
    3. Taylor expanded in x around 0 55.4%

      \[\leadsto \frac{\color{blue}{y \cdot \left(z \cdot x\right)}}{z} \]
    4. Step-by-step derivation
      1. associate-*r*57.3%

        \[\leadsto \frac{\color{blue}{\left(y \cdot z\right) \cdot x}}{z} \]
      2. *-commutative57.3%

        \[\leadsto \frac{\color{blue}{\left(z \cdot y\right)} \cdot x}{z} \]
    5. Simplified57.3%

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

    if 8.499999999999999e-86 < z

    1. Initial program 43.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.45 \cdot 10^{-257}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-86}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 11: 73.0% accurate, 18.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \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 < -1.999999999999994e-310

    1. Initial program 65.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.7%

        \[\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*60.6%

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

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

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

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

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

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

    if -1.999999999999994e-310 < z

    1. Initial program 53.5%

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

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

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

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

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

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

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

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

Alternative 12: 43.8% 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.0%

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

      \[\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*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 41.8%

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

    \[\leadsto y \cdot x \]

Developer target: 88.9% 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 2023274 
(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)))))