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

Percentage Accurate: 94.7% → 98.4%
Time: 8.0s
Alternatives: 10
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 10 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.7% 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: 98.4% 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^{+302}:\\ \;\;\;\;t_1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \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+302) (* t_1 x) (/ y (/ z x))))))
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+302) {
		tmp = t_1 * x;
	} else {
		tmp = y / (z / x);
	}
	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+302) {
		tmp = t_1 * x;
	} else {
		tmp = y / (z / x);
	}
	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+302:
		tmp = t_1 * x
	else:
		tmp = y / (z / x)
	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+302)
		tmp = Float64(t_1 * x);
	else
		tmp = Float64(y / Float64(z / x));
	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+302)
		tmp = t_1 * x;
	else
		tmp = y / (z / x);
	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+302], N[(t$95$1 * x), $MachinePrecision], N[(y / N[(z / x), $MachinePrecision]), $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^{+302}:\\
\;\;\;\;t_1 \cdot x\\

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


\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 76.6%

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(-y, \frac{1}{-z}, \color{blue}{\frac{-t}{1 - z}}\right) \]
    3. Applied egg-rr76.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-udef76.6%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(t \cdot \frac{\color{blue}{\frac{1}{-1}}}{1 - z} - y \cdot \frac{1}{-z}\right) \]
      9. associate-/r*76.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-176.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 5e302

    1. Initial program 98.9%

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

    if 5e302 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z)))

    1. Initial program 70.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\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^{+302}:\\ \;\;\;\;\left(\frac{y}{z} - \frac{t}{1 - z}\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \end{array} \]

Alternative 2: 41.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq -1.5 \cdot 10^{-289}\right) \land \left(z \leq 6.8 \cdot 10^{-222} \lor \neg \left(z \leq 2.8 \cdot 10^{-7}\right)\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 < -1 or -1.4999999999999999e-289 < z < 6.8000000000000003e-222 or 2.80000000000000019e-7 < z

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1 < z < -1.4999999999999999e-289 or 6.8000000000000003e-222 < z < 2.80000000000000019e-7

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 44.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{t}{z}\\ t_2 := t \cdot \left(-x\right)\\ \mathbf{if}\;z \leq -1:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -9.8 \cdot 10^{-290}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{-219}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-7}:\\ \;\;\;\;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 (* t (- x))))
   (if (<= z -1.0)
     t_1
     (if (<= z -9.8e-290)
       t_2
       (if (<= z 5.4e-219) (* t (/ x z)) (if (<= z 2.8e-7) t_2 t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (t / z);
	double t_2 = t * -x;
	double tmp;
	if (z <= -1.0) {
		tmp = t_1;
	} else if (z <= -9.8e-290) {
		tmp = t_2;
	} else if (z <= 5.4e-219) {
		tmp = t * (x / z);
	} else if (z <= 2.8e-7) {
		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 = t * -x
    if (z <= (-1.0d0)) then
        tmp = t_1
    else if (z <= (-9.8d-290)) then
        tmp = t_2
    else if (z <= 5.4d-219) then
        tmp = t * (x / z)
    else if (z <= 2.8d-7) 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 = t * -x;
	double tmp;
	if (z <= -1.0) {
		tmp = t_1;
	} else if (z <= -9.8e-290) {
		tmp = t_2;
	} else if (z <= 5.4e-219) {
		tmp = t * (x / z);
	} else if (z <= 2.8e-7) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (t / z)
	t_2 = t * -x
	tmp = 0
	if z <= -1.0:
		tmp = t_1
	elif z <= -9.8e-290:
		tmp = t_2
	elif z <= 5.4e-219:
		tmp = t * (x / z)
	elif z <= 2.8e-7:
		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(t * Float64(-x))
	tmp = 0.0
	if (z <= -1.0)
		tmp = t_1;
	elseif (z <= -9.8e-290)
		tmp = t_2;
	elseif (z <= 5.4e-219)
		tmp = Float64(t * Float64(x / z));
	elseif (z <= 2.8e-7)
		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 = t * -x;
	tmp = 0.0;
	if (z <= -1.0)
		tmp = t_1;
	elseif (z <= -9.8e-290)
		tmp = t_2;
	elseif (z <= 5.4e-219)
		tmp = t * (x / z);
	elseif (z <= 2.8e-7)
		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[(t * (-x)), $MachinePrecision]}, If[LessEqual[z, -1.0], t$95$1, If[LessEqual[z, -9.8e-290], t$95$2, If[LessEqual[z, 5.4e-219], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e-7], t$95$2, t$95$1]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;z \leq 2.8 \cdot 10^{-7}:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 98.2%

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{z}{t}}} \]
    6. Step-by-step derivation
      1. div-inv59.2%

        \[\leadsto \color{blue}{x \cdot \frac{1}{\frac{z}{t}}} \]
      2. clear-num59.3%

        \[\leadsto x \cdot \color{blue}{\frac{t}{z}} \]
    7. Applied egg-rr59.3%

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

    if -1 < z < -9.8000000000000002e-290 or 5.3999999999999999e-219 < z < 2.80000000000000019e-7

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.8000000000000002e-290 < z < 5.3999999999999999e-219

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -9.8 \cdot 10^{-290}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{-219}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-7}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]

Alternative 4: 74.8% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq -5.5 \cdot 10^{+87} \lor \neg \left(z \leq 1.05 \cdot 10^{+76}\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\

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


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

    1. Initial program 92.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/73.2%

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

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

    if -9.999999999999999e258 < z < -5.50000000000000022e87 or 1.05000000000000003e76 < z

    1. Initial program 98.4%

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{z}{t}}} \]
    6. Step-by-step derivation
      1. div-inv71.8%

        \[\leadsto \color{blue}{x \cdot \frac{1}{\frac{z}{t}}} \]
      2. clear-num71.9%

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

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

    if -5.50000000000000022e87 < z < 1.05000000000000003e76

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

Alternative 5: 67.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
\mathbf{if}\;t \leq -3.8 \cdot 10^{+173}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.12 \cdot 10^{+33}:\\
\;\;\;\;\frac{y}{z} \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.80000000000000011e173 or 1.12e33 < t

    1. Initial program 97.7%

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{z}{t}}} \]
    6. Step-by-step derivation
      1. div-inv61.6%

        \[\leadsto \color{blue}{x \cdot \frac{1}{\frac{z}{t}}} \]
      2. clear-num61.7%

        \[\leadsto x \cdot \color{blue}{\frac{t}{z}} \]
    7. Applied egg-rr61.7%

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

    if -3.80000000000000011e173 < t < -4.79999999999999991e-213

    1. Initial program 89.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(t \cdot \frac{\color{blue}{\frac{1}{-1}}}{1 - z} - y \cdot \frac{1}{-z}\right) \]
      9. associate-/r*89.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-189.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.79999999999999991e-213 < t < 1.12e33

    1. Initial program 97.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.8 \cdot 10^{+173}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{-213}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{+33}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]

Alternative 6: 67.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{+170}:\\
\;\;\;\;x \cdot \frac{t}{z}\\

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

\mathbf{elif}\;t \leq 4.5 \cdot 10^{+32}:\\
\;\;\;\;\frac{y}{z} \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6.8000000000000003e170

    1. Initial program 96.5%

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{z}{t}}} \]
    6. Step-by-step derivation
      1. div-inv70.2%

        \[\leadsto \color{blue}{x \cdot \frac{1}{\frac{z}{t}}} \]
      2. clear-num70.4%

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

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

    if -6.8000000000000003e170 < t < -8.09999999999999996e-212

    1. Initial program 89.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(t \cdot \frac{\color{blue}{\frac{1}{-1}}}{1 - z} - y \cdot \frac{1}{-z}\right) \]
      9. associate-/r*89.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-189.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.09999999999999996e-212 < t < 4.5000000000000003e32

    1. Initial program 97.7%

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

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

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

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

    if 4.5000000000000003e32 < t

    1. Initial program 98.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.8 \cdot 10^{+170}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq -8.1 \cdot 10^{-212}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{+32}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \end{array} \]

Alternative 7: 89.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.85 \lor \neg \left(z \leq 1.06 \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.85) (not (<= z 1.06e-7)))
   (* (/ x z) (+ y t))
   (* x (- (/ y z) t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -0.85) || !(z <= 1.06e-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.85d0)) .or. (.not. (z <= 1.06d-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.85) || !(z <= 1.06e-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.85) or not (z <= 1.06e-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.85) || !(z <= 1.06e-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.85) || ~((z <= 1.06e-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.85], N[Not[LessEqual[z, 1.06e-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.85 \lor \neg \left(z \leq 1.06 \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.849999999999999978 or 1.06e-7 < z

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

    if -0.849999999999999978 < z < 1.06e-7

    1. Initial program 92.2%

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

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

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

        \[\leadsto \frac{y}{z} \cdot x + \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
      3. neg-mul-187.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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification89.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.85 \lor \neg \left(z \leq 1.06 \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.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 1.06 \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 1.06e-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 <= 1.06e-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 <= 1.06d-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 <= 1.06e-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 <= 1.06e-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 <= 1.06e-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 <= 1.06e-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, 1.06e-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 1.06 \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 1.06e-7 < z

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

    if -1 < z < 1.06e-7

    1. Initial program 92.2%

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

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

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

        \[\leadsto \frac{y}{z} \cdot x + \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
      3. neg-mul-187.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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 1.06 \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.1% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{+170} \lor \neg \left(t \leq 7.4 \cdot 10^{+32}\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 -4.2e+170) (not (<= t 7.4e+32))) (* x (/ t z)) (* y (/ x z))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -4.2e+170) || !(t <= 7.4e+32)) {
		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 <= (-4.2d+170)) .or. (.not. (t <= 7.4d+32))) 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 <= -4.2e+170) || !(t <= 7.4e+32)) {
		tmp = x * (t / z);
	} else {
		tmp = y * (x / z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (t <= -4.2e+170) or not (t <= 7.4e+32):
		tmp = x * (t / z)
	else:
		tmp = y * (x / z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((t <= -4.2e+170) || !(t <= 7.4e+32))
		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 <= -4.2e+170) || ~((t <= 7.4e+32)))
		tmp = x * (t / z);
	else
		tmp = y * (x / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -4.2e+170], N[Not[LessEqual[t, 7.4e+32]], $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 -4.2 \cdot 10^{+170} \lor \neg \left(t \leq 7.4 \cdot 10^{+32}\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 < -4.19999999999999996e170 or 7.4e32 < t

    1. Initial program 97.7%

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

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{\frac{z}{t}}} \]
    6. Step-by-step derivation
      1. div-inv61.6%

        \[\leadsto \color{blue}{x \cdot \frac{1}{\frac{z}{t}}} \]
      2. clear-num61.7%

        \[\leadsto x \cdot \color{blue}{\frac{t}{z}} \]
    7. Applied egg-rr61.7%

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

    if -4.19999999999999996e170 < t < 7.4e32

    1. Initial program 93.7%

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(-y, \frac{1}{-z}, \color{blue}{\frac{-t}{1 - z}}\right) \]
    3. Applied egg-rr93.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-udef93.6%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(t \cdot \frac{\color{blue}{\frac{1}{-1}}}{1 - z} - y \cdot \frac{1}{-z}\right) \]
      9. associate-/r*93.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-193.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 23.0% 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 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto t \cdot \left(-x\right) \]

Developer target: 95.2% 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 2023257 
(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)))))