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

Percentage Accurate: 62.2% → 91.7%
Time: 20.1s
Alternatives: 15
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 15 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: 62.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))
double code(double x, double y, double z, double t, double a) {
	return ((x * y) * z) / sqrt(((z * z) - (t * a)));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = ((x * y) * z) / sqrt(((z * z) - (t * a)))
end function
public static double code(double x, double y, double z, double t, double a) {
	return ((x * y) * z) / Math.sqrt(((z * z) - (t * a)));
}
def code(x, y, z, t, a):
	return ((x * y) * z) / math.sqrt(((z * z) - (t * a)))
function code(x, y, z, t, a)
	return Float64(Float64(Float64(x * y) * z) / sqrt(Float64(Float64(z * z) - Float64(t * a))))
end
function tmp = code(x, y, z, t, a)
	tmp = ((x * y) * z) / sqrt(((z * z) - (t * a)));
end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 91.7% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 33.3%

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

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

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

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

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

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

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

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

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

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

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

    if -2e113 < z < 1.29000000000000005e121

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}} \cdot x} \]
      5. associate-/r/82.2%

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

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

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

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

    if 1.29000000000000005e121 < z

    1. Initial program 19.4%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{+108}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{+66}:\\ \;\;\;\;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 -4.6e+108)
   (* y (- x))
   (if (<= z 2.15e+66) (* 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 <= -4.6e+108) {
		tmp = y * -x;
	} else if (z <= 2.15e+66) {
		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 <= (-4.6d+108)) then
        tmp = y * -x
    else if (z <= 2.15d+66) 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 <= -4.6e+108) {
		tmp = y * -x;
	} else if (z <= 2.15e+66) {
		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 <= -4.6e+108:
		tmp = y * -x
	elif z <= 2.15e+66:
		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 <= -4.6e+108)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 2.15e+66)
		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 <= -4.6e+108)
		tmp = y * -x;
	elseif (z <= 2.15e+66)
		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, -4.6e+108], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 2.15e+66], 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 -4.6 \cdot 10^{+108}:\\
\;\;\;\;y \cdot \left(-x\right)\\

\mathbf{elif}\;z \leq 2.15 \cdot 10^{+66}:\\
\;\;\;\;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 < -4.5999999999999998e108

    1. Initial program 33.3%

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

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

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

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

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

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

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

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

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

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

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

    if -4.5999999999999998e108 < z < 2.15000000000000013e66

    1. Initial program 80.6%

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

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

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

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

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

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

    if 2.15000000000000013e66 < z

    1. Initial program 29.8%

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}} \]
    3. Simplified33.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.3%

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

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

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

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

Alternative 3: 89.7% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 46.6%

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

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

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

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

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

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

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

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

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

    if -2.15e70 < z < 1.00000000000000007e70

    1. Initial program 80.6%

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

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

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

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

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

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

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

    if 1.00000000000000007e70 < z

    1. Initial program 29.8%

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}} \]
    3. Simplified33.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.3%

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

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

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

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

Alternative 4: 82.7% accurate, 1.0× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{\frac{0.5 \cdot \frac{t \cdot a}{z} - z}{-z}}\\


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

    1. Initial program 56.2%

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

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

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

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

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

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

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

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

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

    if -1.8499999999999999e-29 < z < 8.39999999999999953e-196

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

    if 8.39999999999999953e-196 < 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*52.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot y}{\frac{\color{blue}{\left(--0.5 \cdot \frac{a}{\frac{z}{t}}\right) - z}}{-z}} \]
      6. distribute-lft-neg-in85.7%

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

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

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

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

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

Alternative 5: 82.7% accurate, 1.0× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{\frac{0.5 \cdot \frac{t \cdot a}{z} - z}{-z}}\\


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

    1. Initial program 56.2%

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

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

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

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

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

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

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

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

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

    if -6.00000000000000039e-40 < z < 9.50000000000000032e-196

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

    if 9.50000000000000032e-196 < 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*52.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot y}{\frac{\color{blue}{\left(--0.5 \cdot \frac{a}{\frac{z}{t}}\right) - z}}{-z}} \]
      6. distribute-lft-neg-in85.7%

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

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

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

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

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

Alternative 6: 82.7% accurate, 1.0× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{\frac{0.5 \cdot \frac{t \cdot a}{z} - z}{-z}}\\


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

    1. Initial program 56.2%

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

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

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

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

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

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

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

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

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

    if -6.4999999999999999e-40 < z < 9.50000000000000032e-196

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

    if 9.50000000000000032e-196 < 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*52.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot y}{\frac{\color{blue}{\left(--0.5 \cdot \frac{a}{\frac{z}{t}}\right) - z}}{-z}} \]
      6. distribute-lft-neg-in85.7%

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{0.5 \cdot \frac{a \cdot t}{z} - z}{-z}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification84.4%

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

Alternative 7: 78.9% accurate, 5.3× speedup?

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

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

\mathbf{elif}\;z \leq -1 \cdot 10^{-306}:\\
\;\;\;\;x \cdot \frac{z}{\frac{0.5 \cdot t_1 - z}{y}}\\

\mathbf{elif}\;z \leq 5.3 \cdot 10^{+67}:\\
\;\;\;\;x \cdot \frac{z}{\frac{z + t_1 \cdot -0.5}{y}}\\

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


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

    1. Initial program 33.3%

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

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

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

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

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

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

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

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

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

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

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

    if -8.0000000000000003e108 < z < -1.00000000000000003e-306

    1. Initial program 78.5%

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000003e-306 < z < 5.3e67

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

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

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

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

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

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

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

    if 5.3e67 < z

    1. Initial program 29.8%

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}} \]
    3. Simplified33.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.3%

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

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

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

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

Alternative 8: 78.9% accurate, 5.3× speedup?

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

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

\mathbf{elif}\;z \leq -2 \cdot 10^{-310}:\\
\;\;\;\;x \cdot \left(z \cdot \frac{y}{0.5 \cdot t_1 - z}\right)\\

\mathbf{elif}\;z \leq 6.6 \cdot 10^{+68}:\\
\;\;\;\;x \cdot \frac{z}{\frac{z + t_1 \cdot -0.5}{y}}\\

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


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

    1. Initial program 33.3%

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

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

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

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

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

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

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

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

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

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

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

    if -2.9e109 < z < -1.999999999999994e-310

    1. Initial program 78.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot \frac{y}{\color{blue}{\left(--0.5 \cdot \frac{a}{\frac{z}{t}}\right) - z}}\right) \cdot x \]
      7. distribute-lft-neg-in69.0%

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

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

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

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

    if -1.999999999999994e-310 < z < 6.6000000000000001e68

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

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

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

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

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

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

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

    if 6.6000000000000001e68 < z

    1. Initial program 29.8%

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}} \]
    3. Simplified33.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.3%

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

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

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

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

Alternative 9: 78.8% accurate, 5.6× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{\frac{t_1}{-z}}\\


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

    1. Initial program 33.3%

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

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

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

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

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

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

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

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

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

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

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

    if -2.9e109 < z < 4.7999999999999999e-240

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.7999999999999999e-240 < z

    1. Initial program 56.9%

      \[\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. *-commutative54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot y}{\frac{\color{blue}{\left(--0.5 \cdot \frac{a}{\frac{z}{t}}\right) - z}}{-z}} \]
      6. distribute-lft-neg-in81.8%

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

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

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

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

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

Alternative 10: 77.8% accurate, 5.9× speedup?

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

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

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

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


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

    1. Initial program 60.4%

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

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

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

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

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

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

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

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

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

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

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

    if -2.60000000000000008e-193 < z < 1.3500000000000001e59

    1. Initial program 79.2%

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

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

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

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

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

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

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

    if 1.3500000000000001e59 < z

    1. Initial program 29.8%

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}} \]
    3. Simplified33.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.3%

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

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

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

Alternative 11: 76.7% accurate, 9.3× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8999999999999999e-21 < z < 6.40000000000000018e-205

    1. Initial program 69.7%

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

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

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

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

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

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

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

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

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

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

    if 6.40000000000000018e-205 < z

    1. Initial program 56.1%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{-21}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{-205}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{-z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 12: 76.3% accurate, 10.2× speedup?

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

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

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

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


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

    1. Initial program 59.9%

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

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

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

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

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

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

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

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

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

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

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

    if -1.3e-215 < z < 8.4999999999999997e-204

    1. Initial program 66.5%

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

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

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

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

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

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

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

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

    if 8.4999999999999997e-204 < z

    1. Initial program 56.1%

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

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

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

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

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

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

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

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

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

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

Alternative 13: 76.3% accurate, 10.2× speedup?

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

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

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

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


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

    1. Initial program 59.9%

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

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

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

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

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

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

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

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

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

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

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

    if -8.0000000000000003e-219 < z < 3.8999999999999999e-187

    1. Initial program 65.7%

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

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

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

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

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

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

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

    if 3.8999999999999999e-187 < z

    1. Initial program 55.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{-219}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-187}:\\ \;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 14: 73.9% accurate, 18.6× speedup?

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

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

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


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

    1. Initial program 60.1%

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

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

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

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

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

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

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

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

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

    if -1.999999999999994e-310 < z

    1. Initial program 57.4%

      \[\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/58.3%

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

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

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

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

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

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

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

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

Alternative 15: 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 58.7%

    \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
  2. Step-by-step derivation
    1. associate-*l*56.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*60.6%

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

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

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

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

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

    \[\leadsto y \cdot x \]

Developer target: 89.6% 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 2023312 
(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)))))