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

Percentage Accurate: 94.8% → 95.6%
Time: 10.6s
Alternatives: 11
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 11 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 94.8% 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: 95.6% accurate, 0.6× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_1 := \frac{t}{1 - z}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 1.5 \cdot 10^{-12}:\\ \;\;\;\;\frac{x\_m}{z} \cdot y - x\_m \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \left(\frac{y}{z} - t\_1\right)\\ \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 (- 1.0 z))))
   (*
    x_s
    (if (<= x_m 1.5e-12)
      (- (* (/ x_m z) y) (* x_m t_1))
      (* x_m (- (/ y z) 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 / (1.0 - z);
	double tmp;
	if (x_m <= 1.5e-12) {
		tmp = ((x_m / z) * y) - (x_m * t_1);
	} else {
		tmp = x_m * ((y / z) - t_1);
	}
	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 = t / (1.0d0 - z)
    if (x_m <= 1.5d-12) then
        tmp = ((x_m / z) * y) - (x_m * t_1)
    else
        tmp = x_m * ((y / z) - t_1)
    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 / (1.0 - z);
	double tmp;
	if (x_m <= 1.5e-12) {
		tmp = ((x_m / z) * y) - (x_m * t_1);
	} else {
		tmp = x_m * ((y / z) - 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 / (1.0 - z)
	tmp = 0
	if x_m <= 1.5e-12:
		tmp = ((x_m / z) * y) - (x_m * t_1)
	else:
		tmp = x_m * ((y / z) - 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(1.0 - z))
	tmp = 0.0
	if (x_m <= 1.5e-12)
		tmp = Float64(Float64(Float64(x_m / z) * y) - Float64(x_m * t_1));
	else
		tmp = Float64(x_m * Float64(Float64(y / z) - 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 / (1.0 - z);
	tmp = 0.0;
	if (x_m <= 1.5e-12)
		tmp = ((x_m / z) * y) - (x_m * t_1);
	else
		tmp = x_m * ((y / z) - 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[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[x$95$m, 1.5e-12], N[(N[(N[(x$95$m / z), $MachinePrecision] * y), $MachinePrecision] - N[(x$95$m * t$95$1), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(N[(y / z), $MachinePrecision] - 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}{1 - z}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \leq 1.5 \cdot 10^{-12}:\\
\;\;\;\;\frac{x\_m}{z} \cdot y - x\_m \cdot t\_1\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 1.5000000000000001e-12

    1. Initial program 94.2%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{1 - z} + \frac{x \cdot y}{z}} \]
    6. Step-by-step derivation
      1. +-commutative88.5%

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{z} - \frac{t}{\frac{1 - z}{x}}} \]
      5. associate-/l*89.7%

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

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

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

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

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

    if 1.5000000000000001e-12 < x

    1. Initial program 99.7%

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

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

Alternative 2: 74.2% 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.85 \cdot 10^{+23}:\\ \;\;\;\;x\_m \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 620000000:\\ \;\;\;\;x\_m \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{+59}:\\ \;\;\;\;\frac{x\_m}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+105}:\\ \;\;\;\;\frac{x\_m}{z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \frac{t}{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 (<= z -1.85e+23)
    (* x_m (/ y z))
    (if (<= z 620000000.0)
      (* x_m (- (/ y z) t))
      (if (<= z 1.02e+59)
        (/ x_m (/ z t))
        (if (<= z 1.75e+105) (* (/ x_m z) y) (* x_m (/ t 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 (z <= -1.85e+23) {
		tmp = x_m * (y / z);
	} else if (z <= 620000000.0) {
		tmp = x_m * ((y / z) - t);
	} else if (z <= 1.02e+59) {
		tmp = x_m / (z / t);
	} else if (z <= 1.75e+105) {
		tmp = (x_m / z) * y;
	} else {
		tmp = x_m * (t / 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 (z <= (-1.85d+23)) then
        tmp = x_m * (y / z)
    else if (z <= 620000000.0d0) then
        tmp = x_m * ((y / z) - t)
    else if (z <= 1.02d+59) then
        tmp = x_m / (z / t)
    else if (z <= 1.75d+105) then
        tmp = (x_m / z) * y
    else
        tmp = x_m * (t / 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 (z <= -1.85e+23) {
		tmp = x_m * (y / z);
	} else if (z <= 620000000.0) {
		tmp = x_m * ((y / z) - t);
	} else if (z <= 1.02e+59) {
		tmp = x_m / (z / t);
	} else if (z <= 1.75e+105) {
		tmp = (x_m / z) * y;
	} else {
		tmp = x_m * (t / 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 z <= -1.85e+23:
		tmp = x_m * (y / z)
	elif z <= 620000000.0:
		tmp = x_m * ((y / z) - t)
	elif z <= 1.02e+59:
		tmp = x_m / (z / t)
	elif z <= 1.75e+105:
		tmp = (x_m / z) * y
	else:
		tmp = x_m * (t / 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 (z <= -1.85e+23)
		tmp = Float64(x_m * Float64(y / z));
	elseif (z <= 620000000.0)
		tmp = Float64(x_m * Float64(Float64(y / z) - t));
	elseif (z <= 1.02e+59)
		tmp = Float64(x_m / Float64(z / t));
	elseif (z <= 1.75e+105)
		tmp = Float64(Float64(x_m / z) * y);
	else
		tmp = Float64(x_m * Float64(t / 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 (z <= -1.85e+23)
		tmp = x_m * (y / z);
	elseif (z <= 620000000.0)
		tmp = x_m * ((y / z) - t);
	elseif (z <= 1.02e+59)
		tmp = x_m / (z / t);
	elseif (z <= 1.75e+105)
		tmp = (x_m / z) * y;
	else
		tmp = x_m * (t / 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[LessEqual[z, -1.85e+23], N[(x$95$m * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 620000000.0], N[(x$95$m * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e+59], N[(x$95$m / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e+105], N[(N[(x$95$m / z), $MachinePrecision] * y), $MachinePrecision], N[(x$95$m * N[(t / 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}\;z \leq -1.85 \cdot 10^{+23}:\\
\;\;\;\;x\_m \cdot \frac{y}{z}\\

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

\mathbf{elif}\;z \leq 1.02 \cdot 10^{+59}:\\
\;\;\;\;\frac{x\_m}{\frac{z}{t}}\\

\mathbf{elif}\;z \leq 1.75 \cdot 10^{+105}:\\
\;\;\;\;\frac{x\_m}{z} \cdot y\\

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


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

    1. Initial program 97.5%

      \[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/69.0%

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

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

    if -1.85000000000000006e23 < z < 6.2e8

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

    if 6.2e8 < z < 1.02000000000000002e59

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

    if 1.02000000000000002e59 < z < 1.74999999999999996e105

    1. Initial program 99.9%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
      2. associate-/r/84.1%

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

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

    if 1.74999999999999996e105 < z

    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. clear-num98.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{z}} \]
    9. Step-by-step derivation
      1. *-commutative61.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+23}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 620000000:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{+59}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+105}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 74.3% 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 -5.2 \cdot 10^{+34}:\\ \;\;\;\;x\_m \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 920000000:\\ \;\;\;\;x\_m \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+58}:\\ \;\;\;\;x\_m \cdot \frac{t}{z + -1}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+105}:\\ \;\;\;\;\frac{x\_m}{z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \frac{t}{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 (<= z -5.2e+34)
    (* x_m (/ y z))
    (if (<= z 920000000.0)
      (* x_m (- (/ y z) t))
      (if (<= z 2.3e+58)
        (* x_m (/ t (+ z -1.0)))
        (if (<= z 3.8e+105) (* (/ x_m z) y) (* x_m (/ t 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 (z <= -5.2e+34) {
		tmp = x_m * (y / z);
	} else if (z <= 920000000.0) {
		tmp = x_m * ((y / z) - t);
	} else if (z <= 2.3e+58) {
		tmp = x_m * (t / (z + -1.0));
	} else if (z <= 3.8e+105) {
		tmp = (x_m / z) * y;
	} else {
		tmp = x_m * (t / 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 (z <= (-5.2d+34)) then
        tmp = x_m * (y / z)
    else if (z <= 920000000.0d0) then
        tmp = x_m * ((y / z) - t)
    else if (z <= 2.3d+58) then
        tmp = x_m * (t / (z + (-1.0d0)))
    else if (z <= 3.8d+105) then
        tmp = (x_m / z) * y
    else
        tmp = x_m * (t / 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 (z <= -5.2e+34) {
		tmp = x_m * (y / z);
	} else if (z <= 920000000.0) {
		tmp = x_m * ((y / z) - t);
	} else if (z <= 2.3e+58) {
		tmp = x_m * (t / (z + -1.0));
	} else if (z <= 3.8e+105) {
		tmp = (x_m / z) * y;
	} else {
		tmp = x_m * (t / 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 z <= -5.2e+34:
		tmp = x_m * (y / z)
	elif z <= 920000000.0:
		tmp = x_m * ((y / z) - t)
	elif z <= 2.3e+58:
		tmp = x_m * (t / (z + -1.0))
	elif z <= 3.8e+105:
		tmp = (x_m / z) * y
	else:
		tmp = x_m * (t / 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 (z <= -5.2e+34)
		tmp = Float64(x_m * Float64(y / z));
	elseif (z <= 920000000.0)
		tmp = Float64(x_m * Float64(Float64(y / z) - t));
	elseif (z <= 2.3e+58)
		tmp = Float64(x_m * Float64(t / Float64(z + -1.0)));
	elseif (z <= 3.8e+105)
		tmp = Float64(Float64(x_m / z) * y);
	else
		tmp = Float64(x_m * Float64(t / 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 (z <= -5.2e+34)
		tmp = x_m * (y / z);
	elseif (z <= 920000000.0)
		tmp = x_m * ((y / z) - t);
	elseif (z <= 2.3e+58)
		tmp = x_m * (t / (z + -1.0));
	elseif (z <= 3.8e+105)
		tmp = (x_m / z) * y;
	else
		tmp = x_m * (t / 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[LessEqual[z, -5.2e+34], N[(x$95$m * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 920000000.0], N[(x$95$m * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e+58], N[(x$95$m * N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e+105], N[(N[(x$95$m / z), $MachinePrecision] * y), $MachinePrecision], N[(x$95$m * N[(t / 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}\;z \leq -5.2 \cdot 10^{+34}:\\
\;\;\;\;x\_m \cdot \frac{y}{z}\\

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

\mathbf{elif}\;z \leq 2.3 \cdot 10^{+58}:\\
\;\;\;\;x\_m \cdot \frac{t}{z + -1}\\

\mathbf{elif}\;z \leq 3.8 \cdot 10^{+105}:\\
\;\;\;\;\frac{x\_m}{z} \cdot y\\

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


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

    1. Initial program 97.5%

      \[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/69.0%

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

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

    if -5.19999999999999995e34 < z < 9.2e8

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

    if 9.2e8 < z < 2.30000000000000002e58

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.30000000000000002e58 < z < 3.8e105

    1. Initial program 99.9%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
      2. associate-/r/84.1%

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

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

    if 3.8e105 < z

    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. clear-num98.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{z}} \]
    9. Step-by-step derivation
      1. *-commutative61.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+34}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 920000000:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+58}:\\ \;\;\;\;x \cdot \frac{t}{z + -1}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+105}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 96.8% accurate, 0.5× 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}{1 - z}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq 5 \cdot 10^{+306}:\\ \;\;\;\;x\_m \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m}{z} \cdot y\\ \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 (- 1.0 z)))))
   (* x_s (if (<= t_1 5e+306) (* x_m t_1) (* (/ x_m z) y)))))
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 / (1.0 - z));
	double tmp;
	if (t_1 <= 5e+306) {
		tmp = x_m * t_1;
	} else {
		tmp = (x_m / z) * y;
	}
	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 = (y / z) - (t / (1.0d0 - z))
    if (t_1 <= 5d+306) then
        tmp = x_m * t_1
    else
        tmp = (x_m / z) * y
    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 = (y / z) - (t / (1.0 - z));
	double tmp;
	if (t_1 <= 5e+306) {
		tmp = x_m * t_1;
	} else {
		tmp = (x_m / z) * y;
	}
	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 / (1.0 - z))
	tmp = 0
	if t_1 <= 5e+306:
		tmp = x_m * t_1
	else:
		tmp = (x_m / z) * y
	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(1.0 - z)))
	tmp = 0.0
	if (t_1 <= 5e+306)
		tmp = Float64(x_m * t_1);
	else
		tmp = Float64(Float64(x_m / z) * y);
	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 / (1.0 - z));
	tmp = 0.0;
	if (t_1 <= 5e+306)
		tmp = x_m * t_1;
	else
		tmp = (x_m / z) * y;
	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[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, 5e+306], N[(x$95$m * t$95$1), $MachinePrecision], N[(N[(x$95$m / z), $MachinePrecision] * y), $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}{1 - z}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+306}:\\
\;\;\;\;x\_m \cdot t\_1\\

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


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

    1. Initial program 97.5%

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

    if 4.99999999999999993e306 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z)))

    1. Initial program 79.6%

      \[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-/l*80.3%

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

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

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

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

Alternative 5: 93.8% 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 -9 \lor \neg \left(z \leq 0.0005\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 -9.0) (not (<= z 0.0005)))
    (* 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 <= -9.0) || !(z <= 0.0005)) {
		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 <= (-9.0d0)) .or. (.not. (z <= 0.0005d0))) 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 <= -9.0) || !(z <= 0.0005)) {
		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 <= -9.0) or not (z <= 0.0005):
		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 <= -9.0) || !(z <= 0.0005))
		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 <= -9.0) || ~((z <= 0.0005)))
		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, -9.0], N[Not[LessEqual[z, 0.0005]], $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 -9 \lor \neg \left(z \leq 0.0005\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 < -9 or 5.0000000000000001e-4 < z

    1. Initial program 98.4%

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    6. Step-by-step derivation
      1. sub-neg97.6%

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

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

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

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

    if -9 < z < 5.0000000000000001e-4

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 93.7% 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 -9:\\ \;\;\;\;\frac{x\_m}{\frac{z}{y + t}}\\ \mathbf{elif}\;z \leq 0.0005:\\ \;\;\;\;x\_m \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \frac{y + t}{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 (<= z -9.0)
    (/ x_m (/ z (+ y t)))
    (if (<= z 0.0005) (* x_m (- (/ y z) t)) (* x_m (/ (+ y t) 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 (z <= -9.0) {
		tmp = x_m / (z / (y + t));
	} else if (z <= 0.0005) {
		tmp = x_m * ((y / z) - t);
	} else {
		tmp = x_m * ((y + t) / 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 (z <= (-9.0d0)) then
        tmp = x_m / (z / (y + t))
    else if (z <= 0.0005d0) then
        tmp = x_m * ((y / z) - t)
    else
        tmp = x_m * ((y + t) / 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 (z <= -9.0) {
		tmp = x_m / (z / (y + t));
	} else if (z <= 0.0005) {
		tmp = x_m * ((y / z) - t);
	} else {
		tmp = x_m * ((y + t) / 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 z <= -9.0:
		tmp = x_m / (z / (y + t))
	elif z <= 0.0005:
		tmp = x_m * ((y / z) - t)
	else:
		tmp = x_m * ((y + t) / 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 (z <= -9.0)
		tmp = Float64(x_m / Float64(z / Float64(y + t)));
	elseif (z <= 0.0005)
		tmp = Float64(x_m * Float64(Float64(y / z) - t));
	else
		tmp = Float64(x_m * Float64(Float64(y + t) / 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 (z <= -9.0)
		tmp = x_m / (z / (y + t));
	elseif (z <= 0.0005)
		tmp = x_m * ((y / z) - t);
	else
		tmp = x_m * ((y + t) / 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[LessEqual[z, -9.0], N[(x$95$m / N[(z / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.0005], N[(x$95$m * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(N[(y + t), $MachinePrecision] / 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}\;z \leq -9:\\
\;\;\;\;\frac{x\_m}{\frac{z}{y + t}}\\

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

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


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

    1. Initial program 97.8%

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

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{t + y}}} \]
    5. Simplified96.6%

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

    if -9 < z < 5.0000000000000001e-4

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000001e-4 < z

    1. Initial program 98.9%

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    6. Step-by-step derivation
      1. sub-neg98.5%

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

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

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

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

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

Alternative 7: 45.3% 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}\;z \leq -0.022 \lor \neg \left(z \leq 22500\right):\\ \;\;\;\;x\_m \cdot \frac{t}{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 -0.022) (not (<= z 22500.0))) (* x_m (/ t 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 <= -0.022) || !(z <= 22500.0)) {
		tmp = x_m * (t / 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 <= (-0.022d0)) .or. (.not. (z <= 22500.0d0))) then
        tmp = x_m * (t / 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 <= -0.022) || !(z <= 22500.0)) {
		tmp = x_m * (t / 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 <= -0.022) or not (z <= 22500.0):
		tmp = x_m * (t / 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 <= -0.022) || !(z <= 22500.0))
		tmp = Float64(x_m * Float64(t / 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 <= -0.022) || ~((z <= 22500.0)))
		tmp = x_m * (t / 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, -0.022], N[Not[LessEqual[z, 22500.0]], $MachinePrecision]], N[(x$95$m * N[(t / 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 -0.022 \lor \neg \left(z \leq 22500\right):\\
\;\;\;\;x\_m \cdot \frac{t}{z}\\

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


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

    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. clear-num98.3%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      2. sub-neg97.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{t}{z}} \]
    10. Simplified56.1%

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

    if -0.021999999999999999 < z < 22500

    1. Initial program 93.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 64.3% 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}\;y \leq -1.5 \cdot 10^{-129} \lor \neg \left(y \leq 3.3 \cdot 10^{-47}\right):\\ \;\;\;\;\frac{x\_m}{z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \frac{t}{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 (<= y -1.5e-129) (not (<= y 3.3e-47)))
    (* (/ x_m z) y)
    (* x_m (/ t 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 ((y <= -1.5e-129) || !(y <= 3.3e-47)) {
		tmp = (x_m / z) * y;
	} else {
		tmp = x_m * (t / 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 ((y <= (-1.5d-129)) .or. (.not. (y <= 3.3d-47))) then
        tmp = (x_m / z) * y
    else
        tmp = x_m * (t / 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 ((y <= -1.5e-129) || !(y <= 3.3e-47)) {
		tmp = (x_m / z) * y;
	} else {
		tmp = x_m * (t / 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 (y <= -1.5e-129) or not (y <= 3.3e-47):
		tmp = (x_m / z) * y
	else:
		tmp = x_m * (t / 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 ((y <= -1.5e-129) || !(y <= 3.3e-47))
		tmp = Float64(Float64(x_m / z) * y);
	else
		tmp = Float64(x_m * Float64(t / 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 ((y <= -1.5e-129) || ~((y <= 3.3e-47)))
		tmp = (x_m / z) * y;
	else
		tmp = x_m * (t / 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[y, -1.5e-129], N[Not[LessEqual[y, 3.3e-47]], $MachinePrecision]], N[(N[(x$95$m / z), $MachinePrecision] * y), $MachinePrecision], N[(x$95$m * N[(t / 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}\;y \leq -1.5 \cdot 10^{-129} \lor \neg \left(y \leq 3.3 \cdot 10^{-47}\right):\\
\;\;\;\;\frac{x\_m}{z} \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.4999999999999999e-129 or 3.30000000000000004e-47 < y

    1. Initial program 94.8%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
      2. associate-/r/78.8%

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

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

    if -1.4999999999999999e-129 < y < 3.30000000000000004e-47

    1. Initial program 97.9%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      2. sub-neg63.5%

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

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

        \[\leadsto \frac{x}{\frac{z}{y + \color{blue}{t}}} \]
    7. Simplified63.5%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{t}{z}} \]
    10. Simplified55.5%

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

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

Alternative 9: 64.2% 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}\;y \leq -1.25 \cdot 10^{-129} \lor \neg \left(y \leq 3.2 \cdot 10^{-47}\right):\\ \;\;\;\;\frac{x\_m}{z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m}{\frac{z}{t}}\\ \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 (<= y -1.25e-129) (not (<= y 3.2e-47)))
    (* (/ x_m z) y)
    (/ x_m (/ 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 ((y <= -1.25e-129) || !(y <= 3.2e-47)) {
		tmp = (x_m / z) * y;
	} else {
		tmp = x_m / (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 ((y <= (-1.25d-129)) .or. (.not. (y <= 3.2d-47))) then
        tmp = (x_m / z) * y
    else
        tmp = x_m / (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 ((y <= -1.25e-129) || !(y <= 3.2e-47)) {
		tmp = (x_m / z) * y;
	} else {
		tmp = x_m / (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 (y <= -1.25e-129) or not (y <= 3.2e-47):
		tmp = (x_m / z) * y
	else:
		tmp = x_m / (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 ((y <= -1.25e-129) || !(y <= 3.2e-47))
		tmp = Float64(Float64(x_m / z) * y);
	else
		tmp = Float64(x_m / Float64(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 ((y <= -1.25e-129) || ~((y <= 3.2e-47)))
		tmp = (x_m / z) * y;
	else
		tmp = x_m / (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[y, -1.25e-129], N[Not[LessEqual[y, 3.2e-47]], $MachinePrecision]], N[(N[(x$95$m / z), $MachinePrecision] * y), $MachinePrecision], N[(x$95$m / N[(z / 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}\;y \leq -1.25 \cdot 10^{-129} \lor \neg \left(y \leq 3.2 \cdot 10^{-47}\right):\\
\;\;\;\;\frac{x\_m}{z} \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.25000000000000007e-129 or 3.1999999999999999e-47 < y

    1. Initial program 94.8%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
      2. associate-/r/78.8%

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

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

    if -1.25000000000000007e-129 < y < 3.1999999999999999e-47

    1. Initial program 97.9%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      2. sub-neg63.5%

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

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

        \[\leadsto \frac{x}{\frac{z}{y + \color{blue}{t}}} \]
    7. Simplified63.5%

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

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

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

Alternative 10: 66.5% 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.9 \cdot 10^{+193}:\\ \;\;\;\;x\_m \cdot \left(-t\right)\\ \mathbf{elif}\;t \leq 10^{+79}:\\ \;\;\;\;x\_m \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \frac{t}{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 (<= t -1.9e+193)
    (* x_m (- t))
    (if (<= t 1e+79) (* x_m (/ y z)) (* x_m (/ t 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 <= -1.9e+193) {
		tmp = x_m * -t;
	} else if (t <= 1e+79) {
		tmp = x_m * (y / z);
	} else {
		tmp = x_m * (t / 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 <= (-1.9d+193)) then
        tmp = x_m * -t
    else if (t <= 1d+79) then
        tmp = x_m * (y / z)
    else
        tmp = x_m * (t / 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 <= -1.9e+193) {
		tmp = x_m * -t;
	} else if (t <= 1e+79) {
		tmp = x_m * (y / z);
	} else {
		tmp = x_m * (t / 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 <= -1.9e+193:
		tmp = x_m * -t
	elif t <= 1e+79:
		tmp = x_m * (y / z)
	else:
		tmp = x_m * (t / 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 <= -1.9e+193)
		tmp = Float64(x_m * Float64(-t));
	elseif (t <= 1e+79)
		tmp = Float64(x_m * Float64(y / z));
	else
		tmp = Float64(x_m * Float64(t / 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 <= -1.9e+193)
		tmp = x_m * -t;
	elseif (t <= 1e+79)
		tmp = x_m * (y / z);
	else
		tmp = x_m * (t / 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[LessEqual[t, -1.9e+193], N[(x$95$m * (-t)), $MachinePrecision], If[LessEqual[t, 1e+79], N[(x$95$m * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(t / 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.9 \cdot 10^{+193}:\\
\;\;\;\;x\_m \cdot \left(-t\right)\\

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.89999999999999986e193 < t < 9.99999999999999967e78

    1. Initial program 95.0%

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

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

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

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

    if 9.99999999999999967e78 < t

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{z}{y + \color{blue}{t}}} \]
    7. Simplified59.4%

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{z}} \]
    9. Step-by-step derivation
      1. *-commutative31.2%

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

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

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

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

Alternative 11: 23.4% accurate, 2.8× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \left(x\_m \cdot \left(-t\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 (* 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) {
	return x_s * (x_m * -t);
}
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 * (x_m * -t)
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 * (x_m * -t);
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	return x_s * (x_m * -t)
x_m = abs(x)
x_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	return Float64(x_s * Float64(x_m * Float64(-t)))
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 * (x_m * -t);
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[(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 \left(x\_m \cdot \left(-t\right)\right)
\end{array}
Derivation
  1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto x \cdot \left(-t\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 2024031 
(FPCore (x y z t)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
  :precision binary64

  :herbie-target
  (if (< (* x (- (/ y z) (/ t (- 1.0 z)))) -7.623226303312042e-196) (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))) (if (< (* x (- (/ y z) (/ t (- 1.0 z)))) 1.4133944927702302e-211) (+ (/ (* y x) z) (- (/ (* t x) (- 1.0 z)))) (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z)))))))

  (* x (- (/ y z) (/ t (- 1.0 z)))))