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

Percentage Accurate: 94.4% → 94.1%
Time: 12.0s
Alternatives: 11
Speedup: N/A×

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 11 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: 94.1% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z)))) < 1.00000000000000002e306

    1. Initial program 96.3%

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

    if 1.00000000000000002e306 < (*.f64 x (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))))

    1. Initial program 80.0%

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{z}{y}}} \]
    6. Step-by-step derivation
      1. associate-/r/91.9%

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

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

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

Alternative 2: 43.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{t}{z}\\ t_2 := x \cdot \left(-t\right)\\ \mathbf{if}\;z \leq -1:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -9.8 \cdot 10^{-185}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-206}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 7000:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ t z))) (t_2 (* x (- t))))
   (if (<= z -1.0)
     t_1
     (if (<= z -9.8e-185)
       t_2
       (if (<= z 1.3e-206) (* t (/ x z)) (if (<= z 7000.0) t_2 t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (t / z);
	double t_2 = x * -t;
	double tmp;
	if (z <= -1.0) {
		tmp = t_1;
	} else if (z <= -9.8e-185) {
		tmp = t_2;
	} else if (z <= 1.3e-206) {
		tmp = t * (x / z);
	} else if (z <= 7000.0) {
		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) :: tmp
    t_1 = x * (t / z)
    t_2 = x * -t
    if (z <= (-1.0d0)) then
        tmp = t_1
    else if (z <= (-9.8d-185)) then
        tmp = t_2
    else if (z <= 1.3d-206) then
        tmp = t * (x / z)
    else if (z <= 7000.0d0) 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 = x * (t / z);
	double t_2 = x * -t;
	double tmp;
	if (z <= -1.0) {
		tmp = t_1;
	} else if (z <= -9.8e-185) {
		tmp = t_2;
	} else if (z <= 1.3e-206) {
		tmp = t * (x / z);
	} else if (z <= 7000.0) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (t / z)
	t_2 = x * -t
	tmp = 0
	if z <= -1.0:
		tmp = t_1
	elif z <= -9.8e-185:
		tmp = t_2
	elif z <= 1.3e-206:
		tmp = t * (x / z)
	elif z <= 7000.0:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(t / z))
	t_2 = Float64(x * Float64(-t))
	tmp = 0.0
	if (z <= -1.0)
		tmp = t_1;
	elseif (z <= -9.8e-185)
		tmp = t_2;
	elseif (z <= 1.3e-206)
		tmp = Float64(t * Float64(x / z));
	elseif (z <= 7000.0)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (t / z);
	t_2 = x * -t;
	tmp = 0.0;
	if (z <= -1.0)
		tmp = t_1;
	elseif (z <= -9.8e-185)
		tmp = t_2;
	elseif (z <= 1.3e-206)
		tmp = t * (x / z);
	elseif (z <= 7000.0)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * (-t)), $MachinePrecision]}, If[LessEqual[z, -1.0], t$95$1, If[LessEqual[z, -9.8e-185], t$95$2, If[LessEqual[z, 1.3e-206], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7000.0], t$95$2, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -9.8 \cdot 10^{-185}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 1.3 \cdot 10^{-206}:\\
\;\;\;\;t \cdot \frac{x}{z}\\

\mathbf{elif}\;z \leq 7000:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1 < z < -9.8000000000000005e-185 or 1.3e-206 < z < 7e3

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot t} \]
      3. distribute-lft-neg-in40.9%

        \[\leadsto \color{blue}{\left(-x\right) \cdot t} \]
    7. Simplified40.9%

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

    if -9.8000000000000005e-185 < z < 1.3e-206

    1. Initial program 87.4%

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{z}{y + t}}} \]
    6. Taylor expanded in y around 0 21.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -9.8 \cdot 10^{-185}:\\ \;\;\;\;x \cdot \left(-t\right)\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-206}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 7000:\\ \;\;\;\;x \cdot \left(-t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]

Alternative 3: 63.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{t}{z}\\ \mathbf{if}\;y \leq -3.45 \cdot 10^{-69}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-203}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -3.4 \cdot 10^{-296}:\\ \;\;\;\;x \cdot \left(-t\right)\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-81}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ t z))))
   (if (<= y -3.45e-69)
     (* y (/ x z))
     (if (<= y -1.8e-203)
       t_1
       (if (<= y -3.4e-296)
         (* x (- t))
         (if (<= y 4e-81) t_1 (* x (/ y z))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (t / z);
	double tmp;
	if (y <= -3.45e-69) {
		tmp = y * (x / z);
	} else if (y <= -1.8e-203) {
		tmp = t_1;
	} else if (y <= -3.4e-296) {
		tmp = x * -t;
	} else if (y <= 4e-81) {
		tmp = t_1;
	} else {
		tmp = x * (y / 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) :: t_1
    real(8) :: tmp
    t_1 = x * (t / z)
    if (y <= (-3.45d-69)) then
        tmp = y * (x / z)
    else if (y <= (-1.8d-203)) then
        tmp = t_1
    else if (y <= (-3.4d-296)) then
        tmp = x * -t
    else if (y <= 4d-81) then
        tmp = t_1
    else
        tmp = x * (y / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * (t / z);
	double tmp;
	if (y <= -3.45e-69) {
		tmp = y * (x / z);
	} else if (y <= -1.8e-203) {
		tmp = t_1;
	} else if (y <= -3.4e-296) {
		tmp = x * -t;
	} else if (y <= 4e-81) {
		tmp = t_1;
	} else {
		tmp = x * (y / z);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (t / z)
	tmp = 0
	if y <= -3.45e-69:
		tmp = y * (x / z)
	elif y <= -1.8e-203:
		tmp = t_1
	elif y <= -3.4e-296:
		tmp = x * -t
	elif y <= 4e-81:
		tmp = t_1
	else:
		tmp = x * (y / z)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(t / z))
	tmp = 0.0
	if (y <= -3.45e-69)
		tmp = Float64(y * Float64(x / z));
	elseif (y <= -1.8e-203)
		tmp = t_1;
	elseif (y <= -3.4e-296)
		tmp = Float64(x * Float64(-t));
	elseif (y <= 4e-81)
		tmp = t_1;
	else
		tmp = Float64(x * Float64(y / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (t / z);
	tmp = 0.0;
	if (y <= -3.45e-69)
		tmp = y * (x / z);
	elseif (y <= -1.8e-203)
		tmp = t_1;
	elseif (y <= -3.4e-296)
		tmp = x * -t;
	elseif (y <= 4e-81)
		tmp = t_1;
	else
		tmp = x * (y / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.45e-69], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.8e-203], t$95$1, If[LessEqual[y, -3.4e-296], N[(x * (-t)), $MachinePrecision], If[LessEqual[y, 4e-81], t$95$1, N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.8 \cdot 10^{-203}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 4 \cdot 10^{-81}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 92.4%

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{z}{y}}} \]
    6. Step-by-step derivation
      1. associate-/r/77.4%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot y} \]
    7. Applied egg-rr77.4%

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

    if -3.44999999999999985e-69 < y < -1.7999999999999999e-203 or -3.39999999999999997e-296 < y < 3.9999999999999998e-81

    1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7999999999999999e-203 < y < -3.39999999999999997e-296

    1. Initial program 83.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot t} \]
      3. distribute-lft-neg-in61.4%

        \[\leadsto \color{blue}{\left(-x\right) \cdot t} \]
    7. Simplified61.4%

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

    if 3.9999999999999998e-81 < y

    1. Initial program 94.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.45 \cdot 10^{-69}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-203}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq -3.4 \cdot 10^{-296}:\\ \;\;\;\;x \cdot \left(-t\right)\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-81}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \]

Alternative 4: 64.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{t}{z}\\ \mathbf{if}\;y \leq -3.2 \cdot 10^{-69}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-203}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{-296}:\\ \;\;\;\;x \cdot \left(-t\right)\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-80}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ t z))))
   (if (<= y -3.2e-69)
     (* y (/ x z))
     (if (<= y -1.8e-203)
       t_1
       (if (<= y -4.1e-296)
         (* x (- t))
         (if (<= y 4e-80) t_1 (/ (* x y) z)))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (t / z);
	double tmp;
	if (y <= -3.2e-69) {
		tmp = y * (x / z);
	} else if (y <= -1.8e-203) {
		tmp = t_1;
	} else if (y <= -4.1e-296) {
		tmp = x * -t;
	} else if (y <= 4e-80) {
		tmp = t_1;
	} else {
		tmp = (x * y) / 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) :: t_1
    real(8) :: tmp
    t_1 = x * (t / z)
    if (y <= (-3.2d-69)) then
        tmp = y * (x / z)
    else if (y <= (-1.8d-203)) then
        tmp = t_1
    else if (y <= (-4.1d-296)) then
        tmp = x * -t
    else if (y <= 4d-80) then
        tmp = t_1
    else
        tmp = (x * y) / z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * (t / z);
	double tmp;
	if (y <= -3.2e-69) {
		tmp = y * (x / z);
	} else if (y <= -1.8e-203) {
		tmp = t_1;
	} else if (y <= -4.1e-296) {
		tmp = x * -t;
	} else if (y <= 4e-80) {
		tmp = t_1;
	} else {
		tmp = (x * y) / z;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (t / z)
	tmp = 0
	if y <= -3.2e-69:
		tmp = y * (x / z)
	elif y <= -1.8e-203:
		tmp = t_1
	elif y <= -4.1e-296:
		tmp = x * -t
	elif y <= 4e-80:
		tmp = t_1
	else:
		tmp = (x * y) / z
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(t / z))
	tmp = 0.0
	if (y <= -3.2e-69)
		tmp = Float64(y * Float64(x / z));
	elseif (y <= -1.8e-203)
		tmp = t_1;
	elseif (y <= -4.1e-296)
		tmp = Float64(x * Float64(-t));
	elseif (y <= 4e-80)
		tmp = t_1;
	else
		tmp = Float64(Float64(x * y) / z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (t / z);
	tmp = 0.0;
	if (y <= -3.2e-69)
		tmp = y * (x / z);
	elseif (y <= -1.8e-203)
		tmp = t_1;
	elseif (y <= -4.1e-296)
		tmp = x * -t;
	elseif (y <= 4e-80)
		tmp = t_1;
	else
		tmp = (x * y) / z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.2e-69], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.8e-203], t$95$1, If[LessEqual[y, -4.1e-296], N[(x * (-t)), $MachinePrecision], If[LessEqual[y, 4e-80], t$95$1, N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.8 \cdot 10^{-203}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 4 \cdot 10^{-80}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 92.4%

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{z}{y}}} \]
    6. Step-by-step derivation
      1. associate-/r/77.4%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot y} \]
    7. Applied egg-rr77.4%

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

    if -3.19999999999999999e-69 < y < -1.7999999999999999e-203 or -4.09999999999999994e-296 < y < 3.99999999999999985e-80

    1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7999999999999999e-203 < y < -4.09999999999999994e-296

    1. Initial program 83.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot t} \]
      3. distribute-lft-neg-in61.4%

        \[\leadsto \color{blue}{\left(-x\right) \cdot t} \]
    7. Simplified61.4%

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

    if 3.99999999999999985e-80 < y

    1. Initial program 94.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{-69}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-203}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{-296}:\\ \;\;\;\;x \cdot \left(-t\right)\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-80}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \end{array} \]

Alternative 5: 73.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+20}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

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

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

\mathbf{elif}\;z \leq 7 \cdot 10^{+216}:\\
\;\;\;\;\frac{x \cdot y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.1e20

    1. Initial program 98.3%

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

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

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

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

    if -1.1e20 < z < 2.7e5

    1. Initial program 91.3%

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

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

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

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

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

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

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

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

    if 2.7e5 < z < 2.89999999999999986e66

    1. Initial program 96.1%

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{z}{y + t}}} \]
    6. Taylor expanded in y around 0 73.8%

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

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

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

    if 2.89999999999999986e66 < z < 6.99999999999999984e216

    1. Initial program 90.9%

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

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

    if 6.99999999999999984e216 < z

    1. Initial program 98.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{+20}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 270000:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+66}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+216}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]

Alternative 6: 74.5% accurate, 0.8× speedup?

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

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

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

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

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

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


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

    1. Initial program 92.4%

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{z}{y}}} \]
    6. Step-by-step derivation
      1. associate-/r/77.4%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot y} \]
    7. Applied egg-rr77.4%

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

    if -2.4000000000000001e-69 < y < 1.3599999999999999e-80

    1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3599999999999999e-80 < y < 4.79999999999999974e-12

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    if 4.79999999999999974e-12 < y < 5.8000000000000003e-12

    1. Initial program 100.0%

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{z}{y + t}}} \]
    6. Taylor expanded in y around 0 100.0%

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

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

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

    if 5.8000000000000003e-12 < y

    1. Initial program 93.4%

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

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

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

Alternative 7: 89.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.9 \lor \neg \left(z \leq 6.8 \cdot 10^{-7}\right):\\ \;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -0.9) (not (<= z 6.8e-7)))
   (* (/ x z) (+ y t))
   (* x (- (/ y z) t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -0.9) || !(z <= 6.8e-7)) {
		tmp = (x / z) * (y + t);
	} else {
		tmp = x * ((y / z) - t);
	}
	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 <= (-0.9d0)) .or. (.not. (z <= 6.8d-7))) then
        tmp = (x / z) * (y + t)
    else
        tmp = x * ((y / z) - t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -0.9) || !(z <= 6.8e-7)) {
		tmp = (x / z) * (y + t);
	} else {
		tmp = x * ((y / z) - t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -0.9) or not (z <= 6.8e-7):
		tmp = (x / z) * (y + t)
	else:
		tmp = x * ((y / z) - t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -0.9) || !(z <= 6.8e-7))
		tmp = Float64(Float64(x / z) * Float64(y + t));
	else
		tmp = Float64(x * Float64(Float64(y / z) - t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -0.9) || ~((z <= 6.8e-7)))
		tmp = (x / z) * (y + t);
	else
		tmp = x * ((y / z) - t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -0.9], N[Not[LessEqual[z, 6.8e-7]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] * N[(y + t), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.9 \lor \neg \left(z \leq 6.8 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.900000000000000022 or 6.79999999999999948e-7 < z

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

    if -0.900000000000000022 < z < 6.79999999999999948e-7

    1. Initial program 91.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.9 \lor \neg \left(z \leq 6.8 \cdot 10^{-7}\right):\\ \;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \end{array} \]

Alternative 8: 93.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 6.8 \cdot 10^{-7}\right):\\
\;\;\;\;x \cdot \frac{y + t}{z}\\

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


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

    1. Initial program 96.4%

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

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

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

        \[\leadsto \color{blue}{\frac{y - -1 \cdot t}{z} \cdot x} \]
      3. cancel-sign-sub-inv95.8%

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

        \[\leadsto \frac{y + \color{blue}{1} \cdot t}{z} \cdot x \]
      5. *-lft-identity95.8%

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

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

    if -1 < z < 6.79999999999999948e-7

    1. Initial program 91.1%

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

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

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

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

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

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

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

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

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

Alternative 9: 67.7% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{+108} \lor \neg \left(t \leq 1.88 \cdot 10^{+146}\right):\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= t -7.2e+108) (not (<= t 1.88e+146))) (* x (/ t z)) (* y (/ x z))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -7.2e+108) || !(t <= 1.88e+146)) {
		tmp = x * (t / z);
	} 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 ((t <= (-7.2d+108)) .or. (.not. (t <= 1.88d+146))) then
        tmp = x * (t / z)
    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 ((t <= -7.2e+108) || !(t <= 1.88e+146)) {
		tmp = x * (t / z);
	} else {
		tmp = y * (x / z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (t <= -7.2e+108) or not (t <= 1.88e+146):
		tmp = x * (t / z)
	else:
		tmp = y * (x / z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((t <= -7.2e+108) || !(t <= 1.88e+146))
		tmp = Float64(x * Float64(t / z));
	else
		tmp = Float64(y * Float64(x / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((t <= -7.2e+108) || ~((t <= 1.88e+146)))
		tmp = x * (t / z);
	else
		tmp = y * (x / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -7.2e+108], N[Not[LessEqual[t, 1.88e+146]], $MachinePrecision]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{+108} \lor \neg \left(t \leq 1.88 \cdot 10^{+146}\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.2e108 or 1.8800000000000001e146 < t

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.2e108 < t < 1.8800000000000001e146

    1. Initial program 92.5%

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{z}{y}}} \]
    6. Step-by-step derivation
      1. associate-/r/72.1%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot y} \]
    7. Applied egg-rr72.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{+108} \lor \neg \left(t \leq 1.88 \cdot 10^{+146}\right):\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array} \]

Alternative 10: 33.7% accurate, 2.2× speedup?

\[\begin{array}{l} \\ t \cdot \frac{x}{z} \end{array} \]
(FPCore (x y z t) :precision binary64 (* t (/ x z)))
double code(double x, double y, double z, double t) {
	return t * (x / 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 = t * (x / z)
end function
public static double code(double x, double y, double z, double t) {
	return t * (x / z);
}
def code(x, y, z, t):
	return t * (x / z)
function code(x, y, z, t)
	return Float64(t * Float64(x / z))
end
function tmp = code(x, y, z, t)
	tmp = t * (x / z);
end
code[x_, y_, z_, t_] := N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
t \cdot \frac{x}{z}
\end{array}
Derivation
  1. Initial program 93.9%

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

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

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

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

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

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

    \[\leadsto \frac{x}{\color{blue}{\frac{z}{y + t}}} \]
  6. Taylor expanded in y around 0 34.3%

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

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

    \[\leadsto \color{blue}{t \cdot \frac{x}{z}} \]
  9. Final simplification38.4%

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

Alternative 11: 22.9% accurate, 2.8× speedup?

\[\begin{array}{l} \\ x \cdot \left(-t\right) \end{array} \]
(FPCore (x y z t) :precision binary64 (* x (- t)))
double code(double x, double y, double z, double t) {
	return x * -t;
}
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 * -t
end function
public static double code(double x, double y, double z, double t) {
	return x * -t;
}
def code(x, y, z, t):
	return x * -t
function code(x, y, z, t)
	return Float64(x * Float64(-t))
end
function tmp = code(x, y, z, t)
	tmp = x * -t;
end
code[x_, y_, z_, t_] := N[(x * (-t)), $MachinePrecision]
\begin{array}{l}

\\
x \cdot \left(-t\right)
\end{array}
Derivation
  1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-x \cdot t} \]
    3. distribute-lft-neg-in19.7%

      \[\leadsto \color{blue}{\left(-x\right) \cdot t} \]
  7. Simplified19.7%

    \[\leadsto \color{blue}{\left(-x\right) \cdot t} \]
  8. Final simplification19.7%

    \[\leadsto x \cdot \left(-t\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 2023279 
(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)))))