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

Percentage Accurate: 94.5% → 97.6%
Time: 13.5s
Alternatives: 9
Speedup: 0.3×

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 9 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.5% accurate, 1.0× speedup?

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

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

Alternative 1: 97.6% accurate, 0.2× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_1 := \frac{t}{z + -1}\\ t_2 := x\_m \cdot \left(\frac{y}{z} + t\_1\right)\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq -\infty \lor \neg \left(t\_2 \leq 10^{+290}\right):\\ \;\;\;\;\frac{x\_m \cdot \left(y \cdot \left(1 - z\right) - z \cdot t\right)}{z \cdot \left(1 - z\right)}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \frac{y}{z} + x\_m \cdot t\_1\\ \end{array} \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (/ t (+ z -1.0))) (t_2 (* x_m (+ (/ y z) t_1))))
   (*
    x_s
    (if (or (<= t_2 (- INFINITY)) (not (<= t_2 1e+290)))
      (/ (* x_m (- (* y (- 1.0 z)) (* z t))) (* z (- 1.0 z)))
      (+ (* x_m (/ y z)) (* x_m t_1))))))
x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = t / (z + -1.0);
	double t_2 = x_m * ((y / z) + t_1);
	double tmp;
	if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 1e+290)) {
		tmp = (x_m * ((y * (1.0 - z)) - (z * t))) / (z * (1.0 - z));
	} else {
		tmp = (x_m * (y / z)) + (x_m * t_1);
	}
	return x_s * tmp;
}
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = t / (z + -1.0);
	double t_2 = x_m * ((y / z) + t_1);
	double tmp;
	if ((t_2 <= -Double.POSITIVE_INFINITY) || !(t_2 <= 1e+290)) {
		tmp = (x_m * ((y * (1.0 - z)) - (z * t))) / (z * (1.0 - z));
	} else {
		tmp = (x_m * (y / z)) + (x_m * t_1);
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	t_1 = t / (z + -1.0)
	t_2 = x_m * ((y / z) + t_1)
	tmp = 0
	if (t_2 <= -math.inf) or not (t_2 <= 1e+290):
		tmp = (x_m * ((y * (1.0 - z)) - (z * t))) / (z * (1.0 - z))
	else:
		tmp = (x_m * (y / z)) + (x_m * t_1)
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	t_1 = Float64(t / Float64(z + -1.0))
	t_2 = Float64(x_m * Float64(Float64(y / z) + t_1))
	tmp = 0.0
	if ((t_2 <= Float64(-Inf)) || !(t_2 <= 1e+290))
		tmp = Float64(Float64(x_m * Float64(Float64(y * Float64(1.0 - z)) - Float64(z * t))) / Float64(z * Float64(1.0 - z)));
	else
		tmp = Float64(Float64(x_m * Float64(y / z)) + Float64(x_m * t_1));
	end
	return Float64(x_s * tmp)
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	t_1 = t / (z + -1.0);
	t_2 = x_m * ((y / z) + t_1);
	tmp = 0.0;
	if ((t_2 <= -Inf) || ~((t_2 <= 1e+290)))
		tmp = (x_m * ((y * (1.0 - z)) - (z * t))) / (z * (1.0 - z));
	else
		tmp = (x_m * (y / z)) + (x_m * t_1);
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x$95$m * N[(N[(y / z), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 1e+290]], $MachinePrecision]], N[(N[(x$95$m * N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(x$95$m * t$95$1), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)

\\
\begin{array}{l}
t_1 := \frac{t}{z + -1}\\
t_2 := x\_m \cdot \left(\frac{y}{z} + t\_1\right)\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \leq -\infty \lor \neg \left(t\_2 \leq 10^{+290}\right):\\
\;\;\;\;\frac{x\_m \cdot \left(y \cdot \left(1 - z\right) - z \cdot t\right)}{z \cdot \left(1 - z\right)}\\

\mathbf{else}:\\
\;\;\;\;x\_m \cdot \frac{y}{z} + x\_m \cdot t\_1\\


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

    1. Initial program 83.8%

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

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

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

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

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

    if -inf.0 < (*.f64 x (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z)))) < 1.00000000000000006e290

    1. Initial program 98.3%

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

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

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

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

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

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

Alternative 2: 98.4% accurate, 0.3× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_1 := \frac{y}{z} + \frac{t}{z + -1}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+306}\right):\\ \;\;\;\;y \cdot \frac{x\_m}{z}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot t\_1\\ \end{array} \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (+ (/ y z) (/ t (+ z -1.0)))))
   (*
    x_s
    (if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+306)))
      (* y (/ x_m z))
      (* x_m t_1)))))
x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = (y / z) + (t / (z + -1.0));
	double tmp;
	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+306)) {
		tmp = y * (x_m / z);
	} else {
		tmp = x_m * t_1;
	}
	return x_s * tmp;
}
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = (y / z) + (t / (z + -1.0));
	double tmp;
	if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 2e+306)) {
		tmp = y * (x_m / z);
	} else {
		tmp = x_m * t_1;
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	t_1 = (y / z) + (t / (z + -1.0))
	tmp = 0
	if (t_1 <= -math.inf) or not (t_1 <= 2e+306):
		tmp = y * (x_m / z)
	else:
		tmp = x_m * t_1
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	t_1 = Float64(Float64(y / z) + Float64(t / Float64(z + -1.0)))
	tmp = 0.0
	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+306))
		tmp = Float64(y * Float64(x_m / z));
	else
		tmp = Float64(x_m * t_1);
	end
	return Float64(x_s * tmp)
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	t_1 = (y / z) + (t / (z + -1.0));
	tmp = 0.0;
	if ((t_1 <= -Inf) || ~((t_1 <= 2e+306)))
		tmp = y * (x_m / z);
	else
		tmp = x_m * t_1;
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] + N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+306]], $MachinePrecision]], N[(y * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision], N[(x$95$m * t$95$1), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)

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

\mathbf{else}:\\
\;\;\;\;x\_m \cdot t\_1\\


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

    1. Initial program 66.2%

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 2.00000000000000003e306

    1. Initial program 98.6%

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

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

Alternative 3: 71.4% accurate, 0.4× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_1 := \frac{x\_m \cdot y}{z}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -1.92 \cdot 10^{+74}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -9.2 \cdot 10^{-5}:\\ \;\;\;\;\frac{t}{\frac{z}{x\_m}}\\ \mathbf{elif}\;y \leq -5.5 \cdot 10^{-64} \lor \neg \left(y \leq 5.9 \cdot 10^{-64}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{x\_m}{z + -1}\\ \end{array} \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (/ (* x_m y) z)))
   (*
    x_s
    (if (<= y -1.92e+74)
      t_1
      (if (<= y -9.2e-5)
        (/ t (/ z x_m))
        (if (or (<= y -5.5e-64) (not (<= y 5.9e-64)))
          t_1
          (* t (/ x_m (+ z -1.0)))))))))
x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = (x_m * y) / z;
	double tmp;
	if (y <= -1.92e+74) {
		tmp = t_1;
	} else if (y <= -9.2e-5) {
		tmp = t / (z / x_m);
	} else if ((y <= -5.5e-64) || !(y <= 5.9e-64)) {
		tmp = t_1;
	} else {
		tmp = t * (x_m / (z + -1.0));
	}
	return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    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_m * y) / z
    if (y <= (-1.92d+74)) then
        tmp = t_1
    else if (y <= (-9.2d-5)) then
        tmp = t / (z / x_m)
    else if ((y <= (-5.5d-64)) .or. (.not. (y <= 5.9d-64))) then
        tmp = t_1
    else
        tmp = t * (x_m / (z + (-1.0d0)))
    end if
    code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = (x_m * y) / z;
	double tmp;
	if (y <= -1.92e+74) {
		tmp = t_1;
	} else if (y <= -9.2e-5) {
		tmp = t / (z / x_m);
	} else if ((y <= -5.5e-64) || !(y <= 5.9e-64)) {
		tmp = t_1;
	} else {
		tmp = t * (x_m / (z + -1.0));
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	t_1 = (x_m * y) / z
	tmp = 0
	if y <= -1.92e+74:
		tmp = t_1
	elif y <= -9.2e-5:
		tmp = t / (z / x_m)
	elif (y <= -5.5e-64) or not (y <= 5.9e-64):
		tmp = t_1
	else:
		tmp = t * (x_m / (z + -1.0))
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	t_1 = Float64(Float64(x_m * y) / z)
	tmp = 0.0
	if (y <= -1.92e+74)
		tmp = t_1;
	elseif (y <= -9.2e-5)
		tmp = Float64(t / Float64(z / x_m));
	elseif ((y <= -5.5e-64) || !(y <= 5.9e-64))
		tmp = t_1;
	else
		tmp = Float64(t * Float64(x_m / Float64(z + -1.0)));
	end
	return Float64(x_s * tmp)
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	t_1 = (x_m * y) / z;
	tmp = 0.0;
	if (y <= -1.92e+74)
		tmp = t_1;
	elseif (y <= -9.2e-5)
		tmp = t / (z / x_m);
	elseif ((y <= -5.5e-64) || ~((y <= 5.9e-64)))
		tmp = t_1;
	else
		tmp = t * (x_m / (z + -1.0));
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x$95$m * y), $MachinePrecision] / z), $MachinePrecision]}, N[(x$95$s * If[LessEqual[y, -1.92e+74], t$95$1, If[LessEqual[y, -9.2e-5], N[(t / N[(z / x$95$m), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -5.5e-64], N[Not[LessEqual[y, 5.9e-64]], $MachinePrecision]], t$95$1, N[(t * N[(x$95$m / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)

\\
\begin{array}{l}
t_1 := \frac{x\_m \cdot y}{z}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.92 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -9.2 \cdot 10^{-5}:\\
\;\;\;\;\frac{t}{\frac{z}{x\_m}}\\

\mathbf{elif}\;y \leq -5.5 \cdot 10^{-64} \lor \neg \left(y \leq 5.9 \cdot 10^{-64}\right):\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x\_m}{z + -1}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.92000000000000002e74 or -9.20000000000000001e-5 < y < -5.4999999999999999e-64 or 5.89999999999999995e-64 < y

    1. Initial program 91.9%

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

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

    if -1.92000000000000002e74 < y < -9.20000000000000001e-5

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \frac{x}{z}} \]
    9. Step-by-step derivation
      1. clear-num85.8%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{z}{x}}} \]
      2. un-div-inv86.0%

        \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    10. Applied egg-rr86.0%

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

    if -5.4999999999999999e-64 < y < 5.89999999999999995e-64

    1. Initial program 97.9%

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

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

        \[\leadsto \color{blue}{-\frac{t \cdot x}{1 - z}} \]
      2. distribute-frac-neg271.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.92 \cdot 10^{+74}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;y \leq -9.2 \cdot 10^{-5}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq -5.5 \cdot 10^{-64} \lor \neg \left(y \leq 5.9 \cdot 10^{-64}\right):\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{x}{z + -1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 72.0% accurate, 0.4× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_1 := \frac{x\_m \cdot y}{z}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -1.92 \cdot 10^{+74}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -9.2 \cdot 10^{-5}:\\ \;\;\;\;\frac{t}{\frac{z}{x\_m}}\\ \mathbf{elif}\;y \leq -5 \cdot 10^{-61} \lor \neg \left(y \leq 7 \cdot 10^{-63}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \frac{t}{z + -1}\\ \end{array} \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (/ (* x_m y) z)))
   (*
    x_s
    (if (<= y -1.92e+74)
      t_1
      (if (<= y -9.2e-5)
        (/ t (/ z x_m))
        (if (or (<= y -5e-61) (not (<= y 7e-63)))
          t_1
          (* x_m (/ t (+ z -1.0)))))))))
x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = (x_m * y) / z;
	double tmp;
	if (y <= -1.92e+74) {
		tmp = t_1;
	} else if (y <= -9.2e-5) {
		tmp = t / (z / x_m);
	} else if ((y <= -5e-61) || !(y <= 7e-63)) {
		tmp = t_1;
	} else {
		tmp = x_m * (t / (z + -1.0));
	}
	return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    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_m * y) / z
    if (y <= (-1.92d+74)) then
        tmp = t_1
    else if (y <= (-9.2d-5)) then
        tmp = t / (z / x_m)
    else if ((y <= (-5d-61)) .or. (.not. (y <= 7d-63))) then
        tmp = t_1
    else
        tmp = x_m * (t / (z + (-1.0d0)))
    end if
    code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = (x_m * y) / z;
	double tmp;
	if (y <= -1.92e+74) {
		tmp = t_1;
	} else if (y <= -9.2e-5) {
		tmp = t / (z / x_m);
	} else if ((y <= -5e-61) || !(y <= 7e-63)) {
		tmp = t_1;
	} else {
		tmp = x_m * (t / (z + -1.0));
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	t_1 = (x_m * y) / z
	tmp = 0
	if y <= -1.92e+74:
		tmp = t_1
	elif y <= -9.2e-5:
		tmp = t / (z / x_m)
	elif (y <= -5e-61) or not (y <= 7e-63):
		tmp = t_1
	else:
		tmp = x_m * (t / (z + -1.0))
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	t_1 = Float64(Float64(x_m * y) / z)
	tmp = 0.0
	if (y <= -1.92e+74)
		tmp = t_1;
	elseif (y <= -9.2e-5)
		tmp = Float64(t / Float64(z / x_m));
	elseif ((y <= -5e-61) || !(y <= 7e-63))
		tmp = t_1;
	else
		tmp = Float64(x_m * Float64(t / Float64(z + -1.0)));
	end
	return Float64(x_s * tmp)
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	t_1 = (x_m * y) / z;
	tmp = 0.0;
	if (y <= -1.92e+74)
		tmp = t_1;
	elseif (y <= -9.2e-5)
		tmp = t / (z / x_m);
	elseif ((y <= -5e-61) || ~((y <= 7e-63)))
		tmp = t_1;
	else
		tmp = x_m * (t / (z + -1.0));
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x$95$m * y), $MachinePrecision] / z), $MachinePrecision]}, N[(x$95$s * If[LessEqual[y, -1.92e+74], t$95$1, If[LessEqual[y, -9.2e-5], N[(t / N[(z / x$95$m), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -5e-61], N[Not[LessEqual[y, 7e-63]], $MachinePrecision]], t$95$1, N[(x$95$m * N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)

\\
\begin{array}{l}
t_1 := \frac{x\_m \cdot y}{z}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.92 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -9.2 \cdot 10^{-5}:\\
\;\;\;\;\frac{t}{\frac{z}{x\_m}}\\

\mathbf{elif}\;y \leq -5 \cdot 10^{-61} \lor \neg \left(y \leq 7 \cdot 10^{-63}\right):\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x\_m \cdot \frac{t}{z + -1}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.92000000000000002e74 or -9.20000000000000001e-5 < y < -4.9999999999999999e-61 or 7.00000000000000006e-63 < y

    1. Initial program 91.9%

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

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

    if -1.92000000000000002e74 < y < -9.20000000000000001e-5

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \frac{x}{z}} \]
    9. Step-by-step derivation
      1. clear-num85.8%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{z}{x}}} \]
      2. un-div-inv86.0%

        \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    10. Applied egg-rr86.0%

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

    if -4.9999999999999999e-61 < y < 7.00000000000000006e-63

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.92 \cdot 10^{+74}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;y \leq -9.2 \cdot 10^{-5}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq -5 \cdot 10^{-61} \lor \neg \left(y \leq 7 \cdot 10^{-63}\right):\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z + -1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 40.4% accurate, 0.4× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{-13} \lor \neg \left(z \leq -7.5 \cdot 10^{-110}\right) \land \left(z \leq 2.4 \cdot 10^{-225} \lor \neg \left(z \leq 2.2\right)\right):\\ \;\;\;\;t \cdot \frac{x\_m}{z}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \left(-t\right)\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (or (<= z -1.12e-13)
          (and (not (<= z -7.5e-110)) (or (<= z 2.4e-225) (not (<= z 2.2)))))
    (* t (/ x_m z))
    (* x_m (- t)))))
x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if ((z <= -1.12e-13) || (!(z <= -7.5e-110) && ((z <= 2.4e-225) || !(z <= 2.2)))) {
		tmp = t * (x_m / z);
	} else {
		tmp = x_m * -t;
	}
	return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((z <= (-1.12d-13)) .or. (.not. (z <= (-7.5d-110))) .and. (z <= 2.4d-225) .or. (.not. (z <= 2.2d0))) then
        tmp = t * (x_m / z)
    else
        tmp = x_m * -t
    end if
    code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if ((z <= -1.12e-13) || (!(z <= -7.5e-110) && ((z <= 2.4e-225) || !(z <= 2.2)))) {
		tmp = t * (x_m / z);
	} else {
		tmp = x_m * -t;
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	tmp = 0
	if (z <= -1.12e-13) or (not (z <= -7.5e-110) and ((z <= 2.4e-225) or not (z <= 2.2))):
		tmp = t * (x_m / z)
	else:
		tmp = x_m * -t
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	tmp = 0.0
	if ((z <= -1.12e-13) || (!(z <= -7.5e-110) && ((z <= 2.4e-225) || !(z <= 2.2))))
		tmp = Float64(t * Float64(x_m / z));
	else
		tmp = Float64(x_m * Float64(-t));
	end
	return Float64(x_s * tmp)
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	tmp = 0.0;
	if ((z <= -1.12e-13) || (~((z <= -7.5e-110)) && ((z <= 2.4e-225) || ~((z <= 2.2)))))
		tmp = t * (x_m / z);
	else
		tmp = x_m * -t;
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -1.12e-13], And[N[Not[LessEqual[z, -7.5e-110]], $MachinePrecision], Or[LessEqual[z, 2.4e-225], N[Not[LessEqual[z, 2.2]], $MachinePrecision]]]], N[(t * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision], N[(x$95$m * (-t)), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.12 \cdot 10^{-13} \lor \neg \left(z \leq -7.5 \cdot 10^{-110}\right) \land \left(z \leq 2.4 \cdot 10^{-225} \lor \neg \left(z \leq 2.2\right)\right):\\
\;\;\;\;t \cdot \frac{x\_m}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.12e-13 or -7.50000000000000053e-110 < z < 2.39999999999999996e-225 or 2.2000000000000002 < z

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

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

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

    if -1.12e-13 < z < -7.50000000000000053e-110 or 2.39999999999999996e-225 < z < 2.2000000000000002

    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 44.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{-13} \lor \neg \left(z \leq -7.5 \cdot 10^{-110}\right) \land \left(z \leq 2.4 \cdot 10^{-225} \lor \neg \left(z \leq 2.2\right)\right):\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 42.5% accurate, 0.4× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_1 := t \cdot \left(-x\_m\right)\\ t_2 := x\_m \cdot \frac{t}{z}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{-13}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-109}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-224}:\\ \;\;\;\;t \cdot \frac{x\_m}{z}\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (* t (- x_m))) (t_2 (* x_m (/ t z))))
   (*
    x_s
    (if (<= z -1.12e-13)
      t_2
      (if (<= z -1.6e-109)
        t_1
        (if (<= z 3.8e-224) (* t (/ x_m z)) (if (<= z 1.0) t_1 t_2)))))))
x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = t * -x_m;
	double t_2 = x_m * (t / z);
	double tmp;
	if (z <= -1.12e-13) {
		tmp = t_2;
	} else if (z <= -1.6e-109) {
		tmp = t_1;
	} else if (z <= 3.8e-224) {
		tmp = t * (x_m / z);
	} else if (z <= 1.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * -x_m
    t_2 = x_m * (t / z)
    if (z <= (-1.12d-13)) then
        tmp = t_2
    else if (z <= (-1.6d-109)) then
        tmp = t_1
    else if (z <= 3.8d-224) then
        tmp = t * (x_m / z)
    else if (z <= 1.0d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = t * -x_m;
	double t_2 = x_m * (t / z);
	double tmp;
	if (z <= -1.12e-13) {
		tmp = t_2;
	} else if (z <= -1.6e-109) {
		tmp = t_1;
	} else if (z <= 3.8e-224) {
		tmp = t * (x_m / z);
	} else if (z <= 1.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	t_1 = t * -x_m
	t_2 = x_m * (t / z)
	tmp = 0
	if z <= -1.12e-13:
		tmp = t_2
	elif z <= -1.6e-109:
		tmp = t_1
	elif z <= 3.8e-224:
		tmp = t * (x_m / z)
	elif z <= 1.0:
		tmp = t_1
	else:
		tmp = t_2
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	t_1 = Float64(t * Float64(-x_m))
	t_2 = Float64(x_m * Float64(t / z))
	tmp = 0.0
	if (z <= -1.12e-13)
		tmp = t_2;
	elseif (z <= -1.6e-109)
		tmp = t_1;
	elseif (z <= 3.8e-224)
		tmp = Float64(t * Float64(x_m / z));
	elseif (z <= 1.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return Float64(x_s * tmp)
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	t_1 = t * -x_m;
	t_2 = x_m * (t / z);
	tmp = 0.0;
	if (z <= -1.12e-13)
		tmp = t_2;
	elseif (z <= -1.6e-109)
		tmp = t_1;
	elseif (z <= 3.8e-224)
		tmp = t * (x_m / z);
	elseif (z <= 1.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(t * (-x$95$m)), $MachinePrecision]}, Block[{t$95$2 = N[(x$95$m * N[(t / z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -1.12e-13], t$95$2, If[LessEqual[z, -1.6e-109], t$95$1, If[LessEqual[z, 3.8e-224], N[(t * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], t$95$1, t$95$2]]]]), $MachinePrecision]]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)

\\
\begin{array}{l}
t_1 := t \cdot \left(-x\_m\right)\\
t_2 := x\_m \cdot \frac{t}{z}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.12 \cdot 10^{-13}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -1.6 \cdot 10^{-109}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3.8 \cdot 10^{-224}:\\
\;\;\;\;t \cdot \frac{x\_m}{z}\\

\mathbf{elif}\;z \leq 1:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

    if -1.12e-13 < z < -1.6000000000000001e-109 or 3.80000000000000002e-224 < z < 1

    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 44.9%

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

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

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

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

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

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

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

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

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

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

    if -1.6000000000000001e-109 < z < 3.80000000000000002e-224

    1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{-13}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-109}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-224}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 93.6% accurate, 0.6× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -68000000000 \lor \neg \left(z \leq 1\right):\\ \;\;\;\;x\_m \cdot \frac{y + t}{z}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \left(\frac{y}{z} - t\right)\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (or (<= z -68000000000.0) (not (<= z 1.0)))
    (* x_m (/ (+ y t) z))
    (* x_m (- (/ y z) t)))))
x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if ((z <= -68000000000.0) || !(z <= 1.0)) {
		tmp = x_m * ((y + t) / z);
	} else {
		tmp = x_m * ((y / z) - t);
	}
	return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((z <= (-68000000000.0d0)) .or. (.not. (z <= 1.0d0))) then
        tmp = x_m * ((y + t) / z)
    else
        tmp = x_m * ((y / z) - t)
    end if
    code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if ((z <= -68000000000.0) || !(z <= 1.0)) {
		tmp = x_m * ((y + t) / z);
	} else {
		tmp = x_m * ((y / z) - t);
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	tmp = 0
	if (z <= -68000000000.0) or not (z <= 1.0):
		tmp = x_m * ((y + t) / z)
	else:
		tmp = x_m * ((y / z) - t)
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	tmp = 0.0
	if ((z <= -68000000000.0) || !(z <= 1.0))
		tmp = Float64(x_m * Float64(Float64(y + t) / z));
	else
		tmp = Float64(x_m * Float64(Float64(y / z) - t));
	end
	return Float64(x_s * tmp)
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	tmp = 0.0;
	if ((z <= -68000000000.0) || ~((z <= 1.0)))
		tmp = x_m * ((y + t) / z);
	else
		tmp = x_m * ((y / z) - t);
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -68000000000.0], N[Not[LessEqual[z, 1.0]], $MachinePrecision]], N[(x$95$m * N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)

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

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


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

    1. Initial program 97.7%

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

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

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

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

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

        \[\leadsto x \cdot \frac{y + \color{blue}{t}}{z} \]
      5. +-commutative97.4%

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

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

    if -6.8e10 < z < 1

    1. Initial program 91.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 68.0% accurate, 0.7× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{+184} \lor \neg \left(t \leq 8.5 \cdot 10^{+55}\right):\\ \;\;\;\;x\_m \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \frac{y}{z}\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (or (<= t -1e+184) (not (<= t 8.5e+55)))
    (* x_m (/ t z))
    (* x_m (/ y z)))))
x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if ((t <= -1e+184) || !(t <= 8.5e+55)) {
		tmp = x_m * (t / z);
	} else {
		tmp = x_m * (y / z);
	}
	return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((t <= (-1d+184)) .or. (.not. (t <= 8.5d+55))) then
        tmp = x_m * (t / z)
    else
        tmp = x_m * (y / z)
    end if
    code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if ((t <= -1e+184) || !(t <= 8.5e+55)) {
		tmp = x_m * (t / z);
	} else {
		tmp = x_m * (y / z);
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	tmp = 0
	if (t <= -1e+184) or not (t <= 8.5e+55):
		tmp = x_m * (t / z)
	else:
		tmp = x_m * (y / z)
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	tmp = 0.0
	if ((t <= -1e+184) || !(t <= 8.5e+55))
		tmp = Float64(x_m * Float64(t / z));
	else
		tmp = Float64(x_m * Float64(y / z));
	end
	return Float64(x_s * tmp)
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	tmp = 0.0;
	if ((t <= -1e+184) || ~((t <= 8.5e+55)))
		tmp = x_m * (t / z);
	else
		tmp = x_m * (y / z);
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[t, -1e+184], N[Not[LessEqual[t, 8.5e+55]], $MachinePrecision]], N[(x$95$m * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(y / z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{+184} \lor \neg \left(t \leq 8.5 \cdot 10^{+55}\right):\\
\;\;\;\;x\_m \cdot \frac{t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.00000000000000002e184 or 8.50000000000000002e55 < t

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

    if -1.00000000000000002e184 < t < 8.50000000000000002e55

    1. Initial program 93.1%

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

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

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

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

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

Alternative 9: 22.7% accurate, 2.8× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \left(t \cdot \left(-x\_m\right)\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t) :precision binary64 (* x_s (* t (- x_m))))
x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	return x_s * (t * -x_m);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x_s * (t * -x_m)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	return x_s * (t * -x_m);
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	return x_s * (t * -x_m)
x_m = abs(x)
x_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	return Float64(x_s * Float64(t * Float64(-x_m)))
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
function tmp = code(x_s, x_m, y, z, t)
	tmp = x_s * (t * -x_m);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * N[(t * (-x$95$m)), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)

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

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

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

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

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

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

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

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

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

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

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

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

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

Developer target: 95.0% 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 2024046 
(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)))))