Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C

Percentage Accurate: 94.4% → 97.8%
Time: 8.2s
Alternatives: 13
Speedup: 0.4×

Specification

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

\\
x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)
\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 13 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: 94.4% accurate, 1.0× speedup?

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

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

Alternative 1: 97.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{z} - \frac{t}{1 - z}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+289}:\\ \;\;\;\;t_1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (/ y z) (/ t (- 1.0 z)))))
   (if (<= t_1 (- INFINITY))
     (* y (/ x z))
     (if (<= t_1 5e+289) (* t_1 x) (/ (* y x) z)))))
double code(double x, double y, double z, double t) {
	double t_1 = (y / z) - (t / (1.0 - z));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = y * (x / z);
	} else if (t_1 <= 5e+289) {
		tmp = t_1 * x;
	} else {
		tmp = (y * x) / z;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = (y / z) - (t / (1.0 - z));
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = y * (x / z);
	} else if (t_1 <= 5e+289) {
		tmp = t_1 * x;
	} else {
		tmp = (y * x) / z;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y / z) - (t / (1.0 - z))
	tmp = 0
	if t_1 <= -math.inf:
		tmp = y * (x / z)
	elif t_1 <= 5e+289:
		tmp = t_1 * x
	else:
		tmp = (y * x) / z
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(y * Float64(x / z));
	elseif (t_1 <= 5e+289)
		tmp = Float64(t_1 * x);
	else
		tmp = Float64(Float64(y * x) / z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (y / z) - (t / (1.0 - z));
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = y * (x / z);
	elseif (t_1 <= 5e+289)
		tmp = t_1 * x;
	else
		tmp = (y * x) / z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+289], N[(t$95$1 * x), $MachinePrecision], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y}{z} - \frac{t}{1 - z}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;y \cdot \frac{x}{z}\\

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+289}:\\
\;\;\;\;t_1 \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < -inf.0

    1. Initial program 55.4%

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

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(-y, \frac{1}{-z}, -\frac{t}{1 - z}\right)} \]
      4. distribute-neg-frac55.4%

        \[\leadsto x \cdot \mathsf{fma}\left(-y, \frac{1}{-z}, \color{blue}{\frac{-t}{1 - z}}\right) \]
    3. Applied egg-rr55.4%

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{-t}{1 - z} + \left(-y\right) \cdot \frac{1}{-z}\right)} \]
      3. distribute-lft-neg-out55.4%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\color{blue}{\frac{t \cdot 1}{-\left(1 - z\right)}} - y \cdot \frac{1}{-z}\right) \]
      12. *-rgt-identity55.4%

        \[\leadsto x \cdot \left(\frac{\color{blue}{t}}{-\left(1 - z\right)} - y \cdot \frac{1}{-z}\right) \]
      13. neg-sub055.4%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{0 - \left(1 - z\right)}} - y \cdot \frac{1}{-z}\right) \]
      14. associate--r-55.4%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{\left(0 - 1\right) + z}} - y \cdot \frac{1}{-z}\right) \]
      15. metadata-eval55.4%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{-1} + z} - y \cdot \frac{1}{-z}\right) \]
      16. neg-mul-155.4%

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \frac{1}{\color{blue}{-1 \cdot z}}\right) \]
      17. associate-/r*55.4%

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \color{blue}{\frac{\frac{1}{-1}}{z}}\right) \]
      18. metadata-eval55.4%

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{t}{-1 + z} - y \cdot \frac{-1}{z}\right)} \]
    6. Taylor expanded in t around 0 99.7%

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

        \[\leadsto \color{blue}{y \cdot \frac{x}{z}} \]
    8. Simplified99.9%

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

    if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 5.00000000000000031e289

    1. Initial program 98.8%

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

    if 5.00000000000000031e289 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z)))

    1. Initial program 73.8%

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

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

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

Alternative 2: 92.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x}{\frac{z}{y + t}}\\
\mathbf{if}\;z \leq -1.05:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x \cdot \left(\left(-t\right) - y \cdot \frac{-1}{z}\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


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

    1. Initial program 98.0%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      3. neg-mul-197.0%

        \[\leadsto \frac{x}{\frac{z}{y - \color{blue}{\left(-t\right)}}} \]
    4. Simplified97.0%

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

    if -1.05000000000000004 < z < 1.05000000000000007e-297

    1. Initial program 93.3%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around 0 91.4%

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

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

        \[\leadsto \frac{y}{z} \cdot x + \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
      3. neg-mul-189.0%

        \[\leadsto \frac{y}{z} \cdot x + \color{blue}{\left(-t\right)} \cdot x \]
      4. distribute-rgt-out93.3%

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

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

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

    if 1.05000000000000007e-297 < z < 2.4500000000000001e-197

    1. Initial program 74.3%

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

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(-y, \frac{1}{-z}, -\frac{t}{1 - z}\right)} \]
      4. distribute-neg-frac74.3%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{-t}{1 - z} + \left(-y\right) \cdot \frac{1}{-z}\right)} \]
      3. distribute-lft-neg-out74.3%

        \[\leadsto x \cdot \left(\frac{-t}{1 - z} + \color{blue}{\left(-y \cdot \frac{1}{-z}\right)}\right) \]
      4. unsub-neg74.3%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\frac{\color{blue}{t}}{-\left(1 - z\right)} - y \cdot \frac{1}{-z}\right) \]
      13. neg-sub074.3%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{0 - \left(1 - z\right)}} - y \cdot \frac{1}{-z}\right) \]
      14. associate--r-74.3%

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

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{-1} + z} - y \cdot \frac{1}{-z}\right) \]
      16. neg-mul-174.3%

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \frac{1}{\color{blue}{-1 \cdot z}}\right) \]
      17. associate-/r*74.3%

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \color{blue}{\frac{\frac{1}{-1}}{z}}\right) \]
      18. metadata-eval74.3%

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{t}{-1 + z} - y \cdot \frac{-1}{z}\right)} \]
    6. Taylor expanded in t around 0 91.1%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    8. Simplified99.8%

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

    if 2.4500000000000001e-197 < z < 1

    1. Initial program 90.3%

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

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(-y, \frac{1}{-z}, -\frac{t}{1 - z}\right)} \]
      4. distribute-neg-frac90.3%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{-t}{1 - z} + \left(-y\right) \cdot \frac{1}{-z}\right)} \]
      3. distribute-lft-neg-out90.3%

        \[\leadsto x \cdot \left(\frac{-t}{1 - z} + \color{blue}{\left(-y \cdot \frac{1}{-z}\right)}\right) \]
      4. unsub-neg90.3%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\frac{\color{blue}{t}}{-\left(1 - z\right)} - y \cdot \frac{1}{-z}\right) \]
      13. neg-sub090.3%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{0 - \left(1 - z\right)}} - y \cdot \frac{1}{-z}\right) \]
      14. associate--r-90.3%

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

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{-1} + z} - y \cdot \frac{1}{-z}\right) \]
      16. neg-mul-190.3%

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

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \color{blue}{\frac{\frac{1}{-1}}{z}}\right) \]
      18. metadata-eval90.3%

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{t}{-1 + z} - y \cdot \frac{-1}{z}\right)} \]
    6. Taylor expanded in z around 0 89.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05:\\ \;\;\;\;\frac{x}{\frac{z}{y + t}}\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-297}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-197}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;x \cdot \left(\left(-t\right) - y \cdot \frac{-1}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{y + t}}\\ \end{array} \]

Alternative 3: 62.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(-x\right)\\ t_2 := y \cdot \frac{x}{z}\\ t_3 := t \cdot \frac{x}{z}\\ \mathbf{if}\;y \leq -2.8 \cdot 10^{-81}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-242}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{-224}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{-206}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-161} \lor \neg \left(y \leq 1.26 \cdot 10^{-140}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (- x))) (t_2 (* y (/ x z))) (t_3 (* t (/ x z))))
   (if (<= y -2.8e-81)
     t_2
     (if (<= y -7e-242)
       t_3
       (if (<= y 7.5e-224)
         t_1
         (if (<= y 3.7e-206)
           t_3
           (if (or (<= y 8e-161) (not (<= y 1.26e-140))) t_2 t_1)))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * -x;
	double t_2 = y * (x / z);
	double t_3 = t * (x / z);
	double tmp;
	if (y <= -2.8e-81) {
		tmp = t_2;
	} else if (y <= -7e-242) {
		tmp = t_3;
	} else if (y <= 7.5e-224) {
		tmp = t_1;
	} else if (y <= 3.7e-206) {
		tmp = t_3;
	} else if ((y <= 8e-161) || !(y <= 1.26e-140)) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = t * -x
    t_2 = y * (x / z)
    t_3 = t * (x / z)
    if (y <= (-2.8d-81)) then
        tmp = t_2
    else if (y <= (-7d-242)) then
        tmp = t_3
    else if (y <= 7.5d-224) then
        tmp = t_1
    else if (y <= 3.7d-206) then
        tmp = t_3
    else if ((y <= 8d-161) .or. (.not. (y <= 1.26d-140))) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = t * -x;
	double t_2 = y * (x / z);
	double t_3 = t * (x / z);
	double tmp;
	if (y <= -2.8e-81) {
		tmp = t_2;
	} else if (y <= -7e-242) {
		tmp = t_3;
	} else if (y <= 7.5e-224) {
		tmp = t_1;
	} else if (y <= 3.7e-206) {
		tmp = t_3;
	} else if ((y <= 8e-161) || !(y <= 1.26e-140)) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * -x
	t_2 = y * (x / z)
	t_3 = t * (x / z)
	tmp = 0
	if y <= -2.8e-81:
		tmp = t_2
	elif y <= -7e-242:
		tmp = t_3
	elif y <= 7.5e-224:
		tmp = t_1
	elif y <= 3.7e-206:
		tmp = t_3
	elif (y <= 8e-161) or not (y <= 1.26e-140):
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(-x))
	t_2 = Float64(y * Float64(x / z))
	t_3 = Float64(t * Float64(x / z))
	tmp = 0.0
	if (y <= -2.8e-81)
		tmp = t_2;
	elseif (y <= -7e-242)
		tmp = t_3;
	elseif (y <= 7.5e-224)
		tmp = t_1;
	elseif (y <= 3.7e-206)
		tmp = t_3;
	elseif ((y <= 8e-161) || !(y <= 1.26e-140))
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * -x;
	t_2 = y * (x / z);
	t_3 = t * (x / z);
	tmp = 0.0;
	if (y <= -2.8e-81)
		tmp = t_2;
	elseif (y <= -7e-242)
		tmp = t_3;
	elseif (y <= 7.5e-224)
		tmp = t_1;
	elseif (y <= 3.7e-206)
		tmp = t_3;
	elseif ((y <= 8e-161) || ~((y <= 1.26e-140)))
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * (-x)), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.8e-81], t$95$2, If[LessEqual[y, -7e-242], t$95$3, If[LessEqual[y, 7.5e-224], t$95$1, If[LessEqual[y, 3.7e-206], t$95$3, If[Or[LessEqual[y, 8e-161], N[Not[LessEqual[y, 1.26e-140]], $MachinePrecision]], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \left(-x\right)\\
t_2 := y \cdot \frac{x}{z}\\
t_3 := t \cdot \frac{x}{z}\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{-81}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -7 \cdot 10^{-242}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq 7.5 \cdot 10^{-224}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 3.7 \cdot 10^{-206}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq 8 \cdot 10^{-161} \lor \neg \left(y \leq 1.26 \cdot 10^{-140}\right):\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.7999999999999999e-81 or 3.69999999999999998e-206 < y < 8.00000000000000022e-161 or 1.25999999999999996e-140 < y

    1. Initial program 91.1%

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

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(-y, \frac{1}{-z}, -\frac{t}{1 - z}\right)} \]
      4. distribute-neg-frac91.1%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{-t}{1 - z} + \left(-y\right) \cdot \frac{1}{-z}\right)} \]
      3. distribute-lft-neg-out91.1%

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

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

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

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

        \[\leadsto x \cdot \left(\color{blue}{t \cdot \frac{-1}{1 - z}} - y \cdot \frac{1}{-z}\right) \]
      8. metadata-eval91.1%

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

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

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

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

        \[\leadsto x \cdot \left(\frac{\color{blue}{t}}{-\left(1 - z\right)} - y \cdot \frac{1}{-z}\right) \]
      13. neg-sub091.1%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{0 - \left(1 - z\right)}} - y \cdot \frac{1}{-z}\right) \]
      14. associate--r-91.1%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{\left(0 - 1\right) + z}} - y \cdot \frac{1}{-z}\right) \]
      15. metadata-eval91.1%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{-1} + z} - y \cdot \frac{1}{-z}\right) \]
      16. neg-mul-191.1%

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \frac{1}{\color{blue}{-1 \cdot z}}\right) \]
      17. associate-/r*91.1%

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \color{blue}{\frac{\frac{1}{-1}}{z}}\right) \]
      18. metadata-eval91.1%

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{t}{-1 + z} - y \cdot \frac{-1}{z}\right)} \]
    6. Taylor expanded in t around 0 75.9%

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

        \[\leadsto \color{blue}{y \cdot \frac{x}{z}} \]
    8. Simplified79.5%

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

    if -2.7999999999999999e-81 < y < -6.9999999999999998e-242 or 7.49999999999999978e-224 < y < 3.69999999999999998e-206

    1. Initial program 96.6%

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

      \[\leadsto \color{blue}{\frac{\left(y - -1 \cdot t\right) \cdot x}{z}} \]
    3. Step-by-step derivation
      1. *-commutative84.0%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      3. associate-/r/77.5%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - -1 \cdot t\right)} \]
      4. cancel-sign-sub-inv77.5%

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

        \[\leadsto \frac{x}{z} \cdot \left(y + \color{blue}{1} \cdot t\right) \]
      6. *-lft-identity77.5%

        \[\leadsto \frac{x}{z} \cdot \left(y + \color{blue}{t}\right) \]
    4. Simplified77.5%

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{z}} \]
    6. Step-by-step derivation
      1. associate-*r/71.0%

        \[\leadsto \color{blue}{t \cdot \frac{x}{z}} \]
    7. Simplified71.0%

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

    if -6.9999999999999998e-242 < y < 7.49999999999999978e-224 or 8.00000000000000022e-161 < y < 1.25999999999999996e-140

    1. Initial program 99.8%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around 0 61.3%

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

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

        \[\leadsto \frac{y}{z} \cdot x + \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
      3. neg-mul-165.8%

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

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot x} \]
    7. Simplified59.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.8 \cdot 10^{-81}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-242}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{-224}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{-206}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-161} \lor \neg \left(y \leq 1.26 \cdot 10^{-140}\right):\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \end{array} \]

Alternative 4: 72.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(\frac{y}{z} - t\right)\\ t_2 := \frac{y}{\frac{z}{x}}\\ \mathbf{if}\;z \leq -7.8 \cdot 10^{+203}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -8.7 \cdot 10^{+151}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-298}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-197}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 92:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+248}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (- (/ y z) t))) (t_2 (/ y (/ z x))))
   (if (<= z -7.8e+203)
     t_2
     (if (<= z -8.7e+151)
       (/ t (/ z x))
       (if (<= z 3.4e-298)
         t_1
         (if (<= z 2.4e-197)
           t_2
           (if (<= z 92.0)
             t_1
             (if (<= z 7.2e+248) (/ x (/ z t)) (* (/ y z) x)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * ((y / z) - t);
	double t_2 = y / (z / x);
	double tmp;
	if (z <= -7.8e+203) {
		tmp = t_2;
	} else if (z <= -8.7e+151) {
		tmp = t / (z / x);
	} else if (z <= 3.4e-298) {
		tmp = t_1;
	} else if (z <= 2.4e-197) {
		tmp = t_2;
	} else if (z <= 92.0) {
		tmp = t_1;
	} else if (z <= 7.2e+248) {
		tmp = x / (z / t);
	} else {
		tmp = (y / z) * x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * ((y / z) - t)
    t_2 = y / (z / x)
    if (z <= (-7.8d+203)) then
        tmp = t_2
    else if (z <= (-8.7d+151)) then
        tmp = t / (z / x)
    else if (z <= 3.4d-298) then
        tmp = t_1
    else if (z <= 2.4d-197) then
        tmp = t_2
    else if (z <= 92.0d0) then
        tmp = t_1
    else if (z <= 7.2d+248) then
        tmp = x / (z / t)
    else
        tmp = (y / z) * x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * ((y / z) - t);
	double t_2 = y / (z / x);
	double tmp;
	if (z <= -7.8e+203) {
		tmp = t_2;
	} else if (z <= -8.7e+151) {
		tmp = t / (z / x);
	} else if (z <= 3.4e-298) {
		tmp = t_1;
	} else if (z <= 2.4e-197) {
		tmp = t_2;
	} else if (z <= 92.0) {
		tmp = t_1;
	} else if (z <= 7.2e+248) {
		tmp = x / (z / t);
	} else {
		tmp = (y / z) * x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * ((y / z) - t)
	t_2 = y / (z / x)
	tmp = 0
	if z <= -7.8e+203:
		tmp = t_2
	elif z <= -8.7e+151:
		tmp = t / (z / x)
	elif z <= 3.4e-298:
		tmp = t_1
	elif z <= 2.4e-197:
		tmp = t_2
	elif z <= 92.0:
		tmp = t_1
	elif z <= 7.2e+248:
		tmp = x / (z / t)
	else:
		tmp = (y / z) * x
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(Float64(y / z) - t))
	t_2 = Float64(y / Float64(z / x))
	tmp = 0.0
	if (z <= -7.8e+203)
		tmp = t_2;
	elseif (z <= -8.7e+151)
		tmp = Float64(t / Float64(z / x));
	elseif (z <= 3.4e-298)
		tmp = t_1;
	elseif (z <= 2.4e-197)
		tmp = t_2;
	elseif (z <= 92.0)
		tmp = t_1;
	elseif (z <= 7.2e+248)
		tmp = Float64(x / Float64(z / t));
	else
		tmp = Float64(Float64(y / z) * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * ((y / z) - t);
	t_2 = y / (z / x);
	tmp = 0.0;
	if (z <= -7.8e+203)
		tmp = t_2;
	elseif (z <= -8.7e+151)
		tmp = t / (z / x);
	elseif (z <= 3.4e-298)
		tmp = t_1;
	elseif (z <= 2.4e-197)
		tmp = t_2;
	elseif (z <= 92.0)
		tmp = t_1;
	elseif (z <= 7.2e+248)
		tmp = x / (z / t);
	else
		tmp = (y / z) * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.8e+203], t$95$2, If[LessEqual[z, -8.7e+151], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e-298], t$95$1, If[LessEqual[z, 2.4e-197], t$95$2, If[LessEqual[z, 92.0], t$95$1, If[LessEqual[z, 7.2e+248], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -8.7 \cdot 10^{+151}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\

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

\mathbf{elif}\;z \leq 2.4 \cdot 10^{-197}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 7.2 \cdot 10^{+248}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -7.79999999999999949e203 or 3.4e-298 < z < 2.4000000000000001e-197

    1. Initial program 81.5%

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

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(-y, \frac{1}{-z}, -\frac{t}{1 - z}\right)} \]
      4. distribute-neg-frac81.6%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{-t}{1 - z} + \left(-y\right) \cdot \frac{1}{-z}\right)} \]
      3. distribute-lft-neg-out81.6%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\color{blue}{\frac{t \cdot 1}{-\left(1 - z\right)}} - y \cdot \frac{1}{-z}\right) \]
      12. *-rgt-identity81.6%

        \[\leadsto x \cdot \left(\frac{\color{blue}{t}}{-\left(1 - z\right)} - y \cdot \frac{1}{-z}\right) \]
      13. neg-sub081.6%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{0 - \left(1 - z\right)}} - y \cdot \frac{1}{-z}\right) \]
      14. associate--r-81.6%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{\left(0 - 1\right) + z}} - y \cdot \frac{1}{-z}\right) \]
      15. metadata-eval81.6%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{-1} + z} - y \cdot \frac{1}{-z}\right) \]
      16. neg-mul-181.6%

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

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

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{t}{-1 + z} - y \cdot \frac{-1}{z}\right)} \]
    6. Taylor expanded in t around 0 72.8%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    8. Simplified88.9%

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

    if -7.79999999999999949e203 < z < -8.7e151

    1. Initial program 99.4%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      3. associate-/r/99.8%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - -1 \cdot t\right)} \]
      4. cancel-sign-sub-inv99.8%

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

        \[\leadsto \frac{x}{z} \cdot \left(y + \color{blue}{1} \cdot t\right) \]
      6. *-lft-identity99.8%

        \[\leadsto \frac{x}{z} \cdot \left(y + \color{blue}{t}\right) \]
    4. Simplified99.8%

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

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

        \[\leadsto \left(y + t\right) \cdot \color{blue}{\frac{1}{\frac{z}{x}}} \]
      3. un-div-inv100.0%

        \[\leadsto \color{blue}{\frac{y + t}{\frac{z}{x}}} \]
      4. +-commutative100.0%

        \[\leadsto \frac{\color{blue}{t + y}}{\frac{z}{x}} \]
    6. Applied egg-rr100.0%

      \[\leadsto \color{blue}{\frac{t + y}{\frac{z}{x}}} \]
    7. Taylor expanded in t around inf 88.1%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    9. Simplified100.0%

      \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]

    if -8.7e151 < z < 3.4e-298 or 2.4000000000000001e-197 < z < 92

    1. Initial program 93.6%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around 0 86.9%

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

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

        \[\leadsto \frac{y}{z} \cdot x + \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
      3. neg-mul-183.2%

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

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

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

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

    if 92 < z < 7.20000000000000003e248

    1. Initial program 99.7%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      3. associate-/r/85.6%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - -1 \cdot t\right)} \]
      4. cancel-sign-sub-inv85.6%

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

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

        \[\leadsto \frac{x}{z} \cdot \left(y + \color{blue}{t}\right) \]
    4. Simplified85.6%

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{z}} \]
    6. Step-by-step derivation
      1. associate-*r/60.2%

        \[\leadsto \color{blue}{t \cdot \frac{x}{z}} \]
    7. Simplified60.2%

      \[\leadsto \color{blue}{t \cdot \frac{x}{z}} \]
    8. Step-by-step derivation
      1. associate-*r/60.4%

        \[\leadsto \color{blue}{\frac{t \cdot x}{z}} \]
      2. *-commutative60.4%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{t}}} \]
    9. Applied egg-rr71.4%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{t}}} \]

    if 7.20000000000000003e248 < z

    1. Initial program 99.8%

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
    4. Simplified87.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{+203}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq -8.7 \cdot 10^{+151}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-298}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-197}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq 92:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+248}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \end{array} \]

Alternative 5: 62.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(-x\right)\\ t_2 := y \cdot \frac{x}{z}\\ \mathbf{if}\;y \leq -6 \cdot 10^{-83}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -6 \cdot 10^{-242}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{-218}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{-162}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{-138}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (- x))) (t_2 (* y (/ x z))))
   (if (<= y -6e-83)
     t_2
     (if (<= y -6e-242)
       (* t (/ x z))
       (if (<= y 3.8e-218)
         t_1
         (if (<= y 1.55e-162) (* (/ y z) x) (if (<= y 5.2e-138) t_1 t_2)))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * -x;
	double t_2 = y * (x / z);
	double tmp;
	if (y <= -6e-83) {
		tmp = t_2;
	} else if (y <= -6e-242) {
		tmp = t * (x / z);
	} else if (y <= 3.8e-218) {
		tmp = t_1;
	} else if (y <= 1.55e-162) {
		tmp = (y / z) * x;
	} else if (y <= 5.2e-138) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * -x
    t_2 = y * (x / z)
    if (y <= (-6d-83)) then
        tmp = t_2
    else if (y <= (-6d-242)) then
        tmp = t * (x / z)
    else if (y <= 3.8d-218) then
        tmp = t_1
    else if (y <= 1.55d-162) then
        tmp = (y / z) * x
    else if (y <= 5.2d-138) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = t * -x;
	double t_2 = y * (x / z);
	double tmp;
	if (y <= -6e-83) {
		tmp = t_2;
	} else if (y <= -6e-242) {
		tmp = t * (x / z);
	} else if (y <= 3.8e-218) {
		tmp = t_1;
	} else if (y <= 1.55e-162) {
		tmp = (y / z) * x;
	} else if (y <= 5.2e-138) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * -x
	t_2 = y * (x / z)
	tmp = 0
	if y <= -6e-83:
		tmp = t_2
	elif y <= -6e-242:
		tmp = t * (x / z)
	elif y <= 3.8e-218:
		tmp = t_1
	elif y <= 1.55e-162:
		tmp = (y / z) * x
	elif y <= 5.2e-138:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(-x))
	t_2 = Float64(y * Float64(x / z))
	tmp = 0.0
	if (y <= -6e-83)
		tmp = t_2;
	elseif (y <= -6e-242)
		tmp = Float64(t * Float64(x / z));
	elseif (y <= 3.8e-218)
		tmp = t_1;
	elseif (y <= 1.55e-162)
		tmp = Float64(Float64(y / z) * x);
	elseif (y <= 5.2e-138)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * -x;
	t_2 = y * (x / z);
	tmp = 0.0;
	if (y <= -6e-83)
		tmp = t_2;
	elseif (y <= -6e-242)
		tmp = t * (x / z);
	elseif (y <= 3.8e-218)
		tmp = t_1;
	elseif (y <= 1.55e-162)
		tmp = (y / z) * x;
	elseif (y <= 5.2e-138)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * (-x)), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6e-83], t$95$2, If[LessEqual[y, -6e-242], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e-218], t$95$1, If[LessEqual[y, 1.55e-162], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 5.2e-138], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq 3.8 \cdot 10^{-218}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 5.2 \cdot 10^{-138}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.00000000000000021e-83 or 5.2e-138 < y

    1. Initial program 90.7%

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

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(-y, \frac{1}{-z}, -\frac{t}{1 - z}\right)} \]
      4. distribute-neg-frac90.6%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{-t}{1 - z} + \left(-y\right) \cdot \frac{1}{-z}\right)} \]
      3. distribute-lft-neg-out90.6%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\color{blue}{\frac{t \cdot 1}{-\left(1 - z\right)}} - y \cdot \frac{1}{-z}\right) \]
      12. *-rgt-identity90.6%

        \[\leadsto x \cdot \left(\frac{\color{blue}{t}}{-\left(1 - z\right)} - y \cdot \frac{1}{-z}\right) \]
      13. neg-sub090.6%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{0 - \left(1 - z\right)}} - y \cdot \frac{1}{-z}\right) \]
      14. associate--r-90.6%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{\left(0 - 1\right) + z}} - y \cdot \frac{1}{-z}\right) \]
      15. metadata-eval90.6%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{-1} + z} - y \cdot \frac{1}{-z}\right) \]
      16. neg-mul-190.6%

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \frac{1}{\color{blue}{-1 \cdot z}}\right) \]
      17. associate-/r*90.6%

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

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{t}{-1 + z} - y \cdot \frac{-1}{z}\right)} \]
    6. Taylor expanded in t around 0 77.1%

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

        \[\leadsto \color{blue}{y \cdot \frac{x}{z}} \]
    8. Simplified80.9%

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

    if -6.00000000000000021e-83 < y < -6e-242

    1. Initial program 96.2%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      3. associate-/r/77.5%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - -1 \cdot t\right)} \]
      4. cancel-sign-sub-inv77.5%

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

        \[\leadsto \frac{x}{z} \cdot \left(y + \color{blue}{1} \cdot t\right) \]
      6. *-lft-identity77.5%

        \[\leadsto \frac{x}{z} \cdot \left(y + \color{blue}{t}\right) \]
    4. Simplified77.5%

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{z}} \]
    6. Step-by-step derivation
      1. associate-*r/70.3%

        \[\leadsto \color{blue}{t \cdot \frac{x}{z}} \]
    7. Simplified70.3%

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

    if -6e-242 < y < 3.7999999999999999e-218 or 1.5499999999999999e-162 < y < 5.2e-138

    1. Initial program 99.8%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around 0 60.0%

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

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

        \[\leadsto \frac{y}{z} \cdot x + \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
      3. neg-mul-164.4%

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

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot x} \]
    7. Simplified57.8%

      \[\leadsto \color{blue}{-t \cdot x} \]

    if 3.7999999999999999e-218 < y < 1.5499999999999999e-162

    1. Initial program 99.6%

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
    4. Simplified72.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{-83}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq -6 \cdot 10^{-242}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{-218}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{-162}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{-138}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array} \]

Alternative 6: 87.3% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq 3.5 \cdot 10^{-298}:\\
\;\;\;\;t_1\\

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

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

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.3000000000000002e-38 or 1 < z

    1. Initial program 97.4%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      3. associate-/r/89.6%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - -1 \cdot t\right)} \]
      4. cancel-sign-sub-inv89.6%

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

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

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

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

    if -4.3000000000000002e-38 < z < 3.4999999999999998e-298 or 2.3500000000000001e-197 < z < 1

    1. Initial program 92.2%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around 0 96.1%

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

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

        \[\leadsto \frac{y}{z} \cdot x + \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
      3. neg-mul-191.0%

        \[\leadsto \frac{y}{z} \cdot x + \color{blue}{\left(-t\right)} \cdot x \]
      4. distribute-rgt-out92.0%

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

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

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

    if 3.4999999999999998e-298 < z < 2.3500000000000001e-197

    1. Initial program 74.3%

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

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(-y, \frac{1}{-z}, -\frac{t}{1 - z}\right)} \]
      4. distribute-neg-frac74.3%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{-t}{1 - z} + \left(-y\right) \cdot \frac{1}{-z}\right)} \]
      3. distribute-lft-neg-out74.3%

        \[\leadsto x \cdot \left(\frac{-t}{1 - z} + \color{blue}{\left(-y \cdot \frac{1}{-z}\right)}\right) \]
      4. unsub-neg74.3%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\frac{\color{blue}{t}}{-\left(1 - z\right)} - y \cdot \frac{1}{-z}\right) \]
      13. neg-sub074.3%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{0 - \left(1 - z\right)}} - y \cdot \frac{1}{-z}\right) \]
      14. associate--r-74.3%

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

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{-1} + z} - y \cdot \frac{1}{-z}\right) \]
      16. neg-mul-174.3%

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \frac{1}{\color{blue}{-1 \cdot z}}\right) \]
      17. associate-/r*74.3%

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \color{blue}{\frac{\frac{1}{-1}}{z}}\right) \]
      18. metadata-eval74.3%

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{t}{-1 + z} - y \cdot \frac{-1}{z}\right)} \]
    6. Taylor expanded in t around 0 91.1%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    8. Simplified99.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{-38}:\\ \;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-298}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{-197}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\ \end{array} \]

Alternative 7: 92.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - t\right)\\
t_2 := \frac{x}{\frac{z}{y + t}}\\
\mathbf{if}\;z \leq -1:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{-297}:\\
\;\;\;\;t_1\\

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

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

\mathbf{else}:\\
\;\;\;\;t_2\\


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

    1. Initial program 98.0%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      3. neg-mul-197.0%

        \[\leadsto \frac{x}{\frac{z}{y - \color{blue}{\left(-t\right)}}} \]
    4. Simplified97.0%

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

    if -1 < z < 2.79999999999999984e-297 or 2.5500000000000001e-197 < z < 1

    1. Initial program 92.0%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around 0 94.7%

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

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

        \[\leadsto \frac{y}{z} \cdot x + \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
      3. neg-mul-189.3%

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

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

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

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

    if 2.79999999999999984e-297 < z < 2.5500000000000001e-197

    1. Initial program 74.3%

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

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(-y, \frac{1}{-z}, -\frac{t}{1 - z}\right)} \]
      4. distribute-neg-frac74.3%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{-t}{1 - z} + \left(-y\right) \cdot \frac{1}{-z}\right)} \]
      3. distribute-lft-neg-out74.3%

        \[\leadsto x \cdot \left(\frac{-t}{1 - z} + \color{blue}{\left(-y \cdot \frac{1}{-z}\right)}\right) \]
      4. unsub-neg74.3%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\frac{\color{blue}{t}}{-\left(1 - z\right)} - y \cdot \frac{1}{-z}\right) \]
      13. neg-sub074.3%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{0 - \left(1 - z\right)}} - y \cdot \frac{1}{-z}\right) \]
      14. associate--r-74.3%

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

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{-1} + z} - y \cdot \frac{1}{-z}\right) \]
      16. neg-mul-174.3%

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \frac{1}{\color{blue}{-1 \cdot z}}\right) \]
      17. associate-/r*74.3%

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \color{blue}{\frac{\frac{1}{-1}}{z}}\right) \]
      18. metadata-eval74.3%

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{t}{-1 + z} - y \cdot \frac{-1}{z}\right)} \]
    6. Taylor expanded in t around 0 91.1%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    8. Simplified99.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1:\\ \;\;\;\;\frac{x}{\frac{z}{y + t}}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-297}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{-197}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{y + t}}\\ \end{array} \]

Alternative 8: 39.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.9 \cdot 10^{-131} \lor \neg \left(z \leq -6.2 \cdot 10^{-240} \lor \neg \left(z \leq 1.16 \cdot 10^{-213}\right) \land z \leq 1\right):\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -8.9e-131)
         (not (or (<= z -6.2e-240) (and (not (<= z 1.16e-213)) (<= z 1.0)))))
   (* t (/ x z))
   (* t (- x))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -8.9e-131) || !((z <= -6.2e-240) || (!(z <= 1.16e-213) && (z <= 1.0)))) {
		tmp = t * (x / z);
	} else {
		tmp = t * -x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((z <= (-8.9d-131)) .or. (.not. (z <= (-6.2d-240)) .or. (.not. (z <= 1.16d-213)) .and. (z <= 1.0d0))) then
        tmp = t * (x / z)
    else
        tmp = t * -x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -8.9e-131) || !((z <= -6.2e-240) || (!(z <= 1.16e-213) && (z <= 1.0)))) {
		tmp = t * (x / z);
	} else {
		tmp = t * -x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -8.9e-131) or not ((z <= -6.2e-240) or (not (z <= 1.16e-213) and (z <= 1.0))):
		tmp = t * (x / z)
	else:
		tmp = t * -x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -8.9e-131) || !((z <= -6.2e-240) || (!(z <= 1.16e-213) && (z <= 1.0))))
		tmp = Float64(t * Float64(x / z));
	else
		tmp = Float64(t * Float64(-x));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -8.9e-131) || ~(((z <= -6.2e-240) || (~((z <= 1.16e-213)) && (z <= 1.0)))))
		tmp = t * (x / z);
	else
		tmp = t * -x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -8.9e-131], N[Not[Or[LessEqual[z, -6.2e-240], And[N[Not[LessEqual[z, 1.16e-213]], $MachinePrecision], LessEqual[z, 1.0]]]], $MachinePrecision]], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(t * (-x)), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.9 \cdot 10^{-131} \lor \neg \left(z \leq -6.2 \cdot 10^{-240} \lor \neg \left(z \leq 1.16 \cdot 10^{-213}\right) \land z \leq 1\right):\\
\;\;\;\;t \cdot \frac{x}{z}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \left(-x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.9000000000000001e-131 or -6.20000000000000034e-240 < z < 1.15999999999999994e-213 or 1 < z

    1. Initial program 94.6%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      3. associate-/r/81.7%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - -1 \cdot t\right)} \]
      4. cancel-sign-sub-inv81.7%

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

        \[\leadsto \frac{x}{z} \cdot \left(y + \color{blue}{1} \cdot t\right) \]
      6. *-lft-identity81.7%

        \[\leadsto \frac{x}{z} \cdot \left(y + \color{blue}{t}\right) \]
    4. Simplified81.7%

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{z}} \]
    6. Step-by-step derivation
      1. associate-*r/43.7%

        \[\leadsto \color{blue}{t \cdot \frac{x}{z}} \]
    7. Simplified43.7%

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

    if -8.9000000000000001e-131 < z < -6.20000000000000034e-240 or 1.15999999999999994e-213 < z < 1

    1. Initial program 89.7%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around 0 96.9%

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

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

        \[\leadsto \frac{y}{z} \cdot x + \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
      3. neg-mul-189.2%

        \[\leadsto \frac{y}{z} \cdot x + \color{blue}{\left(-t\right)} \cdot x \]
      4. distribute-rgt-out89.3%

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot x} \]
    7. Simplified41.8%

      \[\leadsto \color{blue}{-t \cdot x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification43.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.9 \cdot 10^{-131} \lor \neg \left(z \leq -6.2 \cdot 10^{-240} \lor \neg \left(z \leq 1.16 \cdot 10^{-213}\right) \land z \leq 1\right):\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \end{array} \]

Alternative 9: 64.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{z}\\
\mathbf{if}\;y \leq -1.12 \cdot 10^{-82}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 1.1 \cdot 10^{-222}:\\
\;\;\;\;t \cdot \left(-x\right)\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.12e-82 or 2.1500000000000001e-193 < y

    1. Initial program 91.3%

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

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(-y, \frac{1}{-z}, -\frac{t}{1 - z}\right)} \]
      4. distribute-neg-frac91.3%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{-t}{1 - z} + \left(-y\right) \cdot \frac{1}{-z}\right)} \]
      3. distribute-lft-neg-out91.3%

        \[\leadsto x \cdot \left(\frac{-t}{1 - z} + \color{blue}{\left(-y \cdot \frac{1}{-z}\right)}\right) \]
      4. unsub-neg91.3%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\frac{\color{blue}{t}}{-\left(1 - z\right)} - y \cdot \frac{1}{-z}\right) \]
      13. neg-sub091.3%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{0 - \left(1 - z\right)}} - y \cdot \frac{1}{-z}\right) \]
      14. associate--r-91.3%

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

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{-1} + z} - y \cdot \frac{1}{-z}\right) \]
      16. neg-mul-191.3%

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \frac{1}{\color{blue}{-1 \cdot z}}\right) \]
      17. associate-/r*91.3%

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \color{blue}{\frac{\frac{1}{-1}}{z}}\right) \]
      18. metadata-eval91.3%

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{t}{-1 + z} - y \cdot \frac{-1}{z}\right)} \]
    6. Taylor expanded in t around 0 73.7%

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

        \[\leadsto \color{blue}{y \cdot \frac{x}{z}} \]
    8. Simplified78.2%

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

    if -1.12e-82 < y < 4.00000000000000015e-284

    1. Initial program 97.7%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      3. associate-/r/62.6%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - -1 \cdot t\right)} \]
      4. cancel-sign-sub-inv62.6%

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

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

        \[\leadsto \frac{x}{z} \cdot \left(y + \color{blue}{t}\right) \]
    4. Simplified62.6%

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{z}} \]
    6. Step-by-step derivation
      1. associate-*r/58.4%

        \[\leadsto \color{blue}{t \cdot \frac{x}{z}} \]
    7. Simplified58.4%

      \[\leadsto \color{blue}{t \cdot \frac{x}{z}} \]
    8. Step-by-step derivation
      1. associate-*r/64.9%

        \[\leadsto \color{blue}{\frac{t \cdot x}{z}} \]
      2. *-commutative64.9%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{t}}} \]
    9. Applied egg-rr69.2%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{t}}} \]

    if 4.00000000000000015e-284 < y < 1.1e-222

    1. Initial program 99.8%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around 0 75.1%

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

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

        \[\leadsto \frac{y}{z} \cdot x + \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
      3. neg-mul-180.1%

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

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot x} \]
    7. Simplified70.0%

      \[\leadsto \color{blue}{-t \cdot x} \]

    if 1.1e-222 < y < 2.1500000000000001e-193

    1. Initial program 99.7%

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
    4. Simplified64.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.12 \cdot 10^{-82}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-284}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{-222}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{-193}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array} \]

Alternative 10: 64.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{z}\\
\mathbf{if}\;y \leq -1.3 \cdot 10^{-82}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.3e-82 or 1.2e-192 < y

    1. Initial program 91.2%

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

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(-y, \frac{1}{-z}, -\frac{t}{1 - z}\right)} \]
      4. distribute-neg-frac91.2%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{-t}{1 - z} + \left(-y\right) \cdot \frac{1}{-z}\right)} \]
      3. distribute-lft-neg-out91.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{0 - \left(1 - z\right)}} - y \cdot \frac{1}{-z}\right) \]
      14. associate--r-91.2%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{\left(0 - 1\right) + z}} - y \cdot \frac{1}{-z}\right) \]
      15. metadata-eval91.2%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{-1} + z} - y \cdot \frac{1}{-z}\right) \]
      16. neg-mul-191.2%

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \frac{1}{\color{blue}{-1 \cdot z}}\right) \]
      17. associate-/r*91.2%

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

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{t}{-1 + z} - y \cdot \frac{-1}{z}\right)} \]
    6. Taylor expanded in t around 0 73.9%

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

        \[\leadsto \color{blue}{y \cdot \frac{x}{z}} \]
    8. Simplified78.4%

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

    if -1.3e-82 < y < 3e-284

    1. Initial program 97.7%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      3. associate-/r/62.6%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - -1 \cdot t\right)} \]
      4. cancel-sign-sub-inv62.6%

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

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

        \[\leadsto \frac{x}{z} \cdot \left(y + \color{blue}{t}\right) \]
    4. Simplified62.6%

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{z}} \]
    6. Step-by-step derivation
      1. associate-*r/58.4%

        \[\leadsto \color{blue}{t \cdot \frac{x}{z}} \]
    7. Simplified58.4%

      \[\leadsto \color{blue}{t \cdot \frac{x}{z}} \]
    8. Step-by-step derivation
      1. associate-*r/64.9%

        \[\leadsto \color{blue}{\frac{t \cdot x}{z}} \]
      2. *-commutative64.9%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{t}}} \]
    9. Applied egg-rr69.2%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{t}}} \]

    if 3e-284 < y < 1.00000000000000002e-221

    1. Initial program 99.8%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around 0 75.1%

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

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

        \[\leadsto \frac{y}{z} \cdot x + \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
      3. neg-mul-180.1%

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

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot x} \]
    7. Simplified70.0%

      \[\leadsto \color{blue}{-t \cdot x} \]

    if 1.00000000000000002e-221 < y < 1.2e-192

    1. Initial program 99.5%

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
    4. Simplified60.7%

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
      2. clear-num60.8%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    6. Applied egg-rr61.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{-82}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-284}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;y \leq 10^{-221}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-192}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array} \]

Alternative 11: 63.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{-81}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\

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

\mathbf{elif}\;y \leq 1.25 \cdot 10^{-221}:\\
\;\;\;\;t \cdot \left(-x\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -8.19999999999999968e-81

    1. Initial program 89.8%

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

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(-y, \frac{1}{-z}, -\frac{t}{1 - z}\right)} \]
      4. distribute-neg-frac89.7%

        \[\leadsto x \cdot \mathsf{fma}\left(-y, \frac{1}{-z}, \color{blue}{\frac{-t}{1 - z}}\right) \]
    3. Applied egg-rr89.7%

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{-t}{1 - z} + \left(-y\right) \cdot \frac{1}{-z}\right)} \]
      3. distribute-lft-neg-out89.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\frac{\color{blue}{t}}{-\left(1 - z\right)} - y \cdot \frac{1}{-z}\right) \]
      13. neg-sub089.7%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{0 - \left(1 - z\right)}} - y \cdot \frac{1}{-z}\right) \]
      14. associate--r-89.7%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{\left(0 - 1\right) + z}} - y \cdot \frac{1}{-z}\right) \]
      15. metadata-eval89.7%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{-1} + z} - y \cdot \frac{1}{-z}\right) \]
      16. neg-mul-189.7%

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \frac{1}{\color{blue}{-1 \cdot z}}\right) \]
      17. associate-/r*89.7%

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \color{blue}{\frac{\frac{1}{-1}}{z}}\right) \]
      18. metadata-eval89.7%

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{t}{-1 + z} - y \cdot \frac{-1}{z}\right)} \]
    6. Taylor expanded in t around 0 77.0%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    8. Simplified83.0%

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

    if -8.19999999999999968e-81 < y < 5.2e-284

    1. Initial program 97.7%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      3. associate-/r/62.6%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - -1 \cdot t\right)} \]
      4. cancel-sign-sub-inv62.6%

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

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

        \[\leadsto \frac{x}{z} \cdot \left(y + \color{blue}{t}\right) \]
    4. Simplified62.6%

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{z}} \]
    6. Step-by-step derivation
      1. associate-*r/58.4%

        \[\leadsto \color{blue}{t \cdot \frac{x}{z}} \]
    7. Simplified58.4%

      \[\leadsto \color{blue}{t \cdot \frac{x}{z}} \]
    8. Step-by-step derivation
      1. associate-*r/64.9%

        \[\leadsto \color{blue}{\frac{t \cdot x}{z}} \]
      2. *-commutative64.9%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{t}}} \]
    9. Applied egg-rr69.2%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{t}}} \]

    if 5.2e-284 < y < 1.24999999999999999e-221

    1. Initial program 99.8%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around 0 75.1%

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

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

        \[\leadsto \frac{y}{z} \cdot x + \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
      3. neg-mul-180.1%

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

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot x} \]
    7. Simplified70.0%

      \[\leadsto \color{blue}{-t \cdot x} \]

    if 1.24999999999999999e-221 < y < 9.5000000000000003e-193

    1. Initial program 99.5%

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
    4. Simplified60.7%

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
      2. clear-num60.8%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    6. Applied egg-rr61.1%

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

    if 9.5000000000000003e-193 < y

    1. Initial program 92.7%

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

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(-y, \frac{1}{-z}, -\frac{t}{1 - z}\right)} \]
      4. distribute-neg-frac92.7%

        \[\leadsto x \cdot \mathsf{fma}\left(-y, \frac{1}{-z}, \color{blue}{\frac{-t}{1 - z}}\right) \]
    3. Applied egg-rr92.7%

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{-t}{1 - z} + \left(-y\right) \cdot \frac{1}{-z}\right)} \]
      3. distribute-lft-neg-out92.7%

        \[\leadsto x \cdot \left(\frac{-t}{1 - z} + \color{blue}{\left(-y \cdot \frac{1}{-z}\right)}\right) \]
      4. unsub-neg92.7%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\frac{\color{blue}{t}}{-\left(1 - z\right)} - y \cdot \frac{1}{-z}\right) \]
      13. neg-sub092.7%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{0 - \left(1 - z\right)}} - y \cdot \frac{1}{-z}\right) \]
      14. associate--r-92.7%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{\left(0 - 1\right) + z}} - y \cdot \frac{1}{-z}\right) \]
      15. metadata-eval92.7%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{-1} + z} - y \cdot \frac{1}{-z}\right) \]
      16. neg-mul-192.7%

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \frac{1}{\color{blue}{-1 \cdot z}}\right) \]
      17. associate-/r*92.7%

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \color{blue}{\frac{\frac{1}{-1}}{z}}\right) \]
      18. metadata-eval92.7%

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{t}{-1 + z} - y \cdot \frac{-1}{z}\right)} \]
    6. Taylor expanded in t around 0 70.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.2 \cdot 10^{-81}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{-284}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-221}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-193}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array} \]

Alternative 12: 73.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{-68}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\

\mathbf{elif}\;y \leq 1.55 \cdot 10^{-205}:\\
\;\;\;\;x \cdot \frac{t}{z + -1}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.20000000000000015e-68

    1. Initial program 89.6%

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

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(-y, \frac{1}{-z}, -\frac{t}{1 - z}\right)} \]
      4. distribute-neg-frac89.5%

        \[\leadsto x \cdot \mathsf{fma}\left(-y, \frac{1}{-z}, \color{blue}{\frac{-t}{1 - z}}\right) \]
    3. Applied egg-rr89.5%

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{-t}{1 - z} + \left(-y\right) \cdot \frac{1}{-z}\right)} \]
      3. distribute-lft-neg-out89.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\frac{\color{blue}{t}}{-\left(1 - z\right)} - y \cdot \frac{1}{-z}\right) \]
      13. neg-sub089.5%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{0 - \left(1 - z\right)}} - y \cdot \frac{1}{-z}\right) \]
      14. associate--r-89.5%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{\left(0 - 1\right) + z}} - y \cdot \frac{1}{-z}\right) \]
      15. metadata-eval89.5%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{-1} + z} - y \cdot \frac{1}{-z}\right) \]
      16. neg-mul-189.5%

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \frac{1}{\color{blue}{-1 \cdot z}}\right) \]
      17. associate-/r*89.5%

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

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{t}{-1 + z} - y \cdot \frac{-1}{z}\right)} \]
    6. Taylor expanded in t around 0 77.6%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    8. Simplified83.7%

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

    if -7.20000000000000015e-68 < y < 1.54999999999999991e-205

    1. Initial program 98.5%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in y around 0 84.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{1 - z}} \]
    3. Step-by-step derivation
      1. associate-*r/84.6%

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

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot t\right) \cdot x}}{1 - z} \]
      3. neg-mul-184.6%

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

        \[\leadsto \color{blue}{\frac{-t}{1 - z} \cdot x} \]
      5. *-commutative88.7%

        \[\leadsto \color{blue}{x \cdot \frac{-t}{1 - z}} \]
      6. neg-mul-188.7%

        \[\leadsto x \cdot \frac{\color{blue}{-1 \cdot t}}{1 - z} \]
      7. *-commutative88.7%

        \[\leadsto x \cdot \frac{\color{blue}{t \cdot -1}}{1 - z} \]
      8. associate-*r/88.6%

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

        \[\leadsto x \cdot \left(t \cdot \frac{\color{blue}{\frac{1}{-1}}}{1 - z}\right) \]
      10. associate-/r*88.6%

        \[\leadsto x \cdot \left(t \cdot \color{blue}{\frac{1}{-1 \cdot \left(1 - z\right)}}\right) \]
      11. neg-mul-188.6%

        \[\leadsto x \cdot \left(t \cdot \frac{1}{\color{blue}{-\left(1 - z\right)}}\right) \]
      12. associate-*r/88.7%

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

        \[\leadsto x \cdot \frac{\color{blue}{t}}{-\left(1 - z\right)} \]
      14. neg-sub088.7%

        \[\leadsto x \cdot \frac{t}{\color{blue}{0 - \left(1 - z\right)}} \]
      15. associate--r-88.7%

        \[\leadsto x \cdot \frac{t}{\color{blue}{\left(0 - 1\right) + z}} \]
      16. metadata-eval88.7%

        \[\leadsto x \cdot \frac{t}{\color{blue}{-1} + z} \]
    4. Simplified88.7%

      \[\leadsto \color{blue}{x \cdot \frac{t}{-1 + z}} \]

    if 1.54999999999999991e-205 < y < 1.21999999999999998e73

    1. Initial program 97.6%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around 0 69.0%

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

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

        \[\leadsto \frac{y}{z} \cdot x + \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
      3. neg-mul-174.9%

        \[\leadsto \frac{y}{z} \cdot x + \color{blue}{\left(-t\right)} \cdot x \]
      4. distribute-rgt-out74.9%

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

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

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

    if 1.21999999999999998e73 < y

    1. Initial program 88.3%

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

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

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(-y, \frac{1}{-z}, -\frac{t}{1 - z}\right)} \]
      4. distribute-neg-frac88.3%

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{-t}{1 - z} + \left(-y\right) \cdot \frac{1}{-z}\right)} \]
      3. distribute-lft-neg-out88.3%

        \[\leadsto x \cdot \left(\frac{-t}{1 - z} + \color{blue}{\left(-y \cdot \frac{1}{-z}\right)}\right) \]
      4. unsub-neg88.3%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\frac{\color{blue}{t}}{-\left(1 - z\right)} - y \cdot \frac{1}{-z}\right) \]
      13. neg-sub088.3%

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{0 - \left(1 - z\right)}} - y \cdot \frac{1}{-z}\right) \]
      14. associate--r-88.3%

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

        \[\leadsto x \cdot \left(\frac{t}{\color{blue}{-1} + z} - y \cdot \frac{1}{-z}\right) \]
      16. neg-mul-188.3%

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \frac{1}{\color{blue}{-1 \cdot z}}\right) \]
      17. associate-/r*88.3%

        \[\leadsto x \cdot \left(\frac{t}{-1 + z} - y \cdot \color{blue}{\frac{\frac{1}{-1}}{z}}\right) \]
      18. metadata-eval88.3%

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{t}{-1 + z} - y \cdot \frac{-1}{z}\right)} \]
    6. Taylor expanded in t around 0 90.1%

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

        \[\leadsto \color{blue}{y \cdot \frac{x}{z}} \]
    8. Simplified92.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{-68}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{-205}:\\ \;\;\;\;x \cdot \frac{t}{z + -1}\\ \mathbf{elif}\;y \leq 1.22 \cdot 10^{+73}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array} \]

Alternative 13: 22.9% accurate, 2.8× speedup?

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

\\
t \cdot \left(-x\right)
\end{array}
Derivation
  1. Initial program 93.2%

    \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
  2. Taylor expanded in z around 0 68.2%

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

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

      \[\leadsto \frac{y}{z} \cdot x + \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
    3. neg-mul-166.8%

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

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

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

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

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

      \[\leadsto \color{blue}{-t \cdot x} \]
  7. Simplified23.9%

    \[\leadsto \color{blue}{-t \cdot x} \]
  8. Final simplification23.9%

    \[\leadsto t \cdot \left(-x\right) \]

Developer target: 95.1% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - t \cdot \frac{1}{1 - z}\right)\\
t_2 := x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\
\mathbf{if}\;t_2 < -7.623226303312042 \cdot 10^{-196}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_2 < 1.4133944927702302 \cdot 10^{-211}:\\
\;\;\;\;\frac{y \cdot x}{z} + \left(-\frac{t \cdot x}{1 - z}\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023200 
(FPCore (x y z t)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
  :precision binary64

  :herbie-target
  (if (< (* x (- (/ y z) (/ t (- 1.0 z)))) -7.623226303312042e-196) (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))) (if (< (* x (- (/ y z) (/ t (- 1.0 z)))) 1.4133944927702302e-211) (+ (/ (* y x) z) (- (/ (* t x) (- 1.0 z)))) (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z)))))))

  (* x (- (/ y z) (/ t (- 1.0 z)))))