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

Percentage Accurate: 94.4% → 99.7%
Time: 10.9s
Alternatives: 12
Speedup: 0.6×

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 12 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: 99.7% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-300}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-239}:\\
\;\;\;\;\frac{y + t}{\frac{z}{x}}\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+283}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 52.7%

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

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

    if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < -1.00000000000000003e-300 or 2.0000000000000002e-239 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < 1.99999999999999991e283

    1. Initial program 99.8%

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

    if -1.00000000000000003e-300 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < 2.0000000000000002e-239

    1. Initial program 77.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t + y}{\frac{z}{x}}} \]
      3. +-commutative99.9%

        \[\leadsto \frac{\color{blue}{y + t}}{\frac{z}{x}} \]
    7. Applied egg-rr99.9%

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

    if 1.99999999999999991e283 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z)))

    1. Initial program 62.6%

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
    5. Simplified62.6%

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

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

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

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

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

Alternative 2: 41.1% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -240000 \lor \neg \left(z \leq -2.1 \cdot 10^{-297}\right) \land \left(z \leq 1.35 \cdot 10^{-199} \lor \neg \left(z \leq 75\right)\right):\\
\;\;\;\;t \cdot \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.4e5 or -2.10000000000000013e-297 < z < 1.34999999999999995e-199 or 75 < z

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

    if -2.4e5 < z < -2.10000000000000013e-297 or 1.34999999999999995e-199 < z < 75

    1. Initial program 89.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -240000 \lor \neg \left(z \leq -2.1 \cdot 10^{-297}\right) \land \left(z \leq 1.35 \cdot 10^{-199} \lor \neg \left(z \leq 75\right)\right):\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 43.9% accurate, 0.4× 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 -240000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-297}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-200}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 75:\\ \;\;\;\;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 -240000.0)
     t_1
     (if (<= z -5e-297)
       t_2
       (if (<= z 4.4e-200) (* t (/ x z)) (if (<= z 75.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 <= -240000.0) {
		tmp = t_1;
	} else if (z <= -5e-297) {
		tmp = t_2;
	} else if (z <= 4.4e-200) {
		tmp = t * (x / z);
	} else if (z <= 75.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 <= (-240000.0d0)) then
        tmp = t_1
    else if (z <= (-5d-297)) then
        tmp = t_2
    else if (z <= 4.4d-200) then
        tmp = t * (x / z)
    else if (z <= 75.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 <= -240000.0) {
		tmp = t_1;
	} else if (z <= -5e-297) {
		tmp = t_2;
	} else if (z <= 4.4e-200) {
		tmp = t * (x / z);
	} else if (z <= 75.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 <= -240000.0:
		tmp = t_1
	elif z <= -5e-297:
		tmp = t_2
	elif z <= 4.4e-200:
		tmp = t * (x / z)
	elif z <= 75.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 <= -240000.0)
		tmp = t_1;
	elseif (z <= -5e-297)
		tmp = t_2;
	elseif (z <= 4.4e-200)
		tmp = Float64(t * Float64(x / z));
	elseif (z <= 75.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 <= -240000.0)
		tmp = t_1;
	elseif (z <= -5e-297)
		tmp = t_2;
	elseif (z <= 4.4e-200)
		tmp = t * (x / z);
	elseif (z <= 75.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, -240000.0], t$95$1, If[LessEqual[z, -5e-297], t$95$2, If[LessEqual[z, 4.4e-200], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 75.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 -240000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -5 \cdot 10^{-297}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 75:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


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

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

    if -2.4e5 < z < -5e-297 or 4.40000000000000027e-200 < z < 75

    1. Initial program 89.9%

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

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

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

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

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

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

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

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

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

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

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

    if -5e-297 < z < 4.40000000000000027e-200

    1. Initial program 82.4%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -240000:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-297}:\\ \;\;\;\;x \cdot \left(-t\right)\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-200}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 75:\\ \;\;\;\;x \cdot \left(-t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 94.9% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 95.5%

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

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

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

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

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

    if -2.4e5 < z < 1

    1. Initial program 88.5%

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
    5. Simplified87.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -240000 \lor \neg \left(z \leq 1\right):\\ \;\;\;\;x \cdot \left(\frac{y}{z} + \frac{t}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \left(y - z \cdot t\right)}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 89.5% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(t + y\right) \cdot \frac{x}{z}} \]
    6. Step-by-step derivation
      1. clear-num85.0%

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

        \[\leadsto \color{blue}{\frac{t + y}{\frac{z}{x}}} \]
      3. +-commutative85.1%

        \[\leadsto \frac{\color{blue}{y + t}}{\frac{z}{x}} \]
    7. Applied egg-rr85.1%

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

    if -2.4e5 < z < 1

    1. Initial program 88.5%

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
    5. Simplified87.9%

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

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

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

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

    if 1 < z

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -240000:\\ \;\;\;\;\frac{y + t}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;\frac{x \cdot \left(y - z \cdot t\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;\left(y + t\right) \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 92.4% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 3.19999999999999985e69

    1. Initial program 89.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{z}} + x \cdot \frac{t}{-1 + z} \]
      4. associate-*r/90.8%

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

        \[\leadsto \frac{x \cdot y}{z} + \frac{x \cdot t}{\color{blue}{z + -1}} \]
    8. Applied egg-rr90.8%

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

    if 3.19999999999999985e69 < x

    1. Initial program 98.1%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification92.2%

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

Alternative 7: 88.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -240000 \lor \neg \left(z \leq 5.7 \cdot 10^{+15}\right):\\
\;\;\;\;\left(y + t\right) \cdot \frac{x}{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 < -2.4e5 or 5.7e15 < z

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

    if -2.4e5 < z < 5.7e15

    1. Initial program 88.8%

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
      3. div-sub88.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -240000 \lor \neg \left(z \leq 5.7 \cdot 10^{+15}\right):\\ \;\;\;\;\left(y + t\right) \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 73.9% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 94.6%

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

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

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

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

    if -1.24999999999999994e60 < z < 2.75000000000000001e35

    1. Initial program 89.9%

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

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

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

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

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

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

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

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

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

    if 2.75000000000000001e35 < z

    1. Initial program 94.3%

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

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

        \[\leadsto x \cdot \color{blue}{\left(-\frac{t}{1 - z}\right)} \]
      2. distribute-neg-frac270.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 2.75 \cdot 10^{+35}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 87.9% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(t + y\right) \cdot \frac{x}{z}} \]
    6. Step-by-step derivation
      1. clear-num85.0%

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

        \[\leadsto \color{blue}{\frac{t + y}{\frac{z}{x}}} \]
      3. +-commutative85.1%

        \[\leadsto \frac{\color{blue}{y + t}}{\frac{z}{x}} \]
    7. Applied egg-rr85.1%

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

    if -2.4e5 < z < 5.7e15

    1. Initial program 88.8%

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
      3. div-sub88.3%

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

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

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

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

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

    if 5.7e15 < z

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -240000:\\ \;\;\;\;\frac{y + t}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq 5.7 \cdot 10^{+15}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y + t\right) \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 66.3% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.20000000000000013e123

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

    if -6.20000000000000013e123 < t < 1.15e114

    1. Initial program 91.2%

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

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

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

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

    if 1.15e114 < t

    1. Initial program 93.9%

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

      \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \frac{t}{1 - z}\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg72.2%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.2 \cdot 10^{+123}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+114}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 66.4% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.99999999999999925e125

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

    if -9.99999999999999925e125 < t < 9.5000000000000008e112

    1. Initial program 91.2%

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    6. Step-by-step derivation
      1. clear-num77.2%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{y}}} \]
      2. un-div-inv77.7%

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

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

    if 9.5000000000000008e112 < t

    1. Initial program 93.9%

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

      \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \frac{t}{1 - z}\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg72.2%

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

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

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

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

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

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

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

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

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

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

Alternative 12: 22.6% 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 91.5%

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

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

      \[\leadsto x \cdot \color{blue}{\left(-\frac{t}{1 - z}\right)} \]
    2. distribute-neg-frac241.5%

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

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\left(-t\right)} \]
  8. Simplified23.0%

    \[\leadsto x \cdot \color{blue}{\left(-t\right)} \]
  9. Final simplification23.0%

    \[\leadsto x \cdot \left(-t\right) \]
  10. Add Preprocessing

Developer target: 94.8% accurate, 0.2× 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 2024059 
(FPCore (x y z t)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
  :precision binary64

  :alt
  (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)))))