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

Percentage Accurate: 61.3% → 90.7%
Time: 18.8s
Alternatives: 14
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 14 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.3% 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, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq 1.1 \cdot 10^{-70}:\\
\;\;\;\;y \cdot \frac{z \cdot x}{\sqrt{z \cdot z - t \cdot a}}\\

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


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

    1. Initial program 29.8%

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

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

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

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

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

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

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

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

    if -6.69999999999999968e86 < z < 1.0999999999999999e-70

    1. Initial program 73.1%

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

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

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

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

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

    if 1.0999999999999999e-70 < z

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
    4. Step-by-step derivation
      1. add-sqr-sqrt60.6%

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

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

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

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

      \[\leadsto \frac{x \cdot y}{\color{blue}{\sqrt{\frac{z \cdot z - t \cdot a}{z \cdot z}}}} \]
    6. Step-by-step derivation
      1. div-sub55.3%

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

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

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

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

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

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

Alternative 2: 89.8% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 29.8%

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

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

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

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

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

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

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

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

    if -5.1999999999999995e86 < z < 4.29999999999999987e24

    1. Initial program 76.8%

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

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

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

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

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

    if 4.29999999999999987e24 < z

    1. Initial program 45.7%

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

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

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

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

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

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

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

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

Alternative 3: 83.0% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 45.3%

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

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

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

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

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

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

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

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

    if -7.0000000000000003e-69 < z < 2.90000000000000005e-67

    1. Initial program 73.4%

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

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

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

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

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

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

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

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

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

    if 2.90000000000000005e-67 < z

    1. Initial program 55.5%

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

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

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

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

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

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

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

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

Alternative 4: 76.2% accurate, 5.9× speedup?

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

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

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

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


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

    1. Initial program 48.1%

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

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

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

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

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

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

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

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

    if -1.7e-211 < z < 1.21999999999999994e-92

    1. Initial program 75.8%

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

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

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

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

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

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

    if 1.21999999999999994e-92 < z

    1. Initial program 59.0%

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

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

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

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

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

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

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

Alternative 5: 76.2% accurate, 5.9× speedup?

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

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

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

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


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

    1. Initial program 48.1%

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

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

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

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

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

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

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

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

    if -1.59999999999999993e-211 < z < 9.6000000000000004e-93

    1. Initial program 75.8%

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    4. Step-by-step derivation
      1. clear-num85.3%

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

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

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

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

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

    if 9.6000000000000004e-93 < z

    1. Initial program 59.0%

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

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

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

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

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

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

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

Alternative 6: 75.5% accurate, 6.6× speedup?

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

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

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

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


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

    1. Initial program 48.6%

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

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

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

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

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

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

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

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

    if -1.95e-209 < z < 2.50000000000000007e-162

    1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.50000000000000007e-162 < z

    1. Initial program 60.6%

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

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

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

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

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

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

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

Alternative 7: 75.6% accurate, 6.6× speedup?

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

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

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

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


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

    1. Initial program 48.6%

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

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

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

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

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

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

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

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

    if -2.59999999999999984e-209 < z < 3.5000000000000003e-160

    1. Initial program 74.7%

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

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

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

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

      \[\leadsto \frac{x \cdot y}{\color{blue}{0.5 \cdot \frac{a \cdot t}{z}}} \cdot z \]
    6. Taylor expanded in x around 0 37.4%

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

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

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

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

    if 3.5000000000000003e-160 < z

    1. Initial program 60.6%

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

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

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

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

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

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

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

Alternative 8: 76.5% accurate, 6.6× speedup?

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

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

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


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

    1. Initial program 48.6%

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

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

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

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

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

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

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

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

    if -1.29999999999999992e-209 < z

    1. Initial program 64.0%

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

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

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

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

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

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

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

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

Alternative 9: 75.2% accurate, 8.6× speedup?

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

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

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

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


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

    1. Initial program 49.1%

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

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

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

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

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

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

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

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

    if -5.2e-215 < z < 3.19999999999999988e-163

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\frac{\frac{z}{x}}{z \cdot \color{blue}{y}}\right)}^{-1} \]
    10. Applied egg-rr28.9%

      \[\leadsto \color{blue}{{\left(\frac{\frac{z}{x}}{z \cdot y}\right)}^{-1}} \]
    11. Step-by-step derivation
      1. unpow-128.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{z}{x}}{z \cdot y}}} \]
      2. associate-/l/35.5%

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

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

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

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

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

    if 3.19999999999999988e-163 < z

    1. Initial program 60.9%

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

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

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

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

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

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

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

Alternative 10: 74.8% accurate, 9.3× speedup?

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

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

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

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


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

    1. Initial program 49.0%

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

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

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

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

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

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

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

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

    if -5.70000000000000028e-198 < z < 3.1999999999999997e-185

    1. Initial program 72.3%

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

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

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

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

    if 3.1999999999999997e-185 < z

    1. Initial program 61.1%

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

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

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

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

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

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

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

Alternative 11: 74.8% accurate, 10.2× speedup?

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

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

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

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


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

    1. Initial program 49.1%

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

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

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

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

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

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

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

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

    if -4.50000000000000026e-221 < z < 3.2999999999999997e-184

    1. Initial program 75.3%

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

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

    if 3.2999999999999997e-184 < z

    1. Initial program 61.1%

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

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

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

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

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

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

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

Alternative 12: 72.5% accurate, 12.5× speedup?

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

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

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


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

    1. Initial program 53.3%

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

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

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

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

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

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

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

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

    if -5.19999999999999993e-304 < 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.4%

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

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

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

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

        \[\leadsto \left(-\color{blue}{\frac{y}{\frac{z}{x}}}\right) \cdot z \]
      3. distribute-neg-frac12.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\frac{\frac{z}{x}}{z \cdot \color{blue}{y}}\right)}^{-1} \]
    10. Applied egg-rr58.0%

      \[\leadsto \color{blue}{{\left(\frac{\frac{z}{x}}{z \cdot y}\right)}^{-1}} \]
    11. Step-by-step derivation
      1. unpow-158.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{z}{x}}{z \cdot y}}} \]
      2. associate-/l/60.6%

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

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

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

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

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

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

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

Alternative 13: 72.6% accurate, 18.6× speedup?

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

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

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


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

    1. Initial program 53.3%

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

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

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

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

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

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

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

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

    if -3.3999999999999999e-304 < 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. *-commutative61.7%

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

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

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

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

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

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

Alternative 14: 42.8% accurate, 37.7× speedup?

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

\\
y \cdot x
\end{array}
Derivation
  1. Initial program 57.7%

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

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

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

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

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

    \[\leadsto y \cdot \color{blue}{x} \]
  5. Final simplification45.3%

    \[\leadsto y \cdot x \]

Developer target: 88.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z < -3.1921305903852764 \cdot 10^{+46}:\\
\;\;\;\;-y \cdot x\\

\mathbf{elif}\;z < 5.976268120920894 \cdot 10^{+90}:\\
\;\;\;\;\frac{x \cdot z}{\frac{\sqrt{z \cdot z - a \cdot t}}{y}}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023199 
(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)))))