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

Percentage Accurate: 94.1% → 97.9%
Time: 9.6s
Alternatives: 14
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 14 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.1% accurate, 1.0× speedup?

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

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

Alternative 1: 97.9% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+291}:\\
\;\;\;\;t\_2 \cdot x\\

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


\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))) < -inf.0 or 3.9999999999999998e291 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z)))

    1. Initial program 64.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 x \cdot \color{blue}{\left(\frac{y}{z} - \frac{t}{1 - z}\right)} \]
      2. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, {\left(-1 + \color{blue}{z}\right)}^{-1}, \frac{y}{z}\right) \]
      15. lower-+.f6464.8

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

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, {\left(-1 + z\right)}^{-1}, \frac{y}{z}\right)} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(t, {\left(-1 + z\right)}^{-1}, \frac{y}{z}\right)} \]
      2. lift-fma.f64N/A

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x + \frac{t}{-1 + z} \cdot x} \]
      9. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{y}{z}} \cdot x + \frac{t}{-1 + z} \cdot x \]
      10. frac-2negN/A

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

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

        \[\leadsto \frac{-y}{\color{blue}{-z}} \cdot x + \frac{t}{-1 + z} \cdot x \]
      13. div-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot y} \]
      3. lower-/.f64100.0

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

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

    if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < 3.9999999999999998e291

    1. Initial program 98.5%

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

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

Alternative 2: 93.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2.2 \cdot 10^{-5}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-1}{z}, \left(-y\right) \cdot x, \frac{x}{\frac{z - 1}{t}}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t, {\left(z - 1\right)}^{-1}, \frac{y}{z}\right) \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x 2.2e-5)
   (fma (/ -1.0 z) (* (- y) x) (/ x (/ (- z 1.0) t)))
   (* (fma t (pow (- z 1.0) -1.0) (/ y z)) x)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= 2.2e-5) {
		tmp = fma((-1.0 / z), (-y * x), (x / ((z - 1.0) / t)));
	} else {
		tmp = fma(t, pow((z - 1.0), -1.0), (y / z)) * x;
	}
	return tmp;
}
function code(x, y, z, t)
	tmp = 0.0
	if (x <= 2.2e-5)
		tmp = fma(Float64(-1.0 / z), Float64(Float64(-y) * x), Float64(x / Float64(Float64(z - 1.0) / t)));
	else
		tmp = Float64(fma(t, (Float64(z - 1.0) ^ -1.0), Float64(y / z)) * x);
	end
	return tmp
end
code[x_, y_, z_, t_] := If[LessEqual[x, 2.2e-5], N[(N[(-1.0 / z), $MachinePrecision] * N[((-y) * x), $MachinePrecision] + N[(x / N[(N[(z - 1.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[Power[N[(z - 1.0), $MachinePrecision], -1.0], $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.2 \cdot 10^{-5}:\\
\;\;\;\;\mathsf{fma}\left(\frac{-1}{z}, \left(-y\right) \cdot x, \frac{x}{\frac{z - 1}{t}}\right)\\

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


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

    1. Initial program 92.3%

      \[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 \color{blue}{\left(\frac{y}{z} - \frac{t}{1 - z}\right)} \]
      2. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, {\left(-1 + z\right)}^{-1}, \frac{y}{z}\right)} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(t, {\left(-1 + z\right)}^{-1}, \frac{y}{z}\right)} \]
      2. lift-fma.f64N/A

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x + \frac{t}{-1 + z} \cdot x} \]
      9. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{y}{z}} \cdot x + \frac{t}{-1 + z} \cdot x \]
      10. frac-2negN/A

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

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

        \[\leadsto \frac{-y}{\color{blue}{-z}} \cdot x + \frac{t}{-1 + z} \cdot x \]
      13. div-invN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{-1}{z}, \color{blue}{\left(-y\right) \cdot x}, \frac{t}{-1 + z} \cdot x\right) \]
      22. lower-*.f6495.0

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{z}, \left(-y\right) \cdot x, \frac{t}{z + -1} \cdot x\right)} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{-1}{z}, \left(-y\right) \cdot x, x \cdot \color{blue}{\frac{1}{\frac{z + -1}{t}}}\right) \]
      5. un-div-invN/A

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

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

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

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

    if 2.1999999999999999e-5 < x

    1. Initial program 97.3%

      \[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 \color{blue}{\left(\frac{y}{z} - \frac{t}{1 - z}\right)} \]
      2. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, {\left(-1 + \color{blue}{z}\right)}^{-1}, \frac{y}{z}\right) \]
      15. lower-+.f6497.3

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

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

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

Alternative 3: 93.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 3.25 \cdot 10^{+28}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-1}{z}, \left(-y\right) \cdot x, \frac{x}{\frac{z - 1}{t}}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{y}{z} - \frac{t}{1 - z}\right) \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x 3.25e+28)
   (fma (/ -1.0 z) (* (- y) x) (/ x (/ (- z 1.0) t)))
   (* (- (/ y z) (/ t (- 1.0 z))) x)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= 3.25e+28) {
		tmp = fma((-1.0 / z), (-y * x), (x / ((z - 1.0) / t)));
	} else {
		tmp = ((y / z) - (t / (1.0 - z))) * x;
	}
	return tmp;
}
function code(x, y, z, t)
	tmp = 0.0
	if (x <= 3.25e+28)
		tmp = fma(Float64(-1.0 / z), Float64(Float64(-y) * x), Float64(x / Float64(Float64(z - 1.0) / t)));
	else
		tmp = Float64(Float64(Float64(y / z) - Float64(t / Float64(1.0 - z))) * x);
	end
	return tmp
end
code[x_, y_, z_, t_] := If[LessEqual[x, 3.25e+28], N[(N[(-1.0 / z), $MachinePrecision] * N[((-y) * x), $MachinePrecision] + N[(x / N[(N[(z - 1.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.25 \cdot 10^{+28}:\\
\;\;\;\;\mathsf{fma}\left(\frac{-1}{z}, \left(-y\right) \cdot x, \frac{x}{\frac{z - 1}{t}}\right)\\

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


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

    1. Initial program 92.6%

      \[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 \color{blue}{\left(\frac{y}{z} - \frac{t}{1 - z}\right)} \]
      2. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, {\left(-1 + z\right)}^{-1}, \frac{y}{z}\right)} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(t, {\left(-1 + z\right)}^{-1}, \frac{y}{z}\right)} \]
      2. lift-fma.f64N/A

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x + \frac{t}{-1 + z} \cdot x} \]
      9. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{y}{z}} \cdot x + \frac{t}{-1 + z} \cdot x \]
      10. frac-2negN/A

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

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

        \[\leadsto \frac{-y}{\color{blue}{-z}} \cdot x + \frac{t}{-1 + z} \cdot x \]
      13. div-invN/A

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{z}, \left(-y\right) \cdot x, \frac{t}{z + -1} \cdot x\right)} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{-1}{z}, \left(-y\right) \cdot x, x \cdot \color{blue}{\frac{1}{\frac{z + -1}{t}}}\right) \]
      5. un-div-invN/A

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

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

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

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

    if 3.25e28 < x

    1. Initial program 97.0%

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

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

Alternative 4: 93.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2 \cdot 10^{-8}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-1}{z}, \left(-y\right) \cdot x, \frac{t}{z - 1} \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{y}{z} - \frac{t}{1 - z}\right) \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x 2e-8)
   (fma (/ -1.0 z) (* (- y) x) (* (/ t (- z 1.0)) x))
   (* (- (/ y z) (/ t (- 1.0 z))) x)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= 2e-8) {
		tmp = fma((-1.0 / z), (-y * x), ((t / (z - 1.0)) * x));
	} else {
		tmp = ((y / z) - (t / (1.0 - z))) * x;
	}
	return tmp;
}
function code(x, y, z, t)
	tmp = 0.0
	if (x <= 2e-8)
		tmp = fma(Float64(-1.0 / z), Float64(Float64(-y) * x), Float64(Float64(t / Float64(z - 1.0)) * x));
	else
		tmp = Float64(Float64(Float64(y / z) - Float64(t / Float64(1.0 - z))) * x);
	end
	return tmp
end
code[x_, y_, z_, t_] := If[LessEqual[x, 2e-8], N[(N[(-1.0 / z), $MachinePrecision] * N[((-y) * x), $MachinePrecision] + N[(N[(t / N[(z - 1.0), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 2 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(\frac{-1}{z}, \left(-y\right) \cdot x, \frac{t}{z - 1} \cdot x\right)\\

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


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

    1. Initial program 92.3%

      \[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 \color{blue}{\left(\frac{y}{z} - \frac{t}{1 - z}\right)} \]
      2. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, {\left(-1 + z\right)}^{-1}, \frac{y}{z}\right)} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(t, {\left(-1 + z\right)}^{-1}, \frac{y}{z}\right)} \]
      2. lift-fma.f64N/A

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x + \frac{t}{-1 + z} \cdot x} \]
      9. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{y}{z}} \cdot x + \frac{t}{-1 + z} \cdot x \]
      10. frac-2negN/A

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

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

        \[\leadsto \frac{-y}{\color{blue}{-z}} \cdot x + \frac{t}{-1 + z} \cdot x \]
      13. div-invN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{-1}{z}, \color{blue}{\left(-y\right) \cdot x}, \frac{t}{-1 + z} \cdot x\right) \]
      22. lower-*.f6495.0

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

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

    if 2e-8 < x

    1. Initial program 97.3%

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

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

Alternative 5: 94.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t + y}{z} \cdot x\\ \mathbf{if}\;z \leq -1.2 \cdot 10^{-9}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{-11}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-1}{z}, \left(-y\right) \cdot x, \left(-t\right) \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (/ (+ t y) z) x)))
   (if (<= z -1.2e-9)
     t_1
     (if (<= z 1.08e-11) (fma (/ -1.0 z) (* (- y) x) (* (- t) x)) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = ((t + y) / z) * x;
	double tmp;
	if (z <= -1.2e-9) {
		tmp = t_1;
	} else if (z <= 1.08e-11) {
		tmp = fma((-1.0 / z), (-y * x), (-t * x));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(Float64(Float64(t + y) / z) * x)
	tmp = 0.0
	if (z <= -1.2e-9)
		tmp = t_1;
	elseif (z <= 1.08e-11)
		tmp = fma(Float64(-1.0 / z), Float64(Float64(-y) * x), Float64(Float64(-t) * x));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(t + y), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -1.2e-9], t$95$1, If[LessEqual[z, 1.08e-11], N[(N[(-1.0 / z), $MachinePrecision] * N[((-y) * x), $MachinePrecision] + N[((-t) * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.08 \cdot 10^{-11}:\\
\;\;\;\;\mathsf{fma}\left(\frac{-1}{z}, \left(-y\right) \cdot x, \left(-t\right) \cdot x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.2e-9 or 1.07999999999999992e-11 < z

    1. Initial program 97.8%

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

      \[\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-+.f6496.6

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

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

    if -1.2e-9 < z < 1.07999999999999992e-11

    1. Initial program 88.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 \color{blue}{\left(\frac{y}{z} - \frac{t}{1 - z}\right)} \]
      2. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, {\left(-1 + \color{blue}{z}\right)}^{-1}, \frac{y}{z}\right) \]
      15. lower-+.f6488.5

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

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, {\left(-1 + z\right)}^{-1}, \frac{y}{z}\right)} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(t, {\left(-1 + z\right)}^{-1}, \frac{y}{z}\right)} \]
      2. lift-fma.f64N/A

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x + \frac{t}{-1 + z} \cdot x} \]
      9. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{y}{z}} \cdot x + \frac{t}{-1 + z} \cdot x \]
      10. frac-2negN/A

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

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

        \[\leadsto \frac{-y}{\color{blue}{-z}} \cdot x + \frac{t}{-1 + z} \cdot x \]
      13. div-invN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{-1}{z}, \color{blue}{\left(-y\right) \cdot x}, \frac{t}{-1 + z} \cdot x\right) \]
      22. lower-*.f6496.3

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{-1}{z}, \left(-y\right) \cdot x, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} \cdot x\right) \]
      2. lower-neg.f6496.3

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

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

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

Alternative 6: 42.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{z} \cdot t\\ t_2 := \mathsf{fma}\left(x, z, x\right) \cdot \left(-t\right)\\ \mathbf{if}\;z \leq -0.75:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-197}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-181}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 225000:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (/ x z) t)) (t_2 (* (fma x z x) (- t))))
   (if (<= z -0.75)
     t_1
     (if (<= z -1.8e-197)
       t_2
       (if (<= z 3.7e-181) t_1 (if (<= z 225000.0) t_2 t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x / z) * t;
	double t_2 = fma(x, z, x) * -t;
	double tmp;
	if (z <= -0.75) {
		tmp = t_1;
	} else if (z <= -1.8e-197) {
		tmp = t_2;
	} else if (z <= 3.7e-181) {
		tmp = t_1;
	} else if (z <= 225000.0) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(Float64(x / z) * t)
	t_2 = Float64(fma(x, z, x) * Float64(-t))
	tmp = 0.0
	if (z <= -0.75)
		tmp = t_1;
	elseif (z <= -1.8e-197)
		tmp = t_2;
	elseif (z <= 3.7e-181)
		tmp = t_1;
	elseif (z <= 225000.0)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * z + x), $MachinePrecision] * (-t)), $MachinePrecision]}, If[LessEqual[z, -0.75], t$95$1, If[LessEqual[z, -1.8e-197], t$95$2, If[LessEqual[z, 3.7e-181], t$95$1, If[LessEqual[z, 225000.0], t$95$2, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.8 \cdot 10^{-197}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 3.7 \cdot 10^{-181}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.75 or -1.7999999999999999e-197 < z < 3.69999999999999984e-181 or 225000 < z

    1. Initial program 92.7%

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

      \[\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--.f6441.6

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

      \[\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.1%

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

      if -0.75 < z < -1.7999999999999999e-197 or 3.69999999999999984e-181 < z < 225000

      1. Initial program 95.5%

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

        \[\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--.f6441.1

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

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

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

          \[\leadsto \left(-t\right) \cdot \color{blue}{\mathsf{fma}\left(x, z, x\right)} \]
      8. Recombined 2 regimes into one program.
      9. Final simplification45.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.75:\\ \;\;\;\;\frac{x}{z} \cdot t\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-197}:\\ \;\;\;\;\mathsf{fma}\left(x, z, x\right) \cdot \left(-t\right)\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-181}:\\ \;\;\;\;\frac{x}{z} \cdot t\\ \mathbf{elif}\;z \leq 225000:\\ \;\;\;\;\mathsf{fma}\left(x, z, x\right) \cdot \left(-t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot t\\ \end{array} \]
      10. Add Preprocessing

      Alternative 7: 74.5% accurate, 0.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{z} \cdot x\\ \mathbf{if}\;z \leq -1.55 \cdot 10^{+264}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;z \leq -6.1 \cdot 10^{+63}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+25}:\\ \;\;\;\;\left(\frac{y}{z} - t\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (let* ((t_1 (* (/ t z) x)))
         (if (<= z -1.55e+264)
           (* (/ y z) x)
           (if (<= z -6.1e+63) t_1 (if (<= z 3.4e+25) (* (- (/ y z) t) x) t_1)))))
      double code(double x, double y, double z, double t) {
      	double t_1 = (t / z) * x;
      	double tmp;
      	if (z <= -1.55e+264) {
      		tmp = (y / z) * x;
      	} else if (z <= -6.1e+63) {
      		tmp = t_1;
      	} else if (z <= 3.4e+25) {
      		tmp = ((y / z) - t) * x;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8) :: t_1
          real(8) :: tmp
          t_1 = (t / z) * x
          if (z <= (-1.55d+264)) then
              tmp = (y / z) * x
          else if (z <= (-6.1d+63)) then
              tmp = t_1
          else if (z <= 3.4d+25) then
              tmp = ((y / z) - t) * x
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t) {
      	double t_1 = (t / z) * x;
      	double tmp;
      	if (z <= -1.55e+264) {
      		tmp = (y / z) * x;
      	} else if (z <= -6.1e+63) {
      		tmp = t_1;
      	} else if (z <= 3.4e+25) {
      		tmp = ((y / z) - t) * x;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t):
      	t_1 = (t / z) * x
      	tmp = 0
      	if z <= -1.55e+264:
      		tmp = (y / z) * x
      	elif z <= -6.1e+63:
      		tmp = t_1
      	elif z <= 3.4e+25:
      		tmp = ((y / z) - t) * x
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t)
      	t_1 = Float64(Float64(t / z) * x)
      	tmp = 0.0
      	if (z <= -1.55e+264)
      		tmp = Float64(Float64(y / z) * x);
      	elseif (z <= -6.1e+63)
      		tmp = t_1;
      	elseif (z <= 3.4e+25)
      		tmp = Float64(Float64(Float64(y / z) - t) * x);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t)
      	t_1 = (t / z) * x;
      	tmp = 0.0;
      	if (z <= -1.55e+264)
      		tmp = (y / z) * x;
      	elseif (z <= -6.1e+63)
      		tmp = t_1;
      	elseif (z <= 3.4e+25)
      		tmp = ((y / z) - t) * x;
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / z), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -1.55e+264], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, -6.1e+63], t$95$1, If[LessEqual[z, 3.4e+25], N[(N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{t}{z} \cdot x\\
      \mathbf{if}\;z \leq -1.55 \cdot 10^{+264}:\\
      \;\;\;\;\frac{y}{z} \cdot x\\
      
      \mathbf{elif}\;z \leq -6.1 \cdot 10^{+63}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 3.4 \cdot 10^{+25}:\\
      \;\;\;\;\left(\frac{y}{z} - t\right) \cdot x\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if z < -1.54999999999999991e264

        1. Initial program 99.7%

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

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

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

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

        if -1.54999999999999991e264 < z < -6.09999999999999968e63 or 3.39999999999999984e25 < z

        1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x \cdot \frac{\color{blue}{y + t}}{z} \]
        8. Applied rewrites96.8%

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

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

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

          if -6.09999999999999968e63 < z < 3.39999999999999984e25

          1. Initial program 91.0%

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

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

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

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

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

              \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
            5. lower-*.f6486.3

              \[\leadsto x \cdot \frac{y - \color{blue}{t \cdot z}}{z} \]
          5. Applied rewrites86.3%

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+264}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;z \leq -6.1 \cdot 10^{+63}:\\ \;\;\;\;\frac{t}{z} \cdot x\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+25}:\\ \;\;\;\;\left(\frac{y}{z} - t\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{z} \cdot x\\ \end{array} \]
          10. Add Preprocessing

          Alternative 8: 95.0% accurate, 0.9× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t + y}{z} \cdot x\\ \mathbf{if}\;z \leq -0.88:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{-11}:\\ \;\;\;\;\frac{\left(y - t \cdot z\right) \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (let* ((t_1 (* (/ (+ t y) z) x)))
             (if (<= z -0.88) t_1 (if (<= z 1.08e-11) (/ (* (- y (* t z)) x) z) t_1))))
          double code(double x, double y, double z, double t) {
          	double t_1 = ((t + y) / z) * x;
          	double tmp;
          	if (z <= -0.88) {
          		tmp = t_1;
          	} else if (z <= 1.08e-11) {
          		tmp = ((y - (t * z)) * x) / 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) :: tmp
              t_1 = ((t + y) / z) * x
              if (z <= (-0.88d0)) then
                  tmp = t_1
              else if (z <= 1.08d-11) then
                  tmp = ((y - (t * z)) * x) / 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 = ((t + y) / z) * x;
          	double tmp;
          	if (z <= -0.88) {
          		tmp = t_1;
          	} else if (z <= 1.08e-11) {
          		tmp = ((y - (t * z)) * x) / z;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t):
          	t_1 = ((t + y) / z) * x
          	tmp = 0
          	if z <= -0.88:
          		tmp = t_1
          	elif z <= 1.08e-11:
          		tmp = ((y - (t * z)) * x) / z
          	else:
          		tmp = t_1
          	return tmp
          
          function code(x, y, z, t)
          	t_1 = Float64(Float64(Float64(t + y) / z) * x)
          	tmp = 0.0
          	if (z <= -0.88)
          		tmp = t_1;
          	elseif (z <= 1.08e-11)
          		tmp = Float64(Float64(Float64(y - Float64(t * z)) * x) / z);
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t)
          	t_1 = ((t + y) / z) * x;
          	tmp = 0.0;
          	if (z <= -0.88)
          		tmp = t_1;
          	elseif (z <= 1.08e-11)
          		tmp = ((y - (t * z)) * x) / z;
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(t + y), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -0.88], t$95$1, If[LessEqual[z, 1.08e-11], N[(N[(N[(y - N[(t * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \frac{t + y}{z} \cdot x\\
          \mathbf{if}\;z \leq -0.88:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;z \leq 1.08 \cdot 10^{-11}:\\
          \;\;\;\;\frac{\left(y - t \cdot z\right) \cdot x}{z}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -0.880000000000000004 or 1.07999999999999992e-11 < z

            1. Initial program 97.7%

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

              \[\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-+.f6497.7

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

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

            if -0.880000000000000004 < z < 1.07999999999999992e-11

            1. Initial program 89.2%

              \[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-*.f6494.5

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

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

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

          Alternative 9: 92.5% accurate, 1.1× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t + y}{z} \cdot x\\ \mathbf{if}\;z \leq -1.6 \cdot 10^{+25}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{-11}:\\ \;\;\;\;\left(\frac{y}{z} - t\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (let* ((t_1 (* (/ (+ t y) z) x)))
             (if (<= z -1.6e+25) t_1 (if (<= z 1.08e-11) (* (- (/ y z) t) x) t_1))))
          double code(double x, double y, double z, double t) {
          	double t_1 = ((t + y) / z) * x;
          	double tmp;
          	if (z <= -1.6e+25) {
          		tmp = t_1;
          	} else if (z <= 1.08e-11) {
          		tmp = ((y / z) - t) * x;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          real(8) function code(x, y, z, t)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8) :: t_1
              real(8) :: tmp
              t_1 = ((t + y) / z) * x
              if (z <= (-1.6d+25)) then
                  tmp = t_1
              else if (z <= 1.08d-11) then
                  tmp = ((y / z) - t) * x
              else
                  tmp = t_1
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t) {
          	double t_1 = ((t + y) / z) * x;
          	double tmp;
          	if (z <= -1.6e+25) {
          		tmp = t_1;
          	} else if (z <= 1.08e-11) {
          		tmp = ((y / z) - t) * x;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t):
          	t_1 = ((t + y) / z) * x
          	tmp = 0
          	if z <= -1.6e+25:
          		tmp = t_1
          	elif z <= 1.08e-11:
          		tmp = ((y / z) - t) * x
          	else:
          		tmp = t_1
          	return tmp
          
          function code(x, y, z, t)
          	t_1 = Float64(Float64(Float64(t + y) / z) * x)
          	tmp = 0.0
          	if (z <= -1.6e+25)
          		tmp = t_1;
          	elseif (z <= 1.08e-11)
          		tmp = Float64(Float64(Float64(y / z) - t) * x);
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t)
          	t_1 = ((t + y) / z) * x;
          	tmp = 0.0;
          	if (z <= -1.6e+25)
          		tmp = t_1;
          	elseif (z <= 1.08e-11)
          		tmp = ((y / z) - t) * x;
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(t + y), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -1.6e+25], t$95$1, If[LessEqual[z, 1.08e-11], N[(N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \frac{t + y}{z} \cdot x\\
          \mathbf{if}\;z \leq -1.6 \cdot 10^{+25}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;z \leq 1.08 \cdot 10^{-11}:\\
          \;\;\;\;\left(\frac{y}{z} - t\right) \cdot x\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -1.6e25 or 1.07999999999999992e-11 < z

            1. Initial program 97.6%

              \[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-+.f6497.6

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

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

            if -1.6e25 < z < 1.07999999999999992e-11

            1. Initial program 89.4%

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

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

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

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

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

                \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
              5. lower-*.f6488.2

                \[\leadsto x \cdot \frac{y - \color{blue}{t \cdot z}}{z} \]
            5. Applied rewrites88.2%

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

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

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

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

            Alternative 10: 71.4% accurate, 1.1× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t \cdot x}{z - 1}\\ \mathbf{if}\;t \leq -2.3 \cdot 10^{+123}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 7.6 \cdot 10^{+106}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (let* ((t_1 (/ (* t x) (- z 1.0))))
               (if (<= t -2.3e+123) t_1 (if (<= t 7.6e+106) (* (/ x z) y) t_1))))
            double code(double x, double y, double z, double t) {
            	double t_1 = (t * x) / (z - 1.0);
            	double tmp;
            	if (t <= -2.3e+123) {
            		tmp = t_1;
            	} else if (t <= 7.6e+106) {
            		tmp = (x / z) * y;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z, t)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8) :: t_1
                real(8) :: tmp
                t_1 = (t * x) / (z - 1.0d0)
                if (t <= (-2.3d+123)) then
                    tmp = t_1
                else if (t <= 7.6d+106) then
                    tmp = (x / z) * y
                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 = (t * x) / (z - 1.0);
            	double tmp;
            	if (t <= -2.3e+123) {
            		tmp = t_1;
            	} else if (t <= 7.6e+106) {
            		tmp = (x / z) * y;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	t_1 = (t * x) / (z - 1.0)
            	tmp = 0
            	if t <= -2.3e+123:
            		tmp = t_1
            	elif t <= 7.6e+106:
            		tmp = (x / z) * y
            	else:
            		tmp = t_1
            	return tmp
            
            function code(x, y, z, t)
            	t_1 = Float64(Float64(t * x) / Float64(z - 1.0))
            	tmp = 0.0
            	if (t <= -2.3e+123)
            		tmp = t_1;
            	elseif (t <= 7.6e+106)
            		tmp = Float64(Float64(x / z) * y);
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	t_1 = (t * x) / (z - 1.0);
            	tmp = 0.0;
            	if (t <= -2.3e+123)
            		tmp = t_1;
            	elseif (t <= 7.6e+106)
            		tmp = (x / z) * y;
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t * x), $MachinePrecision] / N[(z - 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.3e+123], t$95$1, If[LessEqual[t, 7.6e+106], N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{t \cdot x}{z - 1}\\
            \mathbf{if}\;t \leq -2.3 \cdot 10^{+123}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;t \leq 7.6 \cdot 10^{+106}:\\
            \;\;\;\;\frac{x}{z} \cdot y\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if t < -2.2999999999999999e123 or 7.5999999999999996e106 < t

              1. Initial program 96.1%

                \[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--.f6472.8

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

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

              if -2.2999999999999999e123 < t < 7.5999999999999996e106

              1. Initial program 92.6%

                \[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 \color{blue}{\left(\frac{y}{z} - \frac{t}{1 - z}\right)} \]
                2. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, {\left(-1 + z\right)}^{-1}, \frac{y}{z}\right)} \]
              5. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(t, {\left(-1 + z\right)}^{-1}, \frac{y}{z}\right)} \]
                2. lift-fma.f64N/A

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\frac{y}{z} \cdot x + \frac{t}{-1 + z} \cdot x} \]
                9. lift-/.f64N/A

                  \[\leadsto \color{blue}{\frac{y}{z}} \cdot x + \frac{t}{-1 + z} \cdot x \]
                10. frac-2negN/A

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

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

                  \[\leadsto \frac{-y}{\color{blue}{-z}} \cdot x + \frac{t}{-1 + z} \cdot x \]
                13. div-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 11: 68.0% accurate, 1.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{z} \cdot x\\ \mathbf{if}\;t \leq -7.2 \cdot 10^{+131}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{+133}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (let* ((t_1 (* (/ t z) x)))
               (if (<= t -7.2e+131) t_1 (if (<= t 2.1e+133) (* (/ x z) y) t_1))))
            double code(double x, double y, double z, double t) {
            	double t_1 = (t / z) * x;
            	double tmp;
            	if (t <= -7.2e+131) {
            		tmp = t_1;
            	} else if (t <= 2.1e+133) {
            		tmp = (x / z) * y;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z, t)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8) :: t_1
                real(8) :: tmp
                t_1 = (t / z) * x
                if (t <= (-7.2d+131)) then
                    tmp = t_1
                else if (t <= 2.1d+133) then
                    tmp = (x / z) * y
                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 = (t / z) * x;
            	double tmp;
            	if (t <= -7.2e+131) {
            		tmp = t_1;
            	} else if (t <= 2.1e+133) {
            		tmp = (x / z) * y;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	t_1 = (t / z) * x
            	tmp = 0
            	if t <= -7.2e+131:
            		tmp = t_1
            	elif t <= 2.1e+133:
            		tmp = (x / z) * y
            	else:
            		tmp = t_1
            	return tmp
            
            function code(x, y, z, t)
            	t_1 = Float64(Float64(t / z) * x)
            	tmp = 0.0
            	if (t <= -7.2e+131)
            		tmp = t_1;
            	elseif (t <= 2.1e+133)
            		tmp = Float64(Float64(x / z) * y);
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	t_1 = (t / z) * x;
            	tmp = 0.0;
            	if (t <= -7.2e+131)
            		tmp = t_1;
            	elseif (t <= 2.1e+133)
            		tmp = (x / z) * y;
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / z), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[t, -7.2e+131], t$95$1, If[LessEqual[t, 2.1e+133], N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{t}{z} \cdot x\\
            \mathbf{if}\;t \leq -7.2 \cdot 10^{+131}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;t \leq 2.1 \cdot 10^{+133}:\\
            \;\;\;\;\frac{x}{z} \cdot y\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if t < -7.20000000000000063e131 or 2.1e133 < t

              1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -7.20000000000000063e131 < t < 2.1e133

                1. Initial program 92.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 x \cdot \color{blue}{\left(\frac{y}{z} - \frac{t}{1 - z}\right)} \]
                  2. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, {\left(-1 + z\right)}^{-1}, \frac{y}{z}\right)} \]
                5. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(t, {\left(-1 + z\right)}^{-1}, \frac{y}{z}\right)} \]
                  2. lift-fma.f64N/A

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\frac{y}{z} \cdot x + \frac{t}{-1 + z} \cdot x} \]
                  9. lift-/.f64N/A

                    \[\leadsto \color{blue}{\frac{y}{z}} \cdot x + \frac{t}{-1 + z} \cdot x \]
                  10. frac-2negN/A

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

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

                    \[\leadsto \frac{-y}{\color{blue}{-z}} \cdot x + \frac{t}{-1 + z} \cdot x \]
                  13. div-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\frac{x}{z} \cdot y} \]
              11. Recombined 2 regimes into one program.
              12. Final simplification75.0%

                \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{+131}:\\ \;\;\;\;\frac{t}{z} \cdot x\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{+133}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{z} \cdot x\\ \end{array} \]
              13. Add Preprocessing

              Alternative 12: 65.3% accurate, 1.2× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{z} \cdot t\\ \mathbf{if}\;t \leq -7.2 \cdot 10^{+131}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{+133}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              (FPCore (x y z t)
               :precision binary64
               (let* ((t_1 (* (/ x z) t)))
                 (if (<= t -7.2e+131) t_1 (if (<= t 2.1e+133) (* (/ x z) y) t_1))))
              double code(double x, double y, double z, double t) {
              	double t_1 = (x / z) * t;
              	double tmp;
              	if (t <= -7.2e+131) {
              		tmp = t_1;
              	} else if (t <= 2.1e+133) {
              		tmp = (x / z) * y;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              real(8) function code(x, y, z, t)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8) :: t_1
                  real(8) :: tmp
                  t_1 = (x / z) * t
                  if (t <= (-7.2d+131)) then
                      tmp = t_1
                  else if (t <= 2.1d+133) then
                      tmp = (x / z) * y
                  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 / z) * t;
              	double tmp;
              	if (t <= -7.2e+131) {
              		tmp = t_1;
              	} else if (t <= 2.1e+133) {
              		tmp = (x / z) * y;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t):
              	t_1 = (x / z) * t
              	tmp = 0
              	if t <= -7.2e+131:
              		tmp = t_1
              	elif t <= 2.1e+133:
              		tmp = (x / z) * y
              	else:
              		tmp = t_1
              	return tmp
              
              function code(x, y, z, t)
              	t_1 = Float64(Float64(x / z) * t)
              	tmp = 0.0
              	if (t <= -7.2e+131)
              		tmp = t_1;
              	elseif (t <= 2.1e+133)
              		tmp = Float64(Float64(x / z) * y);
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t)
              	t_1 = (x / z) * t;
              	tmp = 0.0;
              	if (t <= -7.2e+131)
              		tmp = t_1;
              	elseif (t <= 2.1e+133)
              		tmp = (x / z) * y;
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -7.2e+131], t$95$1, If[LessEqual[t, 2.1e+133], N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \frac{x}{z} \cdot t\\
              \mathbf{if}\;t \leq -7.2 \cdot 10^{+131}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;t \leq 2.1 \cdot 10^{+133}:\\
              \;\;\;\;\frac{x}{z} \cdot y\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if t < -7.20000000000000063e131 or 2.1e133 < t

                1. Initial program 95.8%

                  \[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--.f6473.1

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

                  \[\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 rewrites56.3%

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

                  if -7.20000000000000063e131 < t < 2.1e133

                  1. Initial program 92.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 x \cdot \color{blue}{\left(\frac{y}{z} - \frac{t}{1 - z}\right)} \]
                    2. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, {\left(-1 + z\right)}^{-1}, \frac{y}{z}\right)} \]
                  5. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(t, {\left(-1 + z\right)}^{-1}, \frac{y}{z}\right)} \]
                    2. lift-fma.f64N/A

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{y}{z} \cdot x + \frac{t}{-1 + z} \cdot x} \]
                    9. lift-/.f64N/A

                      \[\leadsto \color{blue}{\frac{y}{z}} \cdot x + \frac{t}{-1 + z} \cdot x \]
                    10. frac-2negN/A

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

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

                      \[\leadsto \frac{-y}{\color{blue}{-z}} \cdot x + \frac{t}{-1 + z} \cdot x \]
                    13. div-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 13: 63.8% accurate, 1.2× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{z} \cdot t\\ \mathbf{if}\;t \leq -5.2 \cdot 10^{+131}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 13000000:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                (FPCore (x y z t)
                 :precision binary64
                 (let* ((t_1 (* (/ x z) t)))
                   (if (<= t -5.2e+131) t_1 (if (<= t 13000000.0) (/ (* y x) z) t_1))))
                double code(double x, double y, double z, double t) {
                	double t_1 = (x / z) * t;
                	double tmp;
                	if (t <= -5.2e+131) {
                		tmp = t_1;
                	} else if (t <= 13000000.0) {
                		tmp = (y * x) / 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) :: tmp
                    t_1 = (x / z) * t
                    if (t <= (-5.2d+131)) then
                        tmp = t_1
                    else if (t <= 13000000.0d0) then
                        tmp = (y * x) / 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 / z) * t;
                	double tmp;
                	if (t <= -5.2e+131) {
                		tmp = t_1;
                	} else if (t <= 13000000.0) {
                		tmp = (y * x) / z;
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t):
                	t_1 = (x / z) * t
                	tmp = 0
                	if t <= -5.2e+131:
                		tmp = t_1
                	elif t <= 13000000.0:
                		tmp = (y * x) / z
                	else:
                		tmp = t_1
                	return tmp
                
                function code(x, y, z, t)
                	t_1 = Float64(Float64(x / z) * t)
                	tmp = 0.0
                	if (t <= -5.2e+131)
                		tmp = t_1;
                	elseif (t <= 13000000.0)
                		tmp = Float64(Float64(y * x) / z);
                	else
                		tmp = t_1;
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t)
                	t_1 = (x / z) * t;
                	tmp = 0.0;
                	if (t <= -5.2e+131)
                		tmp = t_1;
                	elseif (t <= 13000000.0)
                		tmp = (y * x) / z;
                	else
                		tmp = t_1;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -5.2e+131], t$95$1, If[LessEqual[t, 13000000.0], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \frac{x}{z} \cdot t\\
                \mathbf{if}\;t \leq -5.2 \cdot 10^{+131}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;t \leq 13000000:\\
                \;\;\;\;\frac{y \cdot x}{z}\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if t < -5.2e131 or 1.3e7 < t

                  1. Initial program 96.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--.f6465.2

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

                    \[\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 rewrites54.1%

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

                    if -5.2e131 < t < 1.3e7

                    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-/.f6482.3

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

                      \[\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(x \cdot \left(-1 \cdot t + -1 \cdot y\right) - -1 \cdot \left(x \cdot y\right)\right)}{z}} \]
                    6. Applied rewrites74.7%

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

                      \[\leadsto \frac{x \cdot y}{z} \]
                    8. Step-by-step derivation
                      1. Applied rewrites82.3%

                        \[\leadsto \frac{x \cdot y}{z} \]
                    9. Recombined 2 regimes into one program.
                    10. Final simplification71.4%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.2 \cdot 10^{+131}:\\ \;\;\;\;\frac{x}{z} \cdot t\\ \mathbf{elif}\;t \leq 13000000:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot t\\ \end{array} \]
                    11. Add Preprocessing

                    Alternative 14: 22.7% accurate, 4.3× speedup?

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

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

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

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

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

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

                        \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
                      5. lower-*.f6463.5

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

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

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

                        \[\leadsto x \cdot \left(-t\right) \]
                      2. Final simplification21.3%

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

                      Developer Target 1: 94.4% 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 2024276 
                      (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)))))