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

Percentage Accurate: 61.4% → 90.7%
Time: 23.0s
Alternatives: 17
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 17 alternatives:

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

Initial Program: 61.4% accurate, 1.0× speedup?

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

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

Alternative 1: 90.7% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 14.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{z}{\color{blue}{\frac{0.5}{\frac{z}{a \cdot t}} - z}} \cdot \left(y \cdot x\right) \]
    7. Step-by-step derivation
      1. *-un-lft-identity84.1%

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

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

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

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

    if -1e133 < z < 5.99999999999999956e30

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

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

    if 5.99999999999999956e30 < z

    1. Initial program 45.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.1% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 39.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{z}{\color{blue}{\frac{0.5}{\frac{z}{a \cdot t}} - z}} \cdot \left(y \cdot x\right) \]
    7. Step-by-step derivation
      1. *-un-lft-identity88.8%

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

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

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

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

    if -1.12000000000000005e49 < z < 5.99999999999999956e30

    1. Initial program 88.0%

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

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

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

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

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

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

    if 5.99999999999999956e30 < z

    1. Initial program 45.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 89.7% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 37.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{z}{\color{blue}{\frac{0.5}{\frac{z}{a \cdot t}} - z}} \cdot \left(y \cdot x\right) \]
    7. Step-by-step derivation
      1. *-un-lft-identity89.7%

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

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

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

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

    if -4.8e49 < z < 5.99999999999999956e30

    1. Initial program 87.6%

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

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

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

    if 5.99999999999999956e30 < z

    1. Initial program 45.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 84.1% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 57.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{z}{\color{blue}{\frac{0.5}{\frac{z}{a \cdot t}} - z}} \cdot \left(y \cdot x\right) \]
    7. Step-by-step derivation
      1. *-un-lft-identity82.9%

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

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

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

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

    if -5.20000000000000007e-160 < z < 2.0499999999999999e-126

    1. Initial program 82.2%

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

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

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

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

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

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

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

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

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

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

    if 2.0499999999999999e-126 < z

    1. Initial program 61.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 83.7% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 57.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{z}{\color{blue}{\frac{0.5}{\frac{z}{a \cdot t}} - z}} \cdot \left(y \cdot x\right) \]
    7. Step-by-step derivation
      1. *-un-lft-identity82.9%

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

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

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

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

    if -7.19999999999999982e-158 < z < 5.50000000000000036e-127

    1. Initial program 82.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.50000000000000036e-127 < z

    1. Initial program 61.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 76.9% accurate, 5.9× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -6.4999999999999997e-190 < z < 2.8e-104

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

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

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

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

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

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

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

    if 2.8e-104 < z

    1. Initial program 61.2%

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

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

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

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

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

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

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

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

Alternative 7: 79.6% accurate, 5.9× speedup?

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

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

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


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

    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/65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{z}{\color{blue}{\frac{0.5}{\frac{z}{a \cdot t}} - z}} \cdot \left(y \cdot x\right) \]
    7. Step-by-step derivation
      1. *-un-lft-identity81.7%

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

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

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

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

    if -6.20000000000000024e-199 < z

    1. Initial program 67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 76.0% accurate, 6.6× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -6.6000000000000002e-189 < z < 5.1999999999999997e-109

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

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

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

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

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

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

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

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

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

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

    if 5.1999999999999997e-109 < z

    1. Initial program 61.2%

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

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

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

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

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

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

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

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

Alternative 9: 75.9% accurate, 6.6× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -4.60000000000000027e-198 < z < 5.1999999999999997e-109

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.1999999999999997e-109 < z

    1. Initial program 61.2%

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

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

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

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

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

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

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

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

Alternative 10: 76.2% accurate, 6.6× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -2.8499999999999999e-191 < z < 8.49999999999999976e-157

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.49999999999999976e-157 < z

    1. Initial program 62.8%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 77.6% accurate, 6.6× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000007e-189 < z

    1. Initial program 67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 77.8% accurate, 6.6× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -6.5000000000000004e-198 < z

    1. Initial program 67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 76.2% accurate, 8.6× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -2.5e-192 < z < 8.5999999999999995e-107

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-\left(-y\right) \cdot \left(x \cdot z\right)}{-z}} \]
      3. add-sqr-sqrt21.9%

        \[\leadsto \frac{-\color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)} \cdot \left(x \cdot z\right)}{-z} \]
      4. sqrt-unprod41.1%

        \[\leadsto \frac{-\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}} \cdot \left(x \cdot z\right)}{-z} \]
      5. sqr-neg41.1%

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

        \[\leadsto \frac{-\color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)} \cdot \left(x \cdot z\right)}{-z} \]
      7. add-sqr-sqrt44.0%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot x\right) \cdot \left(y \cdot z\right)}}{-z} \]
      6. mul-1-neg46.8%

        \[\leadsto \frac{\color{blue}{\left(-x\right)} \cdot \left(y \cdot z\right)}{-z} \]
    10. Simplified46.8%

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

    if 8.5999999999999995e-107 < z

    1. Initial program 61.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{-192}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{-107}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot \left(-y\right)\right)}{-z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 14: 74.9% accurate, 10.2× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -1.30000000000000003e-198 < z < 1e-107

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{-z}}{y}} \]
    6. Simplified16.9%

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

        \[\leadsto x \cdot \frac{\color{blue}{1 \cdot z}}{\frac{-z}{y}} \]
      2. div-inv16.9%

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{1}{-z} \cdot \frac{z}{\frac{1}{y}}\right)} \]
      4. add-sqr-sqrt11.0%

        \[\leadsto x \cdot \left(\frac{1}{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}} \cdot \frac{z}{\frac{1}{y}}\right) \]
      5. sqrt-unprod9.9%

        \[\leadsto x \cdot \left(\frac{1}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \cdot \frac{z}{\frac{1}{y}}\right) \]
      6. sqr-neg9.9%

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

        \[\leadsto x \cdot \left(\frac{1}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}} \cdot \frac{z}{\frac{1}{y}}\right) \]
      8. add-sqr-sqrt42.8%

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{\frac{z}{\frac{1}{y}}}}{z} \]
      3. div-inv42.8%

        \[\leadsto x \cdot \frac{\color{blue}{z \cdot \frac{1}{\frac{1}{y}}}}{z} \]
      4. inv-pow42.8%

        \[\leadsto x \cdot \frac{z \cdot \frac{1}{\color{blue}{{y}^{-1}}}}{z} \]
      5. pow-flip42.9%

        \[\leadsto x \cdot \frac{z \cdot \color{blue}{{y}^{\left(--1\right)}}}{z} \]
      6. metadata-eval42.9%

        \[\leadsto x \cdot \frac{z \cdot {y}^{\color{blue}{1}}}{z} \]
      7. pow142.9%

        \[\leadsto x \cdot \frac{z \cdot \color{blue}{y}}{z} \]
    10. Applied egg-rr42.9%

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

    if 1e-107 < z

    1. Initial program 61.2%

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

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

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

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

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

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

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

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

Alternative 15: 76.0% accurate, 10.2× speedup?

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

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

\mathbf{elif}\;z \leq 4.8 \cdot 10^{-69}:\\
\;\;\;\;\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 < -5.80000000000000001e-198

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

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

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

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

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

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

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

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

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

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

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

    if -5.80000000000000001e-198 < z < 4.8000000000000002e-69

    1. Initial program 82.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(-y\right) \cdot \left(x \cdot z\right)}{z}} \]
      2. add-sqr-sqrt21.7%

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

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}} \cdot \left(x \cdot z\right)}{z} \]
      4. sqr-neg41.2%

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

        \[\leadsto \frac{\color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)} \cdot \left(x \cdot z\right)}{z} \]
      6. add-sqr-sqrt48.7%

        \[\leadsto \frac{\color{blue}{y} \cdot \left(x \cdot z\right)}{z} \]
    8. Applied egg-rr48.7%

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

    if 4.8000000000000002e-69 < z

    1. Initial program 58.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{-198}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-69}:\\ \;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 16: 73.3% 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 61.5%

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

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

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

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

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

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

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

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

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

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

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

    if -1.999999999999994e-310 < z

    1. Initial program 65.8%

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

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

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

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

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

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

    \[\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 17: 42.9% 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 63.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto y \cdot x \]

Developer target: 89.7% 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 2023336 
(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)))))