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

Percentage Accurate: 94.1% → 97.9%
Time: 7.8s
Alternatives: 9
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 9 alternatives:

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

Initial Program: 94.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.2× 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}:\\ \;\;\;\;\mathsf{fma}\left(t, {\left(z - 1\right)}^{-1}, \frac{y}{z}\right) \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) (* (fma t (pow (- z 1.0) -1.0) (/ y z)) 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 = fma(t, pow((z - 1.0), -1.0), (y / z)) * 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(fma(t, (Float64(z - 1.0) ^ -1.0), Float64(y / z)) * x);
	else
		tmp = t_1;
	end
	return 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[(N[(t * N[Power[N[(z - 1.0), $MachinePrecision], -1.0], $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision] * 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}:\\
\;\;\;\;\mathsf{fma}\left(t, {\left(z - 1\right)}^{-1}, \frac{y}{z}\right) \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. Taylor expanded in t around 0

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

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

        \[\leadsto \frac{\color{blue}{y \cdot x}}{z} \]
      3. lower-*.f6499.9

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

      \[\leadsto \color{blue}{\frac{y \cdot x}{z}} \]
    6. Step-by-step derivation
      1. 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. 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-+.f6498.5

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

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, {\left(-1 + z\right)}^{-1}, \frac{y}{z}\right)} \]
    7. Recombined 2 regimes into one program.
    8. 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}:\\ \;\;\;\;\mathsf{fma}\left(t, {\left(z - 1\right)}^{-1}, \frac{y}{z}\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \end{array} \]
    9. Add Preprocessing

    Alternative 2: 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}:\\ \;\;\;\;x \cdot t\_2\\ \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) (* x t_2) 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 = x * t_2;
    	} 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 = x * t_2;
    	} 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 = x * t_2
    	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(x * t_2);
    	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 = x * t_2;
    	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[(x * t$95$2), $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}:\\
    \;\;\;\;x \cdot t\_2\\
    
    \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. Taylor expanded in t around 0

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

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

          \[\leadsto \frac{\color{blue}{y \cdot x}}{z} \]
        3. lower-*.f6499.9

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

        \[\leadsto \color{blue}{\frac{y \cdot x}{z}} \]
      6. Step-by-step derivation
        1. 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
      7. Recombined 2 regimes into one program.
      8. Add Preprocessing

      Alternative 3: 42.7% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{z} \cdot t\\ t_2 := \left(-t\right) \cdot \mathsf{fma}\left(z, x, x\right)\\ \mathbf{if}\;z \leq -0.75:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-200}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{-186}:\\ \;\;\;\;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 (* (- t) (fma z x x))))
         (if (<= z -0.75)
           t_1
           (if (<= z -6.5e-200)
             t_2
             (if (<= z 6.4e-186) 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 = -t * fma(z, x, x);
      	double tmp;
      	if (z <= -0.75) {
      		tmp = t_1;
      	} else if (z <= -6.5e-200) {
      		tmp = t_2;
      	} else if (z <= 6.4e-186) {
      		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(Float64(-t) * fma(z, x, x))
      	tmp = 0.0
      	if (z <= -0.75)
      		tmp = t_1;
      	elseif (z <= -6.5e-200)
      		tmp = t_2;
      	elseif (z <= 6.4e-186)
      		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[((-t) * N[(z * x + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.75], t$95$1, If[LessEqual[z, -6.5e-200], t$95$2, If[LessEqual[z, 6.4e-186], 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 := \left(-t\right) \cdot \mathsf{fma}\left(z, x, x\right)\\
      \mathbf{if}\;z \leq -0.75:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq -6.5 \cdot 10^{-200}:\\
      \;\;\;\;t\_2\\
      
      \mathbf{elif}\;z \leq 6.4 \cdot 10^{-186}:\\
      \;\;\;\;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 -6.5000000000000002e-200 < z < 6.4000000000000001e-186 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 t around inf

          \[\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 < -6.5000000000000002e-200 or 6.4000000000000001e-186 < 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 t around inf

            \[\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 \mathsf{fma}\left(z, x, x\right) \cdot \color{blue}{\left(-t\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 -6.5 \cdot 10^{-200}:\\ \;\;\;\;\left(-t\right) \cdot \mathsf{fma}\left(z, x, x\right)\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{-186}:\\ \;\;\;\;\frac{x}{z} \cdot t\\ \mathbf{elif}\;z \leq 225000:\\ \;\;\;\;\left(-t\right) \cdot \mathsf{fma}\left(z, x, x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot t\\ \end{array} \]
          10. Add Preprocessing

          Alternative 4: 74.5% accurate, 0.9× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{z} \cdot x\\ \mathbf{if}\;z \leq -2.3 \cdot 10^{+263}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;z \leq -6 \cdot 10^{+63}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+23}:\\ \;\;\;\;\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 -2.3e+263)
               (* (/ y z) x)
               (if (<= z -6e+63) t_1 (if (<= z 1.6e+23) (* (- (/ 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 <= -2.3e+263) {
          		tmp = (y / z) * x;
          	} else if (z <= -6e+63) {
          		tmp = t_1;
          	} else if (z <= 1.6e+23) {
          		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 <= (-2.3d+263)) then
                  tmp = (y / z) * x
              else if (z <= (-6d+63)) then
                  tmp = t_1
              else if (z <= 1.6d+23) 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 <= -2.3e+263) {
          		tmp = (y / z) * x;
          	} else if (z <= -6e+63) {
          		tmp = t_1;
          	} else if (z <= 1.6e+23) {
          		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 <= -2.3e+263:
          		tmp = (y / z) * x
          	elif z <= -6e+63:
          		tmp = t_1
          	elif z <= 1.6e+23:
          		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 <= -2.3e+263)
          		tmp = Float64(Float64(y / z) * x);
          	elseif (z <= -6e+63)
          		tmp = t_1;
          	elseif (z <= 1.6e+23)
          		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 <= -2.3e+263)
          		tmp = (y / z) * x;
          	elseif (z <= -6e+63)
          		tmp = t_1;
          	elseif (z <= 1.6e+23)
          		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, -2.3e+263], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, -6e+63], t$95$1, If[LessEqual[z, 1.6e+23], 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 -2.3 \cdot 10^{+263}:\\
          \;\;\;\;\frac{y}{z} \cdot x\\
          
          \mathbf{elif}\;z \leq -6 \cdot 10^{+63}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;z \leq 1.6 \cdot 10^{+23}:\\
          \;\;\;\;\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 < -2.29999999999999997e263

            1. Initial program 99.7%

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

              \[\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 -2.29999999999999997e263 < z < -5.99999999999999998e63 or 1.6e23 < z

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

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

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

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

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

              if -5.99999999999999998e63 < z < 1.6e23

              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 \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-*.f6491.8

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

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

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

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

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

              Alternative 5: 95.0% accurate, 0.9× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t + y}{z} \cdot x\\ \mathbf{if}\;z \leq -1.1:\\ \;\;\;\;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 -1.1) 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 <= -1.1) {
              		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 <= (-1.1d0)) 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 <= -1.1) {
              		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 <= -1.1:
              		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 <= -1.1)
              		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 <= -1.1)
              		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, -1.1], 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 -1.1:\\
              \;\;\;\;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 < -1.1000000000000001 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 -1.1000000000000001 < 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 -1.1:\\ \;\;\;\;\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 6: 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 \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.6

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

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

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

                    \[\leadsto x \cdot \color{blue}{\left(\frac{y}{z} - 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 7: 68.0% accurate, 1.2× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{z} \cdot x\\ \mathbf{if}\;t \leq -1.95 \cdot 10^{+131}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{+127}:\\ \;\;\;\;\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 -1.95e+131) t_1 (if (<= t 1.3e+127) (* (/ 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 <= -1.95e+131) {
                		tmp = t_1;
                	} else if (t <= 1.3e+127) {
                		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 <= (-1.95d+131)) then
                        tmp = t_1
                    else if (t <= 1.3d+127) 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 <= -1.95e+131) {
                		tmp = t_1;
                	} else if (t <= 1.3e+127) {
                		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 <= -1.95e+131:
                		tmp = t_1
                	elif t <= 1.3e+127:
                		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 <= -1.95e+131)
                		tmp = t_1;
                	elseif (t <= 1.3e+127)
                		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 <= -1.95e+131)
                		tmp = t_1;
                	elseif (t <= 1.3e+127)
                		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, -1.95e+131], t$95$1, If[LessEqual[t, 1.3e+127], 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 -1.95 \cdot 10^{+131}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;t \leq 1.3 \cdot 10^{+127}:\\
                \;\;\;\;\frac{x}{z} \cdot y\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if t < -1.95e131 or 1.3000000000000001e127 < t

                  1. Initial program 95.8%

                    \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
                  2. Add Preprocessing
                  3. Taylor expanded in z around 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-+.f6473.6

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

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

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

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

                    if -1.95e131 < t < 1.3000000000000001e127

                    1. Initial program 92.8%

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

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

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

                        \[\leadsto \frac{\color{blue}{y \cdot x}}{z} \]
                      3. lower-*.f6477.1

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

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

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

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

                    Alternative 8: 65.3% accurate, 1.2× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{z} \cdot t\\ \mathbf{if}\;t \leq -2 \cdot 10^{+132}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+127}:\\ \;\;\;\;\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 -2e+132) t_1 (if (<= t 6e+127) (* (/ 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 <= -2e+132) {
                    		tmp = t_1;
                    	} else if (t <= 6e+127) {
                    		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 <= (-2d+132)) then
                            tmp = t_1
                        else if (t <= 6d+127) 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 <= -2e+132) {
                    		tmp = t_1;
                    	} else if (t <= 6e+127) {
                    		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 <= -2e+132:
                    		tmp = t_1
                    	elif t <= 6e+127:
                    		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 <= -2e+132)
                    		tmp = t_1;
                    	elseif (t <= 6e+127)
                    		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 <= -2e+132)
                    		tmp = t_1;
                    	elseif (t <= 6e+127)
                    		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, -2e+132], t$95$1, If[LessEqual[t, 6e+127], 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 -2 \cdot 10^{+132}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;t \leq 6 \cdot 10^{+127}:\\
                    \;\;\;\;\frac{x}{z} \cdot y\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if t < -1.99999999999999998e132 or 6.0000000000000005e127 < t

                      1. Initial program 95.8%

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

                        \[\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 -1.99999999999999998e132 < t < 6.0000000000000005e127

                        1. Initial program 92.8%

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

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

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

                            \[\leadsto \frac{\color{blue}{y \cdot x}}{z} \]
                          3. lower-*.f6477.1

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

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

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

                        Alternative 9: 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 \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-*.f6464.6

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

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

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

                            \[\leadsto \left(-t\right) \cdot \color{blue}{x} \]
                          2. 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)))))