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

Percentage Accurate: 94.6% → 95.1%
Time: 8.9s
Alternatives: 12
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 12 alternatives:

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

Initial Program: 94.6% 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.1% 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 := \left(\frac{y}{z} - \frac{t}{1 - z}\right) \cdot x\_m\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq 2 \cdot 10^{+248}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(1 - z, y, \left(-t\right) \cdot z\right) \cdot x\_m}{\left(1 - z\right) \cdot z}\\ \end{array} \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (* (- (/ y z) (/ t (- 1.0 z))) x_m)))
   (*
    x_s
    (if (<= t_1 2e+248)
      t_1
      (/ (* (fma (- 1.0 z) y (* (- t) z)) x_m) (* (- 1.0 z) 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 t_1 = ((y / z) - (t / (1.0 - z))) * x_m;
	double tmp;
	if (t_1 <= 2e+248) {
		tmp = t_1;
	} else {
		tmp = (fma((1.0 - z), y, (-t * z)) * x_m) / ((1.0 - z) * z);
	}
	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(Float64(y / z) - Float64(t / Float64(1.0 - z))) * x_m)
	tmp = 0.0
	if (t_1 <= 2e+248)
		tmp = t_1;
	else
		tmp = Float64(Float64(fma(Float64(1.0 - z), y, Float64(Float64(-t) * z)) * x_m) / Float64(Float64(1.0 - z) * z));
	end
	return Float64(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[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x$95$m), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, 2e+248], t$95$1, N[(N[(N[(N[(1.0 - z), $MachinePrecision] * y + N[((-t) * z), $MachinePrecision]), $MachinePrecision] * x$95$m), $MachinePrecision] / N[(N[(1.0 - z), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z)))) < 2.00000000000000009e248

    1. Initial program 94.9%

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

    if 2.00000000000000009e248 < (*.f64 x (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))))

    1. Initial program 80.8%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto \color{blue}{\left(\frac{y}{z} - \frac{t}{1 - z}\right) \cdot x} \]
      3. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\frac{y}{z} - \frac{t}{1 - z}\right)} \cdot x \]
      4. lift-/.f64N/A

        \[\leadsto \left(\color{blue}{\frac{y}{z}} - \frac{t}{1 - z}\right) \cdot x \]
      5. lift-/.f64N/A

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

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

        \[\leadsto \color{blue}{\frac{\left(y \cdot \left(1 - z\right) - z \cdot t\right) \cdot x}{z \cdot \left(1 - z\right)}} \]
      8. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(y \cdot \left(1 - z\right) - z \cdot t\right) \cdot x}{z \cdot \left(1 - z\right)}} \]
      9. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(y \cdot \left(1 - z\right) - z \cdot t\right) \cdot x}}{z \cdot \left(1 - z\right)} \]
      10. cancel-sign-sub-invN/A

        \[\leadsto \frac{\color{blue}{\left(y \cdot \left(1 - z\right) + \left(\mathsf{neg}\left(z\right)\right) \cdot t\right)} \cdot x}{z \cdot \left(1 - z\right)} \]
      11. *-commutativeN/A

        \[\leadsto \frac{\left(\color{blue}{\left(1 - z\right) \cdot y} + \left(\mathsf{neg}\left(z\right)\right) \cdot t\right) \cdot x}{z \cdot \left(1 - z\right)} \]
      12. lower-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(1 - z, y, \left(\mathsf{neg}\left(z\right)\right) \cdot t\right)} \cdot x}{z \cdot \left(1 - z\right)} \]
      13. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(1 - z, y, \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot t}\right) \cdot x}{z \cdot \left(1 - z\right)} \]
      14. lower-neg.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(1 - z, y, \color{blue}{\left(-z\right)} \cdot t\right) \cdot x}{z \cdot \left(1 - z\right)} \]
      15. *-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(1 - z, y, \left(-z\right) \cdot t\right) \cdot x}{\color{blue}{\left(1 - z\right) \cdot z}} \]
      16. lower-*.f6497.6

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

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

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

Alternative 2: 96.4% 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 10^{+263}:\\ \;\;\;\;t\_1 \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(y - t \cdot z\right) \cdot x\_m}{z}\\ \end{array} \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) 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 1e+263) (* t_1 x_m) (/ (* (- y (* t z)) x_m) 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 t_1 = (y / z) - (t / (1.0 - z));
	double tmp;
	if (t_1 <= 1e+263) {
		tmp = t_1 * x_m;
	} else {
		tmp = ((y - (t * z)) * x_m) / 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) :: t_1
    real(8) :: tmp
    t_1 = (y / z) - (t / (1.0d0 - z))
    if (t_1 <= 1d+263) then
        tmp = t_1 * x_m
    else
        tmp = ((y - (t * z)) * x_m) / 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 t_1 = (y / z) - (t / (1.0 - z));
	double tmp;
	if (t_1 <= 1e+263) {
		tmp = t_1 * x_m;
	} else {
		tmp = ((y - (t * z)) * x_m) / 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):
	t_1 = (y / z) - (t / (1.0 - z))
	tmp = 0
	if t_1 <= 1e+263:
		tmp = t_1 * x_m
	else:
		tmp = ((y - (t * z)) * x_m) / z
	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 <= 1e+263)
		tmp = Float64(t_1 * x_m);
	else
		tmp = Float64(Float64(Float64(y - Float64(t * z)) * x_m) / 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)
	t_1 = (y / z) - (t / (1.0 - z));
	tmp = 0.0;
	if (t_1 <= 1e+263)
		tmp = t_1 * x_m;
	else
		tmp = ((y - (t * z)) * x_m) / 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_] := 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, 1e+263], N[(t$95$1 * x$95$m), $MachinePrecision], N[(N[(N[(y - N[(t * z), $MachinePrecision]), $MachinePrecision] * x$95$m), $MachinePrecision] / z), $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 10^{+263}:\\
\;\;\;\;t\_1 \cdot x\_m\\

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


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

    1. Initial program 96.8%

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

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

    1. Initial program 63.7%

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

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x \cdot z\right)\right) + x \cdot y}{z}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x \cdot z\right)\right) + x \cdot y}{z}} \]
      2. +-commutativeN/A

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

        \[\leadsto \frac{x \cdot y + \color{blue}{\left(\mathsf{neg}\left(t \cdot \left(x \cdot z\right)\right)\right)}}{z} \]
      4. unsub-negN/A

        \[\leadsto \frac{\color{blue}{x \cdot y - t \cdot \left(x \cdot z\right)}}{z} \]
      5. associate-*r*N/A

        \[\leadsto \frac{x \cdot y - \color{blue}{\left(t \cdot x\right) \cdot z}}{z} \]
      6. *-commutativeN/A

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

        \[\leadsto \frac{x \cdot y - \color{blue}{x \cdot \left(t \cdot z\right)}}{z} \]
      8. distribute-lft-out--N/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y - t \cdot z\right)}}{z} \]
      9. unsub-negN/A

        \[\leadsto \frac{x \cdot \color{blue}{\left(y + \left(\mathsf{neg}\left(t \cdot z\right)\right)\right)}}{z} \]
      10. mul-1-negN/A

        \[\leadsto \frac{x \cdot \left(y + \color{blue}{-1 \cdot \left(t \cdot z\right)}\right)}{z} \]
      11. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y + -1 \cdot \left(t \cdot z\right)\right)}}{z} \]
      12. mul-1-negN/A

        \[\leadsto \frac{x \cdot \left(y + \color{blue}{\left(\mathsf{neg}\left(t \cdot z\right)\right)}\right)}{z} \]
      13. unsub-negN/A

        \[\leadsto \frac{x \cdot \color{blue}{\left(y - t \cdot z\right)}}{z} \]
      14. lower--.f64N/A

        \[\leadsto \frac{x \cdot \color{blue}{\left(y - t \cdot z\right)}}{z} \]
      15. lower-*.f6499.8

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

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

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

Alternative 3: 95.0% accurate, 0.9× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_1 := \frac{t + y}{z} \cdot x\_m\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -720000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-9}:\\ \;\;\;\;\frac{\left(y - t \cdot z\right) \cdot x\_m}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (* (/ (+ t y) z) x_m)))
   (*
    x_s
    (if (<= z -720000.0)
      t_1
      (if (<= z 1.15e-9) (/ (* (- y (* t z)) x_m) 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 + y) / z) * x_m;
	double tmp;
	if (z <= -720000.0) {
		tmp = t_1;
	} else if (z <= 1.15e-9) {
		tmp = ((y - (t * z)) * x_m) / z;
	} else {
		tmp = 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 + y) / z) * x_m
    if (z <= (-720000.0d0)) then
        tmp = t_1
    else if (z <= 1.15d-9) then
        tmp = ((y - (t * z)) * x_m) / z
    else
        tmp = 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 + y) / z) * x_m;
	double tmp;
	if (z <= -720000.0) {
		tmp = t_1;
	} else if (z <= 1.15e-9) {
		tmp = ((y - (t * z)) * x_m) / z;
	} else {
		tmp = 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 + y) / z) * x_m
	tmp = 0
	if z <= -720000.0:
		tmp = t_1
	elif z <= 1.15e-9:
		tmp = ((y - (t * z)) * x_m) / z
	else:
		tmp = 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(Float64(t + y) / z) * x_m)
	tmp = 0.0
	if (z <= -720000.0)
		tmp = t_1;
	elseif (z <= 1.15e-9)
		tmp = Float64(Float64(Float64(y - Float64(t * z)) * x_m) / z);
	else
		tmp = 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 + y) / z) * x_m;
	tmp = 0.0;
	if (z <= -720000.0)
		tmp = t_1;
	elseif (z <= 1.15e-9)
		tmp = ((y - (t * z)) * x_m) / z;
	else
		tmp = 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[(N[(t + y), $MachinePrecision] / z), $MachinePrecision] * x$95$m), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -720000.0], t$95$1, If[LessEqual[z, 1.15e-9], N[(N[(N[(y - N[(t * z), $MachinePrecision]), $MachinePrecision] * x$95$m), $MachinePrecision] / z), $MachinePrecision], t$95$1]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

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

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.2e5 or 1.15e-9 < z

    1. Initial program 96.4%

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

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto x \cdot \frac{\color{blue}{y + \left(\mathsf{neg}\left(-1\right)\right) \cdot t}}{z} \]
      3. metadata-evalN/A

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

        \[\leadsto x \cdot \frac{y + \color{blue}{t}}{z} \]
      5. +-commutativeN/A

        \[\leadsto x \cdot \frac{\color{blue}{t + y}}{z} \]
      6. lower-+.f6495.7

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

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

    if -7.2e5 < z < 1.15e-9

    1. Initial program 89.9%

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

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x \cdot z\right)\right) + x \cdot y}{z}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x \cdot z\right)\right) + x \cdot y}{z}} \]
      2. +-commutativeN/A

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

        \[\leadsto \frac{x \cdot y + \color{blue}{\left(\mathsf{neg}\left(t \cdot \left(x \cdot z\right)\right)\right)}}{z} \]
      4. unsub-negN/A

        \[\leadsto \frac{\color{blue}{x \cdot y - t \cdot \left(x \cdot z\right)}}{z} \]
      5. associate-*r*N/A

        \[\leadsto \frac{x \cdot y - \color{blue}{\left(t \cdot x\right) \cdot z}}{z} \]
      6. *-commutativeN/A

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

        \[\leadsto \frac{x \cdot y - \color{blue}{x \cdot \left(t \cdot z\right)}}{z} \]
      8. distribute-lft-out--N/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y - t \cdot z\right)}}{z} \]
      9. unsub-negN/A

        \[\leadsto \frac{x \cdot \color{blue}{\left(y + \left(\mathsf{neg}\left(t \cdot z\right)\right)\right)}}{z} \]
      10. mul-1-negN/A

        \[\leadsto \frac{x \cdot \left(y + \color{blue}{-1 \cdot \left(t \cdot z\right)}\right)}{z} \]
      11. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y + -1 \cdot \left(t \cdot z\right)\right)}}{z} \]
      12. mul-1-negN/A

        \[\leadsto \frac{x \cdot \left(y + \color{blue}{\left(\mathsf{neg}\left(t \cdot z\right)\right)}\right)}{z} \]
      13. unsub-negN/A

        \[\leadsto \frac{x \cdot \color{blue}{\left(y - t \cdot z\right)}}{z} \]
      14. lower--.f64N/A

        \[\leadsto \frac{x \cdot \color{blue}{\left(y - t \cdot z\right)}}{z} \]
      15. lower-*.f6493.2

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

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

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

Alternative 4: 93.2% accurate, 1.1× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_1 := \frac{t + y}{z} \cdot x\_m\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{+15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-20}:\\ \;\;\;\;\left(\frac{y}{z} - t\right) \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (* (/ (+ t y) z) x_m)))
   (*
    x_s
    (if (<= z -2.6e+15) t_1 (if (<= z 1.25e-20) (* (- (/ y z) t) 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 + y) / z) * x_m;
	double tmp;
	if (z <= -2.6e+15) {
		tmp = t_1;
	} else if (z <= 1.25e-20) {
		tmp = ((y / z) - t) * x_m;
	} else {
		tmp = 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 + y) / z) * x_m
    if (z <= (-2.6d+15)) then
        tmp = t_1
    else if (z <= 1.25d-20) then
        tmp = ((y / z) - t) * x_m
    else
        tmp = 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 + y) / z) * x_m;
	double tmp;
	if (z <= -2.6e+15) {
		tmp = t_1;
	} else if (z <= 1.25e-20) {
		tmp = ((y / z) - t) * x_m;
	} else {
		tmp = 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 + y) / z) * x_m
	tmp = 0
	if z <= -2.6e+15:
		tmp = t_1
	elif z <= 1.25e-20:
		tmp = ((y / z) - t) * x_m
	else:
		tmp = 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(Float64(t + y) / z) * x_m)
	tmp = 0.0
	if (z <= -2.6e+15)
		tmp = t_1;
	elseif (z <= 1.25e-20)
		tmp = Float64(Float64(Float64(y / z) - t) * x_m);
	else
		tmp = 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 + y) / z) * x_m;
	tmp = 0.0;
	if (z <= -2.6e+15)
		tmp = t_1;
	elseif (z <= 1.25e-20)
		tmp = ((y / z) - t) * x_m;
	else
		tmp = 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[(N[(t + y), $MachinePrecision] / z), $MachinePrecision] * x$95$m), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -2.6e+15], t$95$1, If[LessEqual[z, 1.25e-20], N[(N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision] * x$95$m), $MachinePrecision], t$95$1]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

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

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.6e15 or 1.25e-20 < z

    1. Initial program 96.3%

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

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto x \cdot \frac{\color{blue}{y + \left(\mathsf{neg}\left(-1\right)\right) \cdot t}}{z} \]
      3. metadata-evalN/A

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

        \[\leadsto x \cdot \frac{y + \color{blue}{t}}{z} \]
      5. +-commutativeN/A

        \[\leadsto x \cdot \frac{\color{blue}{t + y}}{z} \]
      6. lower-+.f6495.6

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

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

    if -2.6e15 < z < 1.25e-20

    1. Initial program 89.9%

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

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x \cdot z\right)\right) + x \cdot y}{z}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x \cdot z\right)\right) + x \cdot y}{z}} \]
      2. +-commutativeN/A

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

        \[\leadsto \frac{x \cdot y + \color{blue}{\left(\mathsf{neg}\left(t \cdot \left(x \cdot z\right)\right)\right)}}{z} \]
      4. unsub-negN/A

        \[\leadsto \frac{\color{blue}{x \cdot y - t \cdot \left(x \cdot z\right)}}{z} \]
      5. associate-*r*N/A

        \[\leadsto \frac{x \cdot y - \color{blue}{\left(t \cdot x\right) \cdot z}}{z} \]
      6. *-commutativeN/A

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

        \[\leadsto \frac{x \cdot y - \color{blue}{x \cdot \left(t \cdot z\right)}}{z} \]
      8. distribute-lft-out--N/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y - t \cdot z\right)}}{z} \]
      9. unsub-negN/A

        \[\leadsto \frac{x \cdot \color{blue}{\left(y + \left(\mathsf{neg}\left(t \cdot z\right)\right)\right)}}{z} \]
      10. mul-1-negN/A

        \[\leadsto \frac{x \cdot \left(y + \color{blue}{-1 \cdot \left(t \cdot z\right)}\right)}{z} \]
      11. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y + -1 \cdot \left(t \cdot z\right)\right)}}{z} \]
      12. mul-1-negN/A

        \[\leadsto \frac{x \cdot \left(y + \color{blue}{\left(\mathsf{neg}\left(t \cdot z\right)\right)}\right)}{z} \]
      13. unsub-negN/A

        \[\leadsto \frac{x \cdot \color{blue}{\left(y - t \cdot z\right)}}{z} \]
      14. lower--.f64N/A

        \[\leadsto \frac{x \cdot \color{blue}{\left(y - t \cdot z\right)}}{z} \]
      15. lower-*.f6493.3

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

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

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

        \[\leadsto \mathsf{fma}\left(-t, \color{blue}{x}, \frac{y}{z} \cdot x\right) \]
      2. Taylor expanded in x around 0

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

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

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

      Alternative 5: 74.3% accurate, 1.1× 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} \cdot x\_m\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{+15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 0.0045:\\ \;\;\;\;\left(\frac{y}{z} - t\right) \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
      x\_m = (fabs.f64 x)
      x\_s = (copysign.f64 #s(literal 1 binary64) x)
      (FPCore (x_s x_m y z t)
       :precision binary64
       (let* ((t_1 (* (/ t (- z 1.0)) x_m)))
         (*
          x_s
          (if (<= z -4.6e+15) t_1 (if (<= z 0.0045) (* (- (/ y z) t) 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)) * x_m;
      	double tmp;
      	if (z <= -4.6e+15) {
      		tmp = t_1;
      	} else if (z <= 0.0045) {
      		tmp = ((y / z) - t) * x_m;
      	} else {
      		tmp = 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 / (z - 1.0d0)) * x_m
          if (z <= (-4.6d+15)) then
              tmp = t_1
          else if (z <= 0.0045d0) then
              tmp = ((y / z) - t) * x_m
          else
              tmp = 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 / (z - 1.0)) * x_m;
      	double tmp;
      	if (z <= -4.6e+15) {
      		tmp = t_1;
      	} else if (z <= 0.0045) {
      		tmp = ((y / z) - t) * x_m;
      	} else {
      		tmp = 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)) * x_m
      	tmp = 0
      	if z <= -4.6e+15:
      		tmp = t_1
      	elif z <= 0.0045:
      		tmp = ((y / z) - t) * x_m
      	else:
      		tmp = 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(t / Float64(z - 1.0)) * x_m)
      	tmp = 0.0
      	if (z <= -4.6e+15)
      		tmp = t_1;
      	elseif (z <= 0.0045)
      		tmp = Float64(Float64(Float64(y / z) - t) * x_m);
      	else
      		tmp = 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)) * x_m;
      	tmp = 0.0;
      	if (z <= -4.6e+15)
      		tmp = t_1;
      	elseif (z <= 0.0045)
      		tmp = ((y / z) - t) * x_m;
      	else
      		tmp = 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[(t / N[(z - 1.0), $MachinePrecision]), $MachinePrecision] * x$95$m), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -4.6e+15], t$95$1, If[LessEqual[z, 0.0045], N[(N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision] * x$95$m), $MachinePrecision], t$95$1]]), $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} \cdot x\_m\\
      x\_s \cdot \begin{array}{l}
      \mathbf{if}\;z \leq -4.6 \cdot 10^{+15}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 0.0045:\\
      \;\;\;\;\left(\frac{y}{z} - t\right) \cdot x\_m\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -4.6e15 or 0.00449999999999999966 < z

        1. Initial program 96.3%

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

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

            \[\leadsto x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{t}{1 - z}\right)\right)} \]
          2. distribute-neg-frac2N/A

            \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
          3. lower-/.f64N/A

            \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
          4. sub-negN/A

            \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
          5. mul-1-negN/A

            \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\left(1 + \color{blue}{-1 \cdot z}\right)\right)} \]
          6. +-commutativeN/A

            \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(-1 \cdot z + 1\right)}\right)} \]
          7. distribute-neg-inN/A

            \[\leadsto x \cdot \frac{t}{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}} \]
          8. mul-1-negN/A

            \[\leadsto x \cdot \frac{t}{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(1\right)\right)} \]
          9. remove-double-negN/A

            \[\leadsto x \cdot \frac{t}{\color{blue}{z} + \left(\mathsf{neg}\left(1\right)\right)} \]
          10. sub-negN/A

            \[\leadsto x \cdot \frac{t}{\color{blue}{z - 1}} \]
          11. lower--.f6471.5

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

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

        if -4.6e15 < z < 0.00449999999999999966

        1. Initial program 90.1%

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

          \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x \cdot z\right)\right) + x \cdot y}{z}} \]
        4. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x \cdot z\right)\right) + x \cdot y}{z}} \]
          2. +-commutativeN/A

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

            \[\leadsto \frac{x \cdot y + \color{blue}{\left(\mathsf{neg}\left(t \cdot \left(x \cdot z\right)\right)\right)}}{z} \]
          4. unsub-negN/A

            \[\leadsto \frac{\color{blue}{x \cdot y - t \cdot \left(x \cdot z\right)}}{z} \]
          5. associate-*r*N/A

            \[\leadsto \frac{x \cdot y - \color{blue}{\left(t \cdot x\right) \cdot z}}{z} \]
          6. *-commutativeN/A

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

            \[\leadsto \frac{x \cdot y - \color{blue}{x \cdot \left(t \cdot z\right)}}{z} \]
          8. distribute-lft-out--N/A

            \[\leadsto \frac{\color{blue}{x \cdot \left(y - t \cdot z\right)}}{z} \]
          9. unsub-negN/A

            \[\leadsto \frac{x \cdot \color{blue}{\left(y + \left(\mathsf{neg}\left(t \cdot z\right)\right)\right)}}{z} \]
          10. mul-1-negN/A

            \[\leadsto \frac{x \cdot \left(y + \color{blue}{-1 \cdot \left(t \cdot z\right)}\right)}{z} \]
          11. lower-*.f64N/A

            \[\leadsto \frac{\color{blue}{x \cdot \left(y + -1 \cdot \left(t \cdot z\right)\right)}}{z} \]
          12. mul-1-negN/A

            \[\leadsto \frac{x \cdot \left(y + \color{blue}{\left(\mathsf{neg}\left(t \cdot z\right)\right)}\right)}{z} \]
          13. unsub-negN/A

            \[\leadsto \frac{x \cdot \color{blue}{\left(y - t \cdot z\right)}}{z} \]
          14. lower--.f64N/A

            \[\leadsto \frac{x \cdot \color{blue}{\left(y - t \cdot z\right)}}{z} \]
          15. lower-*.f6493.4

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

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

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

            \[\leadsto \mathsf{fma}\left(-t, \color{blue}{x}, \frac{y}{z} \cdot x\right) \]
          2. Taylor expanded in x around 0

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

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

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

          Alternative 6: 74.2% accurate, 1.1× 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} \cdot x\_m\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{+15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 60000000:\\ \;\;\;\;\left(\frac{y}{z} - t\right) \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
          x\_m = (fabs.f64 x)
          x\_s = (copysign.f64 #s(literal 1 binary64) x)
          (FPCore (x_s x_m y z t)
           :precision binary64
           (let* ((t_1 (* (/ t z) x_m)))
             (*
              x_s
              (if (<= z -4.6e+15)
                t_1
                (if (<= z 60000000.0) (* (- (/ y z) t) 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) * x_m;
          	double tmp;
          	if (z <= -4.6e+15) {
          		tmp = t_1;
          	} else if (z <= 60000000.0) {
          		tmp = ((y / z) - t) * x_m;
          	} else {
          		tmp = 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 / z) * x_m
              if (z <= (-4.6d+15)) then
                  tmp = t_1
              else if (z <= 60000000.0d0) then
                  tmp = ((y / z) - t) * x_m
              else
                  tmp = 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 / z) * x_m;
          	double tmp;
          	if (z <= -4.6e+15) {
          		tmp = t_1;
          	} else if (z <= 60000000.0) {
          		tmp = ((y / z) - t) * x_m;
          	} else {
          		tmp = 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) * x_m
          	tmp = 0
          	if z <= -4.6e+15:
          		tmp = t_1
          	elif z <= 60000000.0:
          		tmp = ((y / z) - t) * x_m
          	else:
          		tmp = 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(t / z) * x_m)
          	tmp = 0.0
          	if (z <= -4.6e+15)
          		tmp = t_1;
          	elseif (z <= 60000000.0)
          		tmp = Float64(Float64(Float64(y / z) - t) * x_m);
          	else
          		tmp = 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) * x_m;
          	tmp = 0.0;
          	if (z <= -4.6e+15)
          		tmp = t_1;
          	elseif (z <= 60000000.0)
          		tmp = ((y / z) - t) * x_m;
          	else
          		tmp = 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[(t / z), $MachinePrecision] * x$95$m), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -4.6e+15], t$95$1, If[LessEqual[z, 60000000.0], N[(N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision] * x$95$m), $MachinePrecision], t$95$1]]), $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} \cdot x\_m\\
          x\_s \cdot \begin{array}{l}
          \mathbf{if}\;z \leq -4.6 \cdot 10^{+15}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;z \leq 60000000:\\
          \;\;\;\;\left(\frac{y}{z} - t\right) \cdot x\_m\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -4.6e15 or 6e7 < z

            1. Initial program 96.3%

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

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

                \[\leadsto x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{t}{1 - z}\right)\right)} \]
              2. distribute-neg-frac2N/A

                \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
              3. lower-/.f64N/A

                \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
              4. sub-negN/A

                \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
              5. mul-1-negN/A

                \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\left(1 + \color{blue}{-1 \cdot z}\right)\right)} \]
              6. +-commutativeN/A

                \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(-1 \cdot z + 1\right)}\right)} \]
              7. distribute-neg-inN/A

                \[\leadsto x \cdot \frac{t}{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}} \]
              8. mul-1-negN/A

                \[\leadsto x \cdot \frac{t}{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(1\right)\right)} \]
              9. remove-double-negN/A

                \[\leadsto x \cdot \frac{t}{\color{blue}{z} + \left(\mathsf{neg}\left(1\right)\right)} \]
              10. sub-negN/A

                \[\leadsto x \cdot \frac{t}{\color{blue}{z - 1}} \]
              11. lower--.f6471.5

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

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

              \[\leadsto x \cdot \frac{t}{\color{blue}{z}} \]
            7. Step-by-step derivation
              1. Applied rewrites70.7%

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

              if -4.6e15 < z < 6e7

              1. Initial program 90.1%

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

                \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x \cdot z\right)\right) + x \cdot y}{z}} \]
              4. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x \cdot z\right)\right) + x \cdot y}{z}} \]
                2. +-commutativeN/A

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

                  \[\leadsto \frac{x \cdot y + \color{blue}{\left(\mathsf{neg}\left(t \cdot \left(x \cdot z\right)\right)\right)}}{z} \]
                4. unsub-negN/A

                  \[\leadsto \frac{\color{blue}{x \cdot y - t \cdot \left(x \cdot z\right)}}{z} \]
                5. associate-*r*N/A

                  \[\leadsto \frac{x \cdot y - \color{blue}{\left(t \cdot x\right) \cdot z}}{z} \]
                6. *-commutativeN/A

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

                  \[\leadsto \frac{x \cdot y - \color{blue}{x \cdot \left(t \cdot z\right)}}{z} \]
                8. distribute-lft-out--N/A

                  \[\leadsto \frac{\color{blue}{x \cdot \left(y - t \cdot z\right)}}{z} \]
                9. unsub-negN/A

                  \[\leadsto \frac{x \cdot \color{blue}{\left(y + \left(\mathsf{neg}\left(t \cdot z\right)\right)\right)}}{z} \]
                10. mul-1-negN/A

                  \[\leadsto \frac{x \cdot \left(y + \color{blue}{-1 \cdot \left(t \cdot z\right)}\right)}{z} \]
                11. lower-*.f64N/A

                  \[\leadsto \frac{\color{blue}{x \cdot \left(y + -1 \cdot \left(t \cdot z\right)\right)}}{z} \]
                12. mul-1-negN/A

                  \[\leadsto \frac{x \cdot \left(y + \color{blue}{\left(\mathsf{neg}\left(t \cdot z\right)\right)}\right)}{z} \]
                13. unsub-negN/A

                  \[\leadsto \frac{x \cdot \color{blue}{\left(y - t \cdot z\right)}}{z} \]
                14. lower--.f64N/A

                  \[\leadsto \frac{x \cdot \color{blue}{\left(y - t \cdot z\right)}}{z} \]
                15. lower-*.f6493.4

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

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

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

                  \[\leadsto \mathsf{fma}\left(-t, \color{blue}{x}, \frac{y}{z} \cdot x\right) \]
                2. Taylor expanded in x around 0

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

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

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

                Alternative 7: 73.1% accurate, 1.1× speedup?

                \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_1 := \frac{y \cdot x\_m}{z}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -2.6 \cdot 10^{-108}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 115000000:\\ \;\;\;\;\frac{x\_m}{z - 1} \cdot t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
                x\_m = (fabs.f64 x)
                x\_s = (copysign.f64 #s(literal 1 binary64) x)
                (FPCore (x_s x_m y z t)
                 :precision binary64
                 (let* ((t_1 (/ (* y x_m) z)))
                   (*
                    x_s
                    (if (<= y -2.6e-108)
                      t_1
                      (if (<= y 115000000.0) (* (/ x_m (- z 1.0)) t) 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 * x_m) / z;
                	double tmp;
                	if (y <= -2.6e-108) {
                		tmp = t_1;
                	} else if (y <= 115000000.0) {
                		tmp = (x_m / (z - 1.0)) * t;
                	} else {
                		tmp = 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 = (y * x_m) / z
                    if (y <= (-2.6d-108)) then
                        tmp = t_1
                    else if (y <= 115000000.0d0) then
                        tmp = (x_m / (z - 1.0d0)) * t
                    else
                        tmp = 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 = (y * x_m) / z;
                	double tmp;
                	if (y <= -2.6e-108) {
                		tmp = t_1;
                	} else if (y <= 115000000.0) {
                		tmp = (x_m / (z - 1.0)) * t;
                	} else {
                		tmp = 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 * x_m) / z
                	tmp = 0
                	if y <= -2.6e-108:
                		tmp = t_1
                	elif y <= 115000000.0:
                		tmp = (x_m / (z - 1.0)) * t
                	else:
                		tmp = 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 * x_m) / z)
                	tmp = 0.0
                	if (y <= -2.6e-108)
                		tmp = t_1;
                	elseif (y <= 115000000.0)
                		tmp = Float64(Float64(x_m / Float64(z - 1.0)) * t);
                	else
                		tmp = 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 * x_m) / z;
                	tmp = 0.0;
                	if (y <= -2.6e-108)
                		tmp = t_1;
                	elseif (y <= 115000000.0)
                		tmp = (x_m / (z - 1.0)) * t;
                	else
                		tmp = 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 * x$95$m), $MachinePrecision] / z), $MachinePrecision]}, N[(x$95$s * If[LessEqual[y, -2.6e-108], t$95$1, If[LessEqual[y, 115000000.0], N[(N[(x$95$m / N[(z - 1.0), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], t$95$1]]), $MachinePrecision]]
                
                \begin{array}{l}
                x\_m = \left|x\right|
                \\
                x\_s = \mathsf{copysign}\left(1, x\right)
                
                \\
                \begin{array}{l}
                t_1 := \frac{y \cdot x\_m}{z}\\
                x\_s \cdot \begin{array}{l}
                \mathbf{if}\;y \leq -2.6 \cdot 10^{-108}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;y \leq 115000000:\\
                \;\;\;\;\frac{x\_m}{z - 1} \cdot t\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if y < -2.59999999999999984e-108 or 1.15e8 < y

                  1. Initial program 89.8%

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

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

                      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
                    2. *-commutativeN/A

                      \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
                    3. lower-*.f64N/A

                      \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
                    4. lower-/.f6471.1

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

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

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

                    if -2.59999999999999984e-108 < y < 1.15e8

                    1. Initial program 96.5%

                      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
                    2. Add Preprocessing
                    3. Step-by-step derivation
                      1. lift-/.f64N/A

                        \[\leadsto x \cdot \left(\color{blue}{\frac{y}{z}} - \frac{t}{1 - z}\right) \]
                      2. clear-numN/A

                        \[\leadsto x \cdot \left(\color{blue}{\frac{1}{\frac{z}{y}}} - \frac{t}{1 - z}\right) \]
                      3. lower-/.f64N/A

                        \[\leadsto x \cdot \left(\color{blue}{\frac{1}{\frac{z}{y}}} - \frac{t}{1 - z}\right) \]
                      4. lower-/.f6496.5

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

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

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

                        \[\leadsto \color{blue}{\left(-1 \cdot \frac{t \cdot x}{y \cdot \left(1 - z\right)} + \frac{x}{z}\right) \cdot y} \]
                      2. +-commutativeN/A

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

                        \[\leadsto \left(\frac{x}{z} + \color{blue}{\left(\mathsf{neg}\left(\frac{t \cdot x}{y \cdot \left(1 - z\right)}\right)\right)}\right) \cdot y \]
                      4. associate-/r*N/A

                        \[\leadsto \left(\frac{x}{z} + \left(\mathsf{neg}\left(\color{blue}{\frac{\frac{t \cdot x}{y}}{1 - z}}\right)\right)\right) \cdot y \]
                      5. distribute-neg-frac2N/A

                        \[\leadsto \left(\frac{x}{z} + \color{blue}{\frac{\frac{t \cdot x}{y}}{\mathsf{neg}\left(\left(1 - z\right)\right)}}\right) \cdot y \]
                      6. sub-negN/A

                        \[\leadsto \left(\frac{x}{z} + \frac{\frac{t \cdot x}{y}}{\mathsf{neg}\left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)}\right) \cdot y \]
                      7. mul-1-negN/A

                        \[\leadsto \left(\frac{x}{z} + \frac{\frac{t \cdot x}{y}}{\mathsf{neg}\left(\left(1 + \color{blue}{-1 \cdot z}\right)\right)}\right) \cdot y \]
                      8. +-commutativeN/A

                        \[\leadsto \left(\frac{x}{z} + \frac{\frac{t \cdot x}{y}}{\mathsf{neg}\left(\color{blue}{\left(-1 \cdot z + 1\right)}\right)}\right) \cdot y \]
                      9. distribute-neg-inN/A

                        \[\leadsto \left(\frac{x}{z} + \frac{\frac{t \cdot x}{y}}{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}}\right) \cdot y \]
                      10. mul-1-negN/A

                        \[\leadsto \left(\frac{x}{z} + \frac{\frac{t \cdot x}{y}}{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}\right) \cdot y \]
                      11. remove-double-negN/A

                        \[\leadsto \left(\frac{x}{z} + \frac{\frac{t \cdot x}{y}}{\color{blue}{z} + \left(\mathsf{neg}\left(1\right)\right)}\right) \cdot y \]
                      12. sub-negN/A

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

                        \[\leadsto \left(\frac{x}{z} + \color{blue}{\frac{t \cdot x}{y \cdot \left(z - 1\right)}}\right) \cdot y \]
                      14. lower-*.f64N/A

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(x, \frac{\frac{t}{z - 1}}{y}, \frac{x}{z}\right) \cdot y} \]
                    8. Taylor expanded in y around 0

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

                        \[\leadsto \frac{x}{z - 1} \cdot \color{blue}{t} \]
                    10. Recombined 2 regimes into one program.
                    11. Final simplification73.9%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.6 \cdot 10^{-108}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;y \leq 115000000:\\ \;\;\;\;\frac{x}{z - 1} \cdot t\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \end{array} \]
                    12. Add Preprocessing

                    Alternative 8: 68.0% accurate, 1.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} \cdot x\_m\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{+79}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.66 \cdot 10^{+97}:\\ \;\;\;\;\frac{y \cdot x\_m}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
                    x\_m = (fabs.f64 x)
                    x\_s = (copysign.f64 #s(literal 1 binary64) x)
                    (FPCore (x_s x_m y z t)
                     :precision binary64
                     (let* ((t_1 (* (/ t z) x_m)))
                       (* x_s (if (<= t -1.5e+79) t_1 (if (<= t 1.66e+97) (/ (* y x_m) 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 / z) * x_m;
                    	double tmp;
                    	if (t <= -1.5e+79) {
                    		tmp = t_1;
                    	} else if (t <= 1.66e+97) {
                    		tmp = (y * x_m) / z;
                    	} else {
                    		tmp = 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 / z) * x_m
                        if (t <= (-1.5d+79)) then
                            tmp = t_1
                        else if (t <= 1.66d+97) then
                            tmp = (y * x_m) / z
                        else
                            tmp = 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 / z) * x_m;
                    	double tmp;
                    	if (t <= -1.5e+79) {
                    		tmp = t_1;
                    	} else if (t <= 1.66e+97) {
                    		tmp = (y * x_m) / z;
                    	} else {
                    		tmp = 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) * x_m
                    	tmp = 0
                    	if t <= -1.5e+79:
                    		tmp = t_1
                    	elif t <= 1.66e+97:
                    		tmp = (y * x_m) / z
                    	else:
                    		tmp = 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(t / z) * x_m)
                    	tmp = 0.0
                    	if (t <= -1.5e+79)
                    		tmp = t_1;
                    	elseif (t <= 1.66e+97)
                    		tmp = Float64(Float64(y * x_m) / z);
                    	else
                    		tmp = 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) * x_m;
                    	tmp = 0.0;
                    	if (t <= -1.5e+79)
                    		tmp = t_1;
                    	elseif (t <= 1.66e+97)
                    		tmp = (y * x_m) / z;
                    	else
                    		tmp = 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[(t / z), $MachinePrecision] * x$95$m), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t, -1.5e+79], t$95$1, If[LessEqual[t, 1.66e+97], N[(N[(y * x$95$m), $MachinePrecision] / z), $MachinePrecision], t$95$1]]), $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} \cdot x\_m\\
                    x\_s \cdot \begin{array}{l}
                    \mathbf{if}\;t \leq -1.5 \cdot 10^{+79}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;t \leq 1.66 \cdot 10^{+97}:\\
                    \;\;\;\;\frac{y \cdot x\_m}{z}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if t < -1.49999999999999987e79 or 1.6599999999999999e97 < t

                      1. Initial program 93.4%

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

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

                          \[\leadsto x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{t}{1 - z}\right)\right)} \]
                        2. distribute-neg-frac2N/A

                          \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
                        3. lower-/.f64N/A

                          \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
                        4. sub-negN/A

                          \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
                        5. mul-1-negN/A

                          \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\left(1 + \color{blue}{-1 \cdot z}\right)\right)} \]
                        6. +-commutativeN/A

                          \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(-1 \cdot z + 1\right)}\right)} \]
                        7. distribute-neg-inN/A

                          \[\leadsto x \cdot \frac{t}{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}} \]
                        8. mul-1-negN/A

                          \[\leadsto x \cdot \frac{t}{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(1\right)\right)} \]
                        9. remove-double-negN/A

                          \[\leadsto x \cdot \frac{t}{\color{blue}{z} + \left(\mathsf{neg}\left(1\right)\right)} \]
                        10. sub-negN/A

                          \[\leadsto x \cdot \frac{t}{\color{blue}{z - 1}} \]
                        11. lower--.f6475.1

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

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

                        \[\leadsto x \cdot \frac{t}{\color{blue}{z}} \]
                      7. Step-by-step derivation
                        1. Applied rewrites62.3%

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

                        if -1.49999999999999987e79 < t < 1.6599999999999999e97

                        1. Initial program 92.5%

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

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

                            \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
                          2. *-commutativeN/A

                            \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
                          3. lower-*.f64N/A

                            \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
                          4. lower-/.f6474.9

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

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

                            \[\leadsto \frac{x \cdot y}{\color{blue}{z}} \]
                        7. Recombined 2 regimes into one program.
                        8. Final simplification70.6%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{+79}:\\ \;\;\;\;\frac{t}{z} \cdot x\\ \mathbf{elif}\;t \leq 1.66 \cdot 10^{+97}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{z} \cdot x\\ \end{array} \]
                        9. Add Preprocessing

                        Alternative 9: 60.6% accurate, 1.2× 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}{z} \cdot t\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{+15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 330000000:\\ \;\;\;\;\frac{y \cdot x\_m}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
                        x\_m = (fabs.f64 x)
                        x\_s = (copysign.f64 #s(literal 1 binary64) x)
                        (FPCore (x_s x_m y z t)
                         :precision binary64
                         (let* ((t_1 (* (/ x_m z) t)))
                           (*
                            x_s
                            (if (<= z -4.6e+15) t_1 (if (<= z 330000000.0) (/ (* y x_m) 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 = (x_m / z) * t;
                        	double tmp;
                        	if (z <= -4.6e+15) {
                        		tmp = t_1;
                        	} else if (z <= 330000000.0) {
                        		tmp = (y * x_m) / z;
                        	} else {
                        		tmp = 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 = (x_m / z) * t
                            if (z <= (-4.6d+15)) then
                                tmp = t_1
                            else if (z <= 330000000.0d0) then
                                tmp = (y * x_m) / z
                            else
                                tmp = 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 = (x_m / z) * t;
                        	double tmp;
                        	if (z <= -4.6e+15) {
                        		tmp = t_1;
                        	} else if (z <= 330000000.0) {
                        		tmp = (y * x_m) / z;
                        	} else {
                        		tmp = 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 = (x_m / z) * t
                        	tmp = 0
                        	if z <= -4.6e+15:
                        		tmp = t_1
                        	elif z <= 330000000.0:
                        		tmp = (y * x_m) / z
                        	else:
                        		tmp = 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(x_m / z) * t)
                        	tmp = 0.0
                        	if (z <= -4.6e+15)
                        		tmp = t_1;
                        	elseif (z <= 330000000.0)
                        		tmp = Float64(Float64(y * x_m) / z);
                        	else
                        		tmp = 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 = (x_m / z) * t;
                        	tmp = 0.0;
                        	if (z <= -4.6e+15)
                        		tmp = t_1;
                        	elseif (z <= 330000000.0)
                        		tmp = (y * x_m) / z;
                        	else
                        		tmp = 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[(x$95$m / z), $MachinePrecision] * t), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -4.6e+15], t$95$1, If[LessEqual[z, 330000000.0], N[(N[(y * x$95$m), $MachinePrecision] / z), $MachinePrecision], t$95$1]]), $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}{z} \cdot t\\
                        x\_s \cdot \begin{array}{l}
                        \mathbf{if}\;z \leq -4.6 \cdot 10^{+15}:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{elif}\;z \leq 330000000:\\
                        \;\;\;\;\frac{y \cdot x\_m}{z}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_1\\
                        
                        
                        \end{array}
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if z < -4.6e15 or 3.3e8 < z

                          1. Initial program 96.3%

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

                            \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{1 - z}} \]
                          4. Step-by-step derivation
                            1. mul-1-negN/A

                              \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{t \cdot x}{1 - z}\right)} \]
                            2. distribute-neg-frac2N/A

                              \[\leadsto \color{blue}{\frac{t \cdot x}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
                            3. lower-/.f64N/A

                              \[\leadsto \color{blue}{\frac{t \cdot x}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
                            4. lower-*.f64N/A

                              \[\leadsto \frac{\color{blue}{t \cdot x}}{\mathsf{neg}\left(\left(1 - z\right)\right)} \]
                            5. sub-negN/A

                              \[\leadsto \frac{t \cdot x}{\mathsf{neg}\left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
                            6. mul-1-negN/A

                              \[\leadsto \frac{t \cdot x}{\mathsf{neg}\left(\left(1 + \color{blue}{-1 \cdot z}\right)\right)} \]
                            7. +-commutativeN/A

                              \[\leadsto \frac{t \cdot x}{\mathsf{neg}\left(\color{blue}{\left(-1 \cdot z + 1\right)}\right)} \]
                            8. distribute-neg-inN/A

                              \[\leadsto \frac{t \cdot x}{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}} \]
                            9. mul-1-negN/A

                              \[\leadsto \frac{t \cdot x}{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(1\right)\right)} \]
                            10. remove-double-negN/A

                              \[\leadsto \frac{t \cdot x}{\color{blue}{z} + \left(\mathsf{neg}\left(1\right)\right)} \]
                            11. sub-negN/A

                              \[\leadsto \frac{t \cdot x}{\color{blue}{z - 1}} \]
                            12. lower--.f6463.0

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

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

                            \[\leadsto \frac{t \cdot x}{\color{blue}{z}} \]
                          7. Step-by-step derivation
                            1. Applied rewrites66.5%

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

                            if -4.6e15 < z < 3.3e8

                            1. Initial program 90.1%

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

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

                                \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
                              2. *-commutativeN/A

                                \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
                              3. lower-*.f64N/A

                                \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
                              4. lower-/.f6464.6

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

                              \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
                            6. Step-by-step derivation
                              1. Applied rewrites69.7%

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{+15}:\\ \;\;\;\;\frac{x}{z} \cdot t\\ \mathbf{elif}\;z \leq 330000000:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot t\\ \end{array} \]
                            9. Add Preprocessing

                            Alternative 10: 61.4% accurate, 1.2× 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}{z} \cdot t\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 330000000:\\ \;\;\;\;\frac{x\_m}{z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
                            x\_m = (fabs.f64 x)
                            x\_s = (copysign.f64 #s(literal 1 binary64) x)
                            (FPCore (x_s x_m y z t)
                             :precision binary64
                             (let* ((t_1 (* (/ x_m z) t)))
                               (*
                                x_s
                                (if (<= z -4.2e+15) t_1 (if (<= z 330000000.0) (* (/ x_m z) y) 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 = (x_m / z) * t;
                            	double tmp;
                            	if (z <= -4.2e+15) {
                            		tmp = t_1;
                            	} else if (z <= 330000000.0) {
                            		tmp = (x_m / z) * y;
                            	} else {
                            		tmp = 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 = (x_m / z) * t
                                if (z <= (-4.2d+15)) then
                                    tmp = t_1
                                else if (z <= 330000000.0d0) then
                                    tmp = (x_m / z) * y
                                else
                                    tmp = 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 = (x_m / z) * t;
                            	double tmp;
                            	if (z <= -4.2e+15) {
                            		tmp = t_1;
                            	} else if (z <= 330000000.0) {
                            		tmp = (x_m / z) * y;
                            	} else {
                            		tmp = 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 = (x_m / z) * t
                            	tmp = 0
                            	if z <= -4.2e+15:
                            		tmp = t_1
                            	elif z <= 330000000.0:
                            		tmp = (x_m / z) * y
                            	else:
                            		tmp = 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(x_m / z) * t)
                            	tmp = 0.0
                            	if (z <= -4.2e+15)
                            		tmp = t_1;
                            	elseif (z <= 330000000.0)
                            		tmp = Float64(Float64(x_m / z) * y);
                            	else
                            		tmp = 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 = (x_m / z) * t;
                            	tmp = 0.0;
                            	if (z <= -4.2e+15)
                            		tmp = t_1;
                            	elseif (z <= 330000000.0)
                            		tmp = (x_m / z) * y;
                            	else
                            		tmp = 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[(x$95$m / z), $MachinePrecision] * t), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -4.2e+15], t$95$1, If[LessEqual[z, 330000000.0], N[(N[(x$95$m / z), $MachinePrecision] * y), $MachinePrecision], t$95$1]]), $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}{z} \cdot t\\
                            x\_s \cdot \begin{array}{l}
                            \mathbf{if}\;z \leq -4.2 \cdot 10^{+15}:\\
                            \;\;\;\;t\_1\\
                            
                            \mathbf{elif}\;z \leq 330000000:\\
                            \;\;\;\;\frac{x\_m}{z} \cdot y\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_1\\
                            
                            
                            \end{array}
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if z < -4.2e15 or 3.3e8 < z

                              1. Initial program 96.3%

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

                                \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{1 - z}} \]
                              4. Step-by-step derivation
                                1. mul-1-negN/A

                                  \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{t \cdot x}{1 - z}\right)} \]
                                2. distribute-neg-frac2N/A

                                  \[\leadsto \color{blue}{\frac{t \cdot x}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
                                3. lower-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{t \cdot x}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
                                4. lower-*.f64N/A

                                  \[\leadsto \frac{\color{blue}{t \cdot x}}{\mathsf{neg}\left(\left(1 - z\right)\right)} \]
                                5. sub-negN/A

                                  \[\leadsto \frac{t \cdot x}{\mathsf{neg}\left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
                                6. mul-1-negN/A

                                  \[\leadsto \frac{t \cdot x}{\mathsf{neg}\left(\left(1 + \color{blue}{-1 \cdot z}\right)\right)} \]
                                7. +-commutativeN/A

                                  \[\leadsto \frac{t \cdot x}{\mathsf{neg}\left(\color{blue}{\left(-1 \cdot z + 1\right)}\right)} \]
                                8. distribute-neg-inN/A

                                  \[\leadsto \frac{t \cdot x}{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}} \]
                                9. mul-1-negN/A

                                  \[\leadsto \frac{t \cdot x}{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(1\right)\right)} \]
                                10. remove-double-negN/A

                                  \[\leadsto \frac{t \cdot x}{\color{blue}{z} + \left(\mathsf{neg}\left(1\right)\right)} \]
                                11. sub-negN/A

                                  \[\leadsto \frac{t \cdot x}{\color{blue}{z - 1}} \]
                                12. lower--.f6463.0

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

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

                                \[\leadsto \frac{t \cdot x}{\color{blue}{z}} \]
                              7. Step-by-step derivation
                                1. Applied rewrites66.5%

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

                                if -4.2e15 < z < 3.3e8

                                1. Initial program 90.1%

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

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

                                    \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
                                  2. *-commutativeN/A

                                    \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
                                  3. lower-*.f64N/A

                                    \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
                                  4. lower-/.f6464.6

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

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

                                    \[\leadsto \frac{x}{z} \cdot \color{blue}{y} \]
                                7. Recombined 2 regimes into one program.
                                8. Add Preprocessing

                                Alternative 11: 39.9% accurate, 1.2× 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}{z} \cdot t\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq 2.25 \cdot 10^{-274}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;\left(\left(-1 - z\right) \cdot x\_m\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
                                x\_m = (fabs.f64 x)
                                x\_s = (copysign.f64 #s(literal 1 binary64) x)
                                (FPCore (x_s x_m y z t)
                                 :precision binary64
                                 (let* ((t_1 (* (/ x_m z) t)))
                                   (*
                                    x_s
                                    (if (<= z 2.25e-274) t_1 (if (<= z 1.0) (* (* (- -1.0 z) x_m) t) 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 = (x_m / z) * t;
                                	double tmp;
                                	if (z <= 2.25e-274) {
                                		tmp = t_1;
                                	} else if (z <= 1.0) {
                                		tmp = ((-1.0 - z) * x_m) * t;
                                	} else {
                                		tmp = 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 = (x_m / z) * t
                                    if (z <= 2.25d-274) then
                                        tmp = t_1
                                    else if (z <= 1.0d0) then
                                        tmp = (((-1.0d0) - z) * x_m) * t
                                    else
                                        tmp = 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 = (x_m / z) * t;
                                	double tmp;
                                	if (z <= 2.25e-274) {
                                		tmp = t_1;
                                	} else if (z <= 1.0) {
                                		tmp = ((-1.0 - z) * x_m) * t;
                                	} else {
                                		tmp = 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 = (x_m / z) * t
                                	tmp = 0
                                	if z <= 2.25e-274:
                                		tmp = t_1
                                	elif z <= 1.0:
                                		tmp = ((-1.0 - z) * x_m) * t
                                	else:
                                		tmp = 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(x_m / z) * t)
                                	tmp = 0.0
                                	if (z <= 2.25e-274)
                                		tmp = t_1;
                                	elseif (z <= 1.0)
                                		tmp = Float64(Float64(Float64(-1.0 - z) * x_m) * t);
                                	else
                                		tmp = 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 = (x_m / z) * t;
                                	tmp = 0.0;
                                	if (z <= 2.25e-274)
                                		tmp = t_1;
                                	elseif (z <= 1.0)
                                		tmp = ((-1.0 - z) * x_m) * t;
                                	else
                                		tmp = 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[(x$95$m / z), $MachinePrecision] * t), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, 2.25e-274], t$95$1, If[LessEqual[z, 1.0], N[(N[(N[(-1.0 - z), $MachinePrecision] * x$95$m), $MachinePrecision] * t), $MachinePrecision], t$95$1]]), $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}{z} \cdot t\\
                                x\_s \cdot \begin{array}{l}
                                \mathbf{if}\;z \leq 2.25 \cdot 10^{-274}:\\
                                \;\;\;\;t\_1\\
                                
                                \mathbf{elif}\;z \leq 1:\\
                                \;\;\;\;\left(\left(-1 - z\right) \cdot x\_m\right) \cdot t\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;t\_1\\
                                
                                
                                \end{array}
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if z < 2.24999999999999996e-274 or 1 < z

                                  1. Initial program 93.0%

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

                                    \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{1 - z}} \]
                                  4. Step-by-step derivation
                                    1. mul-1-negN/A

                                      \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{t \cdot x}{1 - z}\right)} \]
                                    2. distribute-neg-frac2N/A

                                      \[\leadsto \color{blue}{\frac{t \cdot x}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
                                    3. lower-/.f64N/A

                                      \[\leadsto \color{blue}{\frac{t \cdot x}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
                                    4. lower-*.f64N/A

                                      \[\leadsto \frac{\color{blue}{t \cdot x}}{\mathsf{neg}\left(\left(1 - z\right)\right)} \]
                                    5. sub-negN/A

                                      \[\leadsto \frac{t \cdot x}{\mathsf{neg}\left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
                                    6. mul-1-negN/A

                                      \[\leadsto \frac{t \cdot x}{\mathsf{neg}\left(\left(1 + \color{blue}{-1 \cdot z}\right)\right)} \]
                                    7. +-commutativeN/A

                                      \[\leadsto \frac{t \cdot x}{\mathsf{neg}\left(\color{blue}{\left(-1 \cdot z + 1\right)}\right)} \]
                                    8. distribute-neg-inN/A

                                      \[\leadsto \frac{t \cdot x}{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}} \]
                                    9. mul-1-negN/A

                                      \[\leadsto \frac{t \cdot x}{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(1\right)\right)} \]
                                    10. remove-double-negN/A

                                      \[\leadsto \frac{t \cdot x}{\color{blue}{z} + \left(\mathsf{neg}\left(1\right)\right)} \]
                                    11. sub-negN/A

                                      \[\leadsto \frac{t \cdot x}{\color{blue}{z - 1}} \]
                                    12. lower--.f6446.5

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

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

                                    \[\leadsto \frac{t \cdot x}{\color{blue}{z}} \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites48.5%

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

                                    if 2.24999999999999996e-274 < z < 1

                                    1. Initial program 92.2%

                                      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
                                    2. Add Preprocessing
                                    3. Step-by-step derivation
                                      1. lift-*.f64N/A

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

                                        \[\leadsto \color{blue}{\left(\frac{y}{z} - \frac{t}{1 - z}\right) \cdot x} \]
                                      3. lift--.f64N/A

                                        \[\leadsto \color{blue}{\left(\frac{y}{z} - \frac{t}{1 - z}\right)} \cdot x \]
                                      4. lift-/.f64N/A

                                        \[\leadsto \left(\color{blue}{\frac{y}{z}} - \frac{t}{1 - z}\right) \cdot x \]
                                      5. lift-/.f64N/A

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

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

                                        \[\leadsto \color{blue}{\frac{\left(y \cdot \left(1 - z\right) - z \cdot t\right) \cdot x}{z \cdot \left(1 - z\right)}} \]
                                      8. *-commutativeN/A

                                        \[\leadsto \frac{\left(y \cdot \left(1 - z\right) - z \cdot t\right) \cdot x}{\color{blue}{\left(1 - z\right) \cdot z}} \]
                                      9. times-fracN/A

                                        \[\leadsto \color{blue}{\frac{y \cdot \left(1 - z\right) - z \cdot t}{1 - z} \cdot \frac{x}{z}} \]
                                      10. lower-*.f64N/A

                                        \[\leadsto \color{blue}{\frac{y \cdot \left(1 - z\right) - z \cdot t}{1 - z} \cdot \frac{x}{z}} \]
                                      11. lower-/.f64N/A

                                        \[\leadsto \color{blue}{\frac{y \cdot \left(1 - z\right) - z \cdot t}{1 - z}} \cdot \frac{x}{z} \]
                                      12. cancel-sign-sub-invN/A

                                        \[\leadsto \frac{\color{blue}{y \cdot \left(1 - z\right) + \left(\mathsf{neg}\left(z\right)\right) \cdot t}}{1 - z} \cdot \frac{x}{z} \]
                                      13. *-commutativeN/A

                                        \[\leadsto \frac{\color{blue}{\left(1 - z\right) \cdot y} + \left(\mathsf{neg}\left(z\right)\right) \cdot t}{1 - z} \cdot \frac{x}{z} \]
                                      14. lower-fma.f64N/A

                                        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(1 - z, y, \left(\mathsf{neg}\left(z\right)\right) \cdot t\right)}}{1 - z} \cdot \frac{x}{z} \]
                                      15. lower-*.f64N/A

                                        \[\leadsto \frac{\mathsf{fma}\left(1 - z, y, \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot t}\right)}{1 - z} \cdot \frac{x}{z} \]
                                      16. lower-neg.f64N/A

                                        \[\leadsto \frac{\mathsf{fma}\left(1 - z, y, \color{blue}{\left(-z\right)} \cdot t\right)}{1 - z} \cdot \frac{x}{z} \]
                                      17. lower-/.f6492.1

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

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

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

                                      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\left(-t\right) \cdot \mathsf{fma}\left(x, z, x\right), z, x \cdot y\right)}{z}} \]
                                    7. Taylor expanded in z around inf

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

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

                                        \[\leadsto -1 \cdot \color{blue}{\left(t \cdot \left(x + x \cdot z\right)\right)} \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites32.9%

                                          \[\leadsto \left(\left(-1 - z\right) \cdot x\right) \cdot \color{blue}{t} \]
                                      4. Recombined 2 regimes into one program.
                                      5. Add Preprocessing

                                      Alternative 12: 23.2% accurate, 4.3× speedup?

                                      \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \left(\left(-t\right) \cdot x\_m\right) \end{array} \]
                                      x\_m = (fabs.f64 x)
                                      x\_s = (copysign.f64 #s(literal 1 binary64) 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(Float64(-t) * 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(\left(-t\right) \cdot x\_m\right)
                                      \end{array}
                                      
                                      Derivation
                                      1. Initial program 92.8%

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

                                        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x \cdot z\right)\right) + x \cdot y}{z}} \]
                                      4. Step-by-step derivation
                                        1. lower-/.f64N/A

                                          \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x \cdot z\right)\right) + x \cdot y}{z}} \]
                                        2. +-commutativeN/A

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

                                          \[\leadsto \frac{x \cdot y + \color{blue}{\left(\mathsf{neg}\left(t \cdot \left(x \cdot z\right)\right)\right)}}{z} \]
                                        4. unsub-negN/A

                                          \[\leadsto \frac{\color{blue}{x \cdot y - t \cdot \left(x \cdot z\right)}}{z} \]
                                        5. associate-*r*N/A

                                          \[\leadsto \frac{x \cdot y - \color{blue}{\left(t \cdot x\right) \cdot z}}{z} \]
                                        6. *-commutativeN/A

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

                                          \[\leadsto \frac{x \cdot y - \color{blue}{x \cdot \left(t \cdot z\right)}}{z} \]
                                        8. distribute-lft-out--N/A

                                          \[\leadsto \frac{\color{blue}{x \cdot \left(y - t \cdot z\right)}}{z} \]
                                        9. unsub-negN/A

                                          \[\leadsto \frac{x \cdot \color{blue}{\left(y + \left(\mathsf{neg}\left(t \cdot z\right)\right)\right)}}{z} \]
                                        10. mul-1-negN/A

                                          \[\leadsto \frac{x \cdot \left(y + \color{blue}{-1 \cdot \left(t \cdot z\right)}\right)}{z} \]
                                        11. lower-*.f64N/A

                                          \[\leadsto \frac{\color{blue}{x \cdot \left(y + -1 \cdot \left(t \cdot z\right)\right)}}{z} \]
                                        12. mul-1-negN/A

                                          \[\leadsto \frac{x \cdot \left(y + \color{blue}{\left(\mathsf{neg}\left(t \cdot z\right)\right)}\right)}{z} \]
                                        13. unsub-negN/A

                                          \[\leadsto \frac{x \cdot \color{blue}{\left(y - t \cdot z\right)}}{z} \]
                                        14. lower--.f64N/A

                                          \[\leadsto \frac{x \cdot \color{blue}{\left(y - t \cdot z\right)}}{z} \]
                                        15. lower-*.f6465.7

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

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

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

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

                                        Developer Target 1: 94.9% accurate, 0.3× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(\frac{y}{z} - t \cdot \frac{1}{1 - z}\right)\\ t_2 := x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\ \mathbf{if}\;t\_2 < -7.623226303312042 \cdot 10^{-196}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 < 1.4133944927702302 \cdot 10^{-211}:\\ \;\;\;\;\frac{y \cdot x}{z} + \left(-\frac{t \cdot x}{1 - z}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                        (FPCore (x y z t)
                                         :precision binary64
                                         (let* ((t_1 (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))))
                                                (t_2 (* x (- (/ y z) (/ t (- 1.0 z))))))
                                           (if (< t_2 -7.623226303312042e-196)
                                             t_1
                                             (if (< t_2 1.4133944927702302e-211)
                                               (+ (/ (* y x) z) (- (/ (* t x) (- 1.0 z))))
                                               t_1))))
                                        double code(double x, double y, double z, double t) {
                                        	double t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
                                        	double t_2 = x * ((y / z) - (t / (1.0 - z)));
                                        	double tmp;
                                        	if (t_2 < -7.623226303312042e-196) {
                                        		tmp = t_1;
                                        	} else if (t_2 < 1.4133944927702302e-211) {
                                        		tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
                                        	} else {
                                        		tmp = t_1;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        real(8) function code(x, y, z, t)
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            real(8), intent (in) :: z
                                            real(8), intent (in) :: t
                                            real(8) :: t_1
                                            real(8) :: t_2
                                            real(8) :: tmp
                                            t_1 = x * ((y / z) - (t * (1.0d0 / (1.0d0 - z))))
                                            t_2 = x * ((y / z) - (t / (1.0d0 - z)))
                                            if (t_2 < (-7.623226303312042d-196)) then
                                                tmp = t_1
                                            else if (t_2 < 1.4133944927702302d-211) then
                                                tmp = ((y * x) / z) + -((t * x) / (1.0d0 - z))
                                            else
                                                tmp = t_1
                                            end if
                                            code = tmp
                                        end function
                                        
                                        public static double code(double x, double y, double z, double t) {
                                        	double t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
                                        	double t_2 = x * ((y / z) - (t / (1.0 - z)));
                                        	double tmp;
                                        	if (t_2 < -7.623226303312042e-196) {
                                        		tmp = t_1;
                                        	} else if (t_2 < 1.4133944927702302e-211) {
                                        		tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
                                        	} else {
                                        		tmp = t_1;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        def code(x, y, z, t):
                                        	t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))))
                                        	t_2 = x * ((y / z) - (t / (1.0 - z)))
                                        	tmp = 0
                                        	if t_2 < -7.623226303312042e-196:
                                        		tmp = t_1
                                        	elif t_2 < 1.4133944927702302e-211:
                                        		tmp = ((y * x) / z) + -((t * x) / (1.0 - z))
                                        	else:
                                        		tmp = t_1
                                        	return tmp
                                        
                                        function code(x, y, z, t)
                                        	t_1 = Float64(x * Float64(Float64(y / z) - Float64(t * Float64(1.0 / Float64(1.0 - z)))))
                                        	t_2 = Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z))))
                                        	tmp = 0.0
                                        	if (t_2 < -7.623226303312042e-196)
                                        		tmp = t_1;
                                        	elseif (t_2 < 1.4133944927702302e-211)
                                        		tmp = Float64(Float64(Float64(y * x) / z) + Float64(-Float64(Float64(t * x) / Float64(1.0 - z))));
                                        	else
                                        		tmp = t_1;
                                        	end
                                        	return tmp
                                        end
                                        
                                        function tmp_2 = code(x, y, z, t)
                                        	t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
                                        	t_2 = x * ((y / z) - (t / (1.0 - z)));
                                        	tmp = 0.0;
                                        	if (t_2 < -7.623226303312042e-196)
                                        		tmp = t_1;
                                        	elseif (t_2 < 1.4133944927702302e-211)
                                        		tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
                                        	else
                                        		tmp = t_1;
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -7.623226303312042e-196], t$95$1, If[Less[t$95$2, 1.4133944927702302e-211], N[(N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision] + (-N[(N[(t * x), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], t$95$1]]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        t_1 := x \cdot \left(\frac{y}{z} - t \cdot \frac{1}{1 - z}\right)\\
                                        t_2 := x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\
                                        \mathbf{if}\;t\_2 < -7.623226303312042 \cdot 10^{-196}:\\
                                        \;\;\;\;t\_1\\
                                        
                                        \mathbf{elif}\;t\_2 < 1.4133944927702302 \cdot 10^{-211}:\\
                                        \;\;\;\;\frac{y \cdot x}{z} + \left(-\frac{t \cdot x}{1 - z}\right)\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;t\_1\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        

                                        Reproduce

                                        ?
                                        herbie shell --seed 2024332 
                                        (FPCore (x y z t)
                                          :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
                                          :precision binary64
                                        
                                          :alt
                                          (! :herbie-platform default (if (< (* x (- (/ y z) (/ t (- 1 z)))) -3811613151656021/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* x (- (/ y z) (* t (/ 1 (- 1 z))))) (if (< (* x (- (/ y z) (/ t (- 1 z)))) 7066972463851151/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (/ (* y x) z) (- (/ (* t x) (- 1 z)))) (* x (- (/ y z) (* t (/ 1 (- 1 z))))))))
                                        
                                          (* x (- (/ y z) (/ t (- 1.0 z)))))