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

Percentage Accurate: 61.5% → 89.7%
Time: 32.5s
Alternatives: 20
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 20 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.5% 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.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.4 \cdot 10^{+53}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+21}:\\ \;\;\;\;\frac{z \cdot \left(y \cdot x\right)}{\sqrt{z \cdot z - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -7.4e+53)
   (* y (- x))
   (if (<= z 8.5e+21) (/ (* z (* y x)) (sqrt (- (* z z) (* t a)))) (* y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -7.4e+53) {
		tmp = y * -x;
	} else if (z <= 8.5e+21) {
		tmp = (z * (y * x)) / sqrt(((z * z) - (t * a)));
	} else {
		tmp = y * x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-7.4d+53)) then
        tmp = y * -x
    else if (z <= 8.5d+21) then
        tmp = (z * (y * x)) / sqrt(((z * z) - (t * a)))
    else
        tmp = y * x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -7.4e+53) {
		tmp = y * -x;
	} else if (z <= 8.5e+21) {
		tmp = (z * (y * x)) / Math.sqrt(((z * z) - (t * a)));
	} else {
		tmp = y * x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -7.4e+53:
		tmp = y * -x
	elif z <= 8.5e+21:
		tmp = (z * (y * x)) / math.sqrt(((z * z) - (t * a)))
	else:
		tmp = y * x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -7.4e+53)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 8.5e+21)
		tmp = Float64(Float64(z * Float64(y * x)) / sqrt(Float64(Float64(z * z) - Float64(t * a))));
	else
		tmp = Float64(y * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -7.4e+53)
		tmp = y * -x;
	elseif (z <= 8.5e+21)
		tmp = (z * (y * x)) / sqrt(((z * z) - (t * a)));
	else
		tmp = y * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.4e+53], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 8.5e+21], N[(N[(z * N[(y * x), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 39.1%

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

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

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

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

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

      \[\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(x \cdot y\right)} \]
    5. Step-by-step derivation
      1. associate-*r*94.0%

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot y} \]
      2. neg-mul-194.0%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot y \]
      3. *-commutative94.0%

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

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

    if -7.4e53 < z < 8.5e21

    1. Initial program 87.4%

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

    if 8.5e21 < z

    1. Initial program 36.0%

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

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

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

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

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

      \[\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}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative94.0%

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

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

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

Alternative 2: 89.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+146}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+21}:\\ \;\;\;\;x \cdot \frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.75e+146)
   (* y (- x))
   (if (<= z 8.5e+21) (* x (/ z (/ (sqrt (- (* z z) (* t a))) y))) (* y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.75e+146) {
		tmp = y * -x;
	} else if (z <= 8.5e+21) {
		tmp = x * (z / (sqrt(((z * z) - (t * a))) / y));
	} else {
		tmp = y * x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-1.75d+146)) then
        tmp = y * -x
    else if (z <= 8.5d+21) then
        tmp = x * (z / (sqrt(((z * z) - (t * a))) / y))
    else
        tmp = y * x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.75e+146) {
		tmp = y * -x;
	} else if (z <= 8.5e+21) {
		tmp = x * (z / (Math.sqrt(((z * z) - (t * a))) / y));
	} else {
		tmp = y * x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.75e+146:
		tmp = y * -x
	elif z <= 8.5e+21:
		tmp = x * (z / (math.sqrt(((z * z) - (t * a))) / y))
	else:
		tmp = y * x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.75e+146)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 8.5e+21)
		tmp = Float64(x * Float64(z / Float64(sqrt(Float64(Float64(z * z) - Float64(t * a))) / y)));
	else
		tmp = Float64(y * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.75e+146)
		tmp = y * -x;
	elseif (z <= 8.5e+21)
		tmp = x * (z / (sqrt(((z * z) - (t * a))) / y));
	else
		tmp = y * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.75e+146], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 8.5e+21], N[(x * N[(z / N[(N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 24.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot y} \]
      2. neg-mul-197.6%

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

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

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

    if -1.7500000000000001e146 < z < 8.5e21

    1. Initial program 83.5%

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

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

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

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

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

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

    if 8.5e21 < z

    1. Initial program 36.0%

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

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

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

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

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

      \[\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}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative94.0%

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

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

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

Alternative 3: 90.1% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 39.1%

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

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

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

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

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

      \[\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(x \cdot y\right)} \]
    5. Step-by-step derivation
      1. associate-*r*94.0%

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot y} \]
      2. neg-mul-194.0%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot y \]
      3. *-commutative94.0%

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

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

    if -5.9999999999999998e54 < z < 1.02e21

    1. Initial program 87.4%

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

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

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

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

    if 1.02e21 < z

    1. Initial program 36.0%

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

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

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

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

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

      \[\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}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative94.0%

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

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

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

Alternative 4: 89.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.02 \cdot 10^{+153}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+21}:\\ \;\;\;\;z \cdot \frac{y \cdot x}{\sqrt{z \cdot z - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.02e+153)
   (* y (- x))
   (if (<= z 8.5e+21) (* z (/ (* y x) (sqrt (- (* z z) (* t a))))) (* y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.02e+153) {
		tmp = y * -x;
	} else if (z <= 8.5e+21) {
		tmp = z * ((y * x) / sqrt(((z * z) - (t * a))));
	} else {
		tmp = y * x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-1.02d+153)) then
        tmp = y * -x
    else if (z <= 8.5d+21) then
        tmp = z * ((y * x) / sqrt(((z * z) - (t * a))))
    else
        tmp = y * x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.02e+153) {
		tmp = y * -x;
	} else if (z <= 8.5e+21) {
		tmp = z * ((y * x) / Math.sqrt(((z * z) - (t * a))));
	} else {
		tmp = y * x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.02e+153:
		tmp = y * -x
	elif z <= 8.5e+21:
		tmp = z * ((y * x) / math.sqrt(((z * z) - (t * a))))
	else:
		tmp = y * x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.02e+153)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 8.5e+21)
		tmp = Float64(z * Float64(Float64(y * x) / sqrt(Float64(Float64(z * z) - Float64(t * a)))));
	else
		tmp = Float64(y * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.02e+153)
		tmp = y * -x;
	elseif (z <= 8.5e+21)
		tmp = z * ((y * x) / sqrt(((z * z) - (t * a))));
	else
		tmp = y * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.02e+153], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 8.5e+21], N[(z * N[(N[(y * x), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 15.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot y} \]
      2. neg-mul-197.4%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot y \]
      3. *-commutative97.4%

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

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

    if -1.0199999999999999e153 < z < 8.5e21

    1. Initial program 83.9%

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

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

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

    if 8.5e21 < z

    1. Initial program 36.0%

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

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

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

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

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

      \[\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}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative94.0%

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

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

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

Alternative 5: 83.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{-51}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 3.05 \cdot 10^{-120}:\\ \;\;\;\;x \cdot \frac{z}{\frac{\sqrt{t \cdot \left(-a\right)}}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.1e-51)
   (* y (- x))
   (if (<= z 3.05e-120) (* x (/ z (/ (sqrt (* t (- a))) y))) (* y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.1e-51) {
		tmp = y * -x;
	} else if (z <= 3.05e-120) {
		tmp = x * (z / (sqrt((t * -a)) / y));
	} else {
		tmp = y * x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-1.1d-51)) then
        tmp = y * -x
    else if (z <= 3.05d-120) then
        tmp = x * (z / (sqrt((t * -a)) / y))
    else
        tmp = y * x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.1e-51) {
		tmp = y * -x;
	} else if (z <= 3.05e-120) {
		tmp = x * (z / (Math.sqrt((t * -a)) / y));
	} else {
		tmp = y * x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.1e-51:
		tmp = y * -x
	elif z <= 3.05e-120:
		tmp = x * (z / (math.sqrt((t * -a)) / y))
	else:
		tmp = y * x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.1e-51)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 3.05e-120)
		tmp = Float64(x * Float64(z / Float64(sqrt(Float64(t * Float64(-a))) / y)));
	else
		tmp = Float64(y * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.1e-51)
		tmp = y * -x;
	elseif (z <= 3.05e-120)
		tmp = x * (z / (sqrt((t * -a)) / y));
	else
		tmp = y * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.1e-51], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 3.05e-120], N[(x * N[(z / N[(N[Sqrt[N[(t * (-a)), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 56.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot y} \]
      2. neg-mul-185.7%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot y \]
      3. *-commutative85.7%

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

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

    if -1.1e-51 < z < 3.05e-120

    1. Initial program 82.7%

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}} \]
    4. Taylor expanded in z around 0 77.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-neg77.1%

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

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

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

    if 3.05e-120 < z

    1. Initial program 50.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{-51}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 3.05 \cdot 10^{-120}:\\ \;\;\;\;x \cdot \frac{z}{\frac{\sqrt{t \cdot \left(-a\right)}}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 6: 83.3% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 56.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot y} \]
      2. neg-mul-185.7%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot y \]
      3. *-commutative85.7%

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

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

    if -9.99999999999999995e-56 < z < 8.99999999999999959e-122

    1. Initial program 82.7%

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

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

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

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

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

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

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

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

    if 8.99999999999999959e-122 < z

    1. Initial program 50.0%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 83.1% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 56.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot y} \]
      2. neg-mul-185.7%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot y \]
      3. *-commutative85.7%

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

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

    if -2.8999999999999999e-58 < z < 1.04999999999999999e-84

    1. Initial program 84.4%

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

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

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

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

      \[\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-neg72.4%

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

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

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

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

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

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

    if 1.04999999999999999e-84 < z

    1. Initial program 46.3%

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

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

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

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

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

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

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

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

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

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

Alternative 8: 83.1% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 56.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot y} \]
      2. neg-mul-185.7%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot y \]
      3. *-commutative85.7%

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

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

    if -4.3999999999999998e-59 < z < 3.2e-81

    1. Initial program 84.4%

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

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

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

      \[\leadsto \color{blue}{\frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{x \cdot y}}} \]
    4. Step-by-step derivation
      1. *-un-lft-identity81.8%

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

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

        \[\leadsto \frac{z}{\color{blue}{\frac{1}{y} \cdot \frac{\sqrt{z \cdot z - t \cdot a}}{x}}} \]
    5. Applied egg-rr84.5%

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

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

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

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

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

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

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

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

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

    if 3.2e-81 < z

    1. Initial program 46.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{-59}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-81}:\\ \;\;\;\;\frac{z}{\frac{\frac{\sqrt{t \cdot \left(-a\right)}}{x}}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 9: 83.0% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 56.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot y} \]
      2. neg-mul-185.7%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot y \]
      3. *-commutative85.7%

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

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

    if -2.5000000000000001e-60 < z < 4.6000000000000001e-85

    1. Initial program 84.4%

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

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

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

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

      \[\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-neg72.4%

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

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

      \[\leadsto \frac{z}{\frac{\sqrt{\color{blue}{a \cdot \left(-t\right)}}}{x \cdot y}} \]
    7. Step-by-step derivation
      1. expm1-log1p-u68.4%

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{z}{\frac{\sqrt{a \cdot \left(-t\right)}}{x \cdot y}}\right)} - 1} \]
      3. associate-/r/46.3%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{z}{\sqrt{a \cdot \left(-t\right)}} \cdot \left(x \cdot y\right)}\right)} - 1 \]
      4. *-commutative46.3%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{z}{\sqrt{a \cdot \left(-t\right)}} \cdot \color{blue}{\left(y \cdot x\right)}\right)} - 1 \]
    8. Applied egg-rr46.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{z}{\sqrt{a \cdot \left(-t\right)}} \cdot \left(y \cdot x\right)\right)} - 1} \]
    9. Step-by-step derivation
      1. expm1-def69.5%

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

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

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

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

    if 4.6000000000000001e-85 < z

    1. Initial program 46.3%

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

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

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

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

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

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

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

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

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

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

Alternative 10: 77.2% accurate, 5.1× speedup?

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

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

\mathbf{elif}\;z \leq 4.4 \cdot 10^{-87}:\\
\;\;\;\;\frac{-y}{\frac{\frac{t}{\frac{x}{a}} \cdot \frac{0.5}{z} - \frac{z}{x}}{z}}\\

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


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

    1. Initial program 58.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot y} \]
      2. neg-mul-183.8%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot y \]
      3. *-commutative83.8%

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

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

    if -8.2000000000000004e-109 < z < 4.39999999999999976e-87

    1. Initial program 84.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-y}{\frac{\color{blue}{\frac{a \cdot t}{x} \cdot \frac{0.5}{z}} - \frac{z}{x}}{z}} \]
      12. *-commutative48.0%

        \[\leadsto \frac{-y}{\frac{\frac{\color{blue}{t \cdot a}}{x} \cdot \frac{0.5}{z} - \frac{z}{x}}{z}} \]
      13. associate-/l*47.9%

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

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

    if 4.39999999999999976e-87 < z

    1. Initial program 46.3%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 77.3% accurate, 5.9× speedup?

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

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

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

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


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

    1. Initial program 58.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot y} \]
      2. neg-mul-183.8%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot y \]
      3. *-commutative83.8%

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

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

    if -3.89999999999999995e-108 < z < 2.5e20

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

    if 2.5e20 < z

    1. Initial program 36.0%

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

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

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

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

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

      \[\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}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative94.0%

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

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

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

Alternative 12: 77.5% accurate, 5.9× speedup?

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

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

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

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


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

    1. Initial program 58.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot y} \]
      2. neg-mul-183.8%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot y \]
      3. *-commutative83.8%

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

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

    if -8.2000000000000004e-109 < z < 1.06e38

    1. Initial program 86.0%

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

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

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

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

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

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

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

    if 1.06e38 < z

    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*31.2%

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

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

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

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

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

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

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

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

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

Alternative 13: 77.1% accurate, 5.9× speedup?

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

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

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

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


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

    1. Initial program 58.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot y} \]
      2. neg-mul-183.8%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot y \]
      3. *-commutative83.8%

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

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

    if -8.2000000000000004e-109 < z < 5.7999999999999999e-60

    1. Initial program 85.0%

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

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

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

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

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

        \[\leadsto x \cdot \frac{z}{\frac{z + -0.5 \cdot \color{blue}{\frac{a}{\frac{z}{t}}}}{y}} \]
    6. Simplified49.8%

      \[\leadsto x \cdot \frac{y \cdot z}{\color{blue}{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}} \]
    7. Taylor expanded in x around 0 49.2%

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

    if 5.7999999999999999e-60 < 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. associate-*l*43.1%

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

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

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

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

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

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

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

      \[\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 -8.2 \cdot 10^{-109}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-60}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{z + -0.5 \cdot \frac{t \cdot a}{z}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 14: 76.3% accurate, 6.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.4 \cdot 10^{-109}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-153}:\\ \;\;\;\;-2 \cdot \frac{z \cdot \left(z \cdot y\right)}{\frac{t}{\frac{x}{a}}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -8.4e-109)
   (* y (- x))
   (if (<= z 1.6e-153) (* -2.0 (/ (* z (* z y)) (/ t (/ x a)))) (* y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -8.4e-109) {
		tmp = y * -x;
	} else if (z <= 1.6e-153) {
		tmp = -2.0 * ((z * (z * y)) / (t / (x / a)));
	} else {
		tmp = y * x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-8.4d-109)) then
        tmp = y * -x
    else if (z <= 1.6d-153) then
        tmp = (-2.0d0) * ((z * (z * y)) / (t / (x / a)))
    else
        tmp = y * x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -8.4e-109) {
		tmp = y * -x;
	} else if (z <= 1.6e-153) {
		tmp = -2.0 * ((z * (z * y)) / (t / (x / a)));
	} else {
		tmp = y * x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -8.4e-109:
		tmp = y * -x
	elif z <= 1.6e-153:
		tmp = -2.0 * ((z * (z * y)) / (t / (x / a)))
	else:
		tmp = y * x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -8.4e-109)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 1.6e-153)
		tmp = Float64(-2.0 * Float64(Float64(z * Float64(z * y)) / Float64(t / Float64(x / a))));
	else
		tmp = Float64(y * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -8.4e-109)
		tmp = y * -x;
	elseif (z <= 1.6e-153)
		tmp = -2.0 * ((z * (z * y)) / (t / (x / a)));
	else
		tmp = y * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.4e-109], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 1.6e-153], N[(-2.0 * N[(N[(z * N[(z * y), $MachinePrecision]), $MachinePrecision] / N[(t / N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 58.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot y} \]
      2. neg-mul-183.8%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot y \]
      3. *-commutative83.8%

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

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

    if -8.39999999999999984e-109 < z < 1.6e-153

    1. Initial program 80.2%

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

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

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

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

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

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

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

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

        \[\leadsto -2 \cdot \frac{\color{blue}{{z}^{2} \cdot y}}{\frac{a \cdot t}{x}} \]
      4. unpow245.0%

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

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

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

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

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

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

    if 1.6e-153 < z

    1. Initial program 52.7%

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

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

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

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

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

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

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

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

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

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

Alternative 15: 76.2% accurate, 6.6× speedup?

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

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

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

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


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

    1. Initial program 58.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot y} \]
      2. neg-mul-183.8%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot y \]
      3. *-commutative83.8%

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

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

    if -8.2000000000000004e-109 < z < 4.2000000000000001e-161

    1. Initial program 79.3%

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

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

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

      \[\leadsto \frac{x \cdot y}{\color{blue}{-1 \cdot z + 0.5 \cdot \frac{a \cdot t}{z}}} \cdot z \]
    5. Taylor expanded in z around 0 49.2%

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

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

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

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

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

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

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

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

    if 4.2000000000000001e-161 < 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*50.3%

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

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

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

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

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

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

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

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

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

Alternative 16: 76.2% accurate, 6.6× speedup?

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

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

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

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


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

    1. Initial program 58.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot y} \]
      2. neg-mul-183.8%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot y \]
      3. *-commutative83.8%

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

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

    if -4.00000000000000016e-108 < z < 4.99999999999999996e-221

    1. Initial program 83.9%

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

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

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

      \[\leadsto \frac{x \cdot y}{\color{blue}{-1 \cdot z + 0.5 \cdot \frac{a \cdot t}{z}}} \cdot z \]
    5. Taylor expanded in z around 0 54.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999996e-221 < z

    1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

Alternative 17: 76.6% accurate, 6.6× speedup?

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

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

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

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


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

    1. Initial program 58.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot y} \]
      2. neg-mul-183.8%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot y \]
      3. *-commutative83.8%

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

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

    if -1.85e-108 < z < 5.99999999999999977e-161

    1. Initial program 79.3%

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

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

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

      \[\leadsto \frac{x \cdot y}{\color{blue}{-1 \cdot z + 0.5 \cdot \frac{a \cdot t}{z}}} \cdot z \]
    5. Taylor expanded in z around 0 49.2%

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

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

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

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

    if 5.99999999999999977e-161 < 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*50.3%

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

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

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

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

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

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

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

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

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

Alternative 18: 75.0% accurate, 10.2× speedup?

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

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

\mathbf{elif}\;z \leq 6 \cdot 10^{-92}:\\
\;\;\;\;x \cdot \frac{z \cdot y}{z}\\

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


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

    1. Initial program 61.3%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot y} \]
      2. neg-mul-176.2%

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

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

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

    if -3.9999999999999998e-188 < z < 6.00000000000000027e-92

    1. Initial program 83.7%

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

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

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

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

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

    if 6.00000000000000027e-92 < z

    1. Initial program 46.9%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{-188}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-92}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 19: 73.4% accurate, 18.6× speedup?

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

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

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


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

    1. Initial program 64.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot x\right) \cdot y} \]
      2. neg-mul-171.4%

        \[\leadsto \color{blue}{\left(-x\right)} \cdot y \]
      3. *-commutative71.4%

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

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

    if 2.59999999999999997e-300 < z

    1. Initial program 55.7%

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

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

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

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

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

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

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

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

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

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

Alternative 20: 43.6% 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*58.8%

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

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

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

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

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

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

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

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

    \[\leadsto y \cdot x \]

Developer target: 89.1% 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 2023275 
(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)))))