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

Percentage Accurate: 94.5% → 98.0%
Time: 9.2s
Alternatives: 12
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 12 alternatives:

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

Initial Program: 94.5% accurate, 1.0× speedup?

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

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

Alternative 1: 98.0% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 10^{+299}:\\
\;\;\;\;x \cdot t\_1\\

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


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

    1. Initial program 68.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. +-commutativeN/A

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

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

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

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

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

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

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

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

      1. Initial program 98.8%

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

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

      1. Initial program 77.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{x \cdot y + z \cdot \left(-1 \cdot \left(t \cdot x\right) + -1 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)}{z}} \]
      4. Step-by-step derivation
        1. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(x \cdot \mathsf{fma}\left(t, z, t\right), \mathsf{neg}\left(z\right), \color{blue}{y \cdot x}\right)}{z} \]
        17. lower-*.f6499.9

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

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

        \[\leadsto \frac{x \cdot y}{z} \]
      7. Step-by-step derivation
        1. Applied rewrites99.9%

          \[\leadsto \frac{x \cdot y}{z} \]
      8. Recombined 3 regimes into one program.
      9. Final simplification99.0%

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

      Alternative 2: 74.2% accurate, 0.8× speedup?

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

        1. Initial program 97.3%

          \[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-/.f6465.3

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

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

        if -1.11999999999999998e82 < z < -1e18

        1. Initial program 99.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 \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. div-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{1 - z}} \]
        6. 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{t \cdot x}{-1 + \color{blue}{z}} \]
          13. lower-+.f6463.7

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

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

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

          if -1e18 < z < 8.5e12

          1. Initial program 91.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{x \cdot \mathsf{fma}\left(-t, z, y\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 rewrites90.1%

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

            if 8.5e12 < z < 1.3e137

            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 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--.f6481.0

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{+82}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;z \leq -1 \cdot 10^{+18}:\\ \;\;\;\;\frac{x}{z - 1} \cdot t\\ \mathbf{elif}\;z \leq 8500000000000:\\ \;\;\;\;\left(\frac{y}{z} - t\right) \cdot x\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+137}:\\ \;\;\;\;\frac{x \cdot t}{z - 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \end{array} \]
          10. Add Preprocessing

          Alternative 3: 61.7% accurate, 0.8× speedup?

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

            1. Initial program 97.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-/.f6461.8

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

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

            if -6.3999999999999997e-6 < z < -4.00000000000000012e-53

            1. Initial program 89.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\mathsf{fma}\left(x \cdot \mathsf{fma}\left(t, z, t\right), \mathsf{neg}\left(z\right), \color{blue}{y \cdot x}\right)}{z} \]
              17. lower-*.f6498.9

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

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

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

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

              if -4.00000000000000012e-53 < z < 8.5e12

              1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\mathsf{fma}\left(x \cdot \mathsf{fma}\left(t, z, t\right), \mathsf{neg}\left(z\right), \color{blue}{y \cdot x}\right)}{z} \]
                17. lower-*.f6493.0

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

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

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

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

                if 8.5e12 < z < 1.3e137

                1. Initial program 99.7%

                  \[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. div-invN/A

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(\mathsf{fma}\left(1 - z, y, \left(\mathsf{neg}\left(z\right)\right) \cdot t\right) \cdot x\right) \cdot \frac{1}{\color{blue}{\left(1 - z\right) \cdot z}} \]
                  18. lower-*.f6478.7

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

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

                  \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{1 - z}} \]
                6. 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{t \cdot x}{-1 + \color{blue}{z}} \]
                  13. lower-+.f6481.0

                    \[\leadsto \frac{t \cdot x}{\color{blue}{-1 + z}} \]
                7. Applied rewrites81.0%

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

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.4 \cdot 10^{-6}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-53}:\\ \;\;\;\;\left(\left(-1 - z\right) \cdot x\right) \cdot t\\ \mathbf{elif}\;z \leq 8500000000000:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+137}:\\ \;\;\;\;\frac{x \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \end{array} \]
                12. Add Preprocessing

                Alternative 4: 74.2% accurate, 0.9× speedup?

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

                  1. Initial program 97.2%

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

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

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

                  if -1.14999999999999997e83 < z < 8.5e12

                  1. Initial program 92.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. +-commutativeN/A

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

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

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

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

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

                    \[\leadsto \color{blue}{\frac{x \cdot \mathsf{fma}\left(-t, z, y\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 rewrites85.3%

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

                    if 8.5e12 < z < 1.3e137

                    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 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--.f6481.0

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

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

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

                  Alternative 5: 94.8% accurate, 0.9× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t + y}{z} \cdot x\\ \mathbf{if}\;z \leq -63000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;\frac{\mathsf{fma}\left(-t, z, y\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 -63000.0) t_1 (if (<= z 1.0) (/ (* (fma (- t) z y) 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 <= -63000.0) {
                  		tmp = t_1;
                  	} else if (z <= 1.0) {
                  		tmp = (fma(-t, z, y) * 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 <= -63000.0)
                  		tmp = t_1;
                  	elseif (z <= 1.0)
                  		tmp = Float64(Float64(fma(Float64(-t), z, y) * x) / z);
                  	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, -63000.0], t$95$1, If[LessEqual[z, 1.0], N[(N[(N[((-t) * z + y), $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 -63000:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;z \leq 1:\\
                  \;\;\;\;\frac{\mathsf{fma}\left(-t, z, y\right) \cdot x}{z}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if z < -63000 or 1 < z

                    1. Initial program 98.2%

                      \[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 -63000 < z < 1

                    1. Initial program 91.5%

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

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

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

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

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

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

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

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

                  Alternative 6: 94.9% accurate, 0.9× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t + y}{z} \cdot x\\ \mathbf{if}\;z \leq -63000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;\frac{x}{z} \cdot \left(y - t \cdot z\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 -63000.0) t_1 (if (<= z 1.0) (* (/ x z) (- y (* t z))) t_1))))
                  double code(double x, double y, double z, double t) {
                  	double t_1 = ((t + y) / z) * x;
                  	double tmp;
                  	if (z <= -63000.0) {
                  		tmp = t_1;
                  	} else if (z <= 1.0) {
                  		tmp = (x / z) * (y - (t * 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 <= (-63000.0d0)) then
                          tmp = t_1
                      else if (z <= 1.0d0) then
                          tmp = (x / z) * (y - (t * 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 <= -63000.0) {
                  		tmp = t_1;
                  	} else if (z <= 1.0) {
                  		tmp = (x / z) * (y - (t * z));
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t):
                  	t_1 = ((t + y) / z) * x
                  	tmp = 0
                  	if z <= -63000.0:
                  		tmp = t_1
                  	elif z <= 1.0:
                  		tmp = (x / z) * (y - (t * 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 <= -63000.0)
                  		tmp = t_1;
                  	elseif (z <= 1.0)
                  		tmp = Float64(Float64(x / z) * Float64(y - Float64(t * 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 <= -63000.0)
                  		tmp = t_1;
                  	elseif (z <= 1.0)
                  		tmp = (x / z) * (y - (t * 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, -63000.0], t$95$1, If[LessEqual[z, 1.0], N[(N[(x / z), $MachinePrecision] * N[(y - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := \frac{t + y}{z} \cdot x\\
                  \mathbf{if}\;z \leq -63000:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;z \leq 1:\\
                  \;\;\;\;\frac{x}{z} \cdot \left(y - t \cdot z\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if z < -63000 or 1 < z

                    1. Initial program 98.2%

                      \[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 -63000 < z < 1

                    1. Initial program 91.5%

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(-t, z, y\right) \cdot \color{blue}{\frac{x}{z}} \]
                      2. Step-by-step derivation
                        1. Applied rewrites93.5%

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

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

                      Alternative 7: 74.2% accurate, 1.0× speedup?

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

                        1. Initial program 97.2%

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

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

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

                        if -1.14999999999999997e83 < z < 8.5e12

                        1. Initial program 92.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. +-commutativeN/A

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

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

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

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

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

                          \[\leadsto \color{blue}{\frac{x \cdot \mathsf{fma}\left(-t, z, y\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 rewrites85.3%

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

                          if 8.5e12 < z < 1.3e137

                          1. Initial program 99.7%

                            \[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. div-invN/A

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

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

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

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

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

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

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

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

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

                              \[\leadsto \left(\mathsf{fma}\left(1 - z, y, \left(\mathsf{neg}\left(z\right)\right) \cdot t\right) \cdot x\right) \cdot \frac{1}{\color{blue}{\left(1 - z\right) \cdot z}} \]
                            18. lower-*.f6478.7

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

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

                            \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{1 - z}} \]
                          6. 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{t \cdot x}{-1 + \color{blue}{z}} \]
                            13. lower-+.f6481.0

                              \[\leadsto \frac{t \cdot x}{\color{blue}{-1 + z}} \]
                          7. Applied rewrites81.0%

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

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

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

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

                          Alternative 8: 63.8% accurate, 1.0× speedup?

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

                            1. Initial program 97.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 \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. div-invN/A

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

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

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

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

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

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

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

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

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

                                \[\leadsto \left(\mathsf{fma}\left(1 - z, y, \left(\mathsf{neg}\left(z\right)\right) \cdot t\right) \cdot x\right) \cdot \frac{1}{\color{blue}{\left(1 - z\right) \cdot z}} \]
                              18. lower-*.f6464.7

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

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

                              \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{1 - z}} \]
                            6. 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{t \cdot x}{-1 + \color{blue}{z}} \]
                              13. lower-+.f6472.9

                                \[\leadsto \frac{t \cdot x}{\color{blue}{-1 + z}} \]
                            7. Applied rewrites72.9%

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

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

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

                              if -9.5000000000000003e62 < t < 4.99999999999999971e-253

                              1. Initial program 93.9%

                                \[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. div-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{x}{z} \cdot y \]
                              9. Step-by-step derivation
                                1. Applied rewrites84.2%

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

                                if 4.99999999999999971e-253 < t < 2.05000000000000001e182

                                1. Initial program 93.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{x \cdot y + z \cdot \left(-1 \cdot \left(t \cdot x\right) + -1 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)}{z}} \]
                                4. Step-by-step derivation
                                  1. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{x \cdot y}{z} \]
                                7. Step-by-step derivation
                                  1. Applied rewrites68.2%

                                    \[\leadsto \frac{x \cdot y}{z} \]
                                8. Recombined 3 regimes into one program.
                                9. Final simplification67.6%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.5 \cdot 10^{+62}:\\ \;\;\;\;\frac{x \cdot t}{z}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-253}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{+182}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot t}{z}\\ \end{array} \]
                                10. Add Preprocessing

                                Alternative 9: 93.8% accurate, 1.1× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t + y}{z} \cdot x\\ \mathbf{if}\;z \leq -63000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;\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 -63000.0) t_1 (if (<= z 1.0) (* (- (/ 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 <= -63000.0) {
                                		tmp = t_1;
                                	} else if (z <= 1.0) {
                                		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 <= (-63000.0d0)) then
                                        tmp = t_1
                                    else if (z <= 1.0d0) 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 <= -63000.0) {
                                		tmp = t_1;
                                	} else if (z <= 1.0) {
                                		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 <= -63000.0:
                                		tmp = t_1
                                	elif z <= 1.0:
                                		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 <= -63000.0)
                                		tmp = t_1;
                                	elseif (z <= 1.0)
                                		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 <= -63000.0)
                                		tmp = t_1;
                                	elseif (z <= 1.0)
                                		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, -63000.0], t$95$1, If[LessEqual[z, 1.0], 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 -63000:\\
                                \;\;\;\;t\_1\\
                                
                                \mathbf{elif}\;z \leq 1:\\
                                \;\;\;\;\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 < -63000 or 1 < z

                                  1. Initial program 98.2%

                                    \[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 -63000 < z < 1

                                  1. Initial program 91.5%

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

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

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

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

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

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

                                    \[\leadsto \color{blue}{\frac{x \cdot \mathsf{fma}\left(-t, z, y\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 rewrites90.5%

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

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

                                  Alternative 10: 59.9% accurate, 1.2× speedup?

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

                                    1. Initial program 93.5%

                                      \[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{x \cdot y + z \cdot \left(-1 \cdot \left(t \cdot x\right) + -1 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)}{z}} \]
                                    4. Step-by-step derivation
                                      1. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{\mathsf{fma}\left(x \cdot \mathsf{fma}\left(t, z, t\right), \mathsf{neg}\left(z\right), \color{blue}{y \cdot x}\right)}{z} \]
                                      17. lower-*.f6457.4

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

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

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

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

                                      if -6.1999999999999999e-153 < y < 3.8999999999999998e-14

                                      1. Initial program 98.5%

                                        \[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. +-commutativeN/A

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

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

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

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

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

                                        \[\leadsto \color{blue}{\frac{x \cdot \mathsf{fma}\left(-t, z, y\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 rewrites50.4%

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

                                      Alternative 11: 60.4% accurate, 1.5× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq 8500000000000:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot t}{z}\\ \end{array} \end{array} \]
                                      (FPCore (x y z t)
                                       :precision binary64
                                       (if (<= z 8500000000000.0) (/ (* x y) z) (/ (* x t) z)))
                                      double code(double x, double y, double z, double t) {
                                      	double tmp;
                                      	if (z <= 8500000000000.0) {
                                      		tmp = (x * y) / z;
                                      	} else {
                                      		tmp = (x * t) / z;
                                      	}
                                      	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) :: tmp
                                          if (z <= 8500000000000.0d0) then
                                              tmp = (x * y) / z
                                          else
                                              tmp = (x * t) / z
                                          end if
                                          code = tmp
                                      end function
                                      
                                      public static double code(double x, double y, double z, double t) {
                                      	double tmp;
                                      	if (z <= 8500000000000.0) {
                                      		tmp = (x * y) / z;
                                      	} else {
                                      		tmp = (x * t) / z;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      def code(x, y, z, t):
                                      	tmp = 0
                                      	if z <= 8500000000000.0:
                                      		tmp = (x * y) / z
                                      	else:
                                      		tmp = (x * t) / z
                                      	return tmp
                                      
                                      function code(x, y, z, t)
                                      	tmp = 0.0
                                      	if (z <= 8500000000000.0)
                                      		tmp = Float64(Float64(x * y) / z);
                                      	else
                                      		tmp = Float64(Float64(x * t) / z);
                                      	end
                                      	return tmp
                                      end
                                      
                                      function tmp_2 = code(x, y, z, t)
                                      	tmp = 0.0;
                                      	if (z <= 8500000000000.0)
                                      		tmp = (x * y) / z;
                                      	else
                                      		tmp = (x * t) / z;
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      code[x_, y_, z_, t_] := If[LessEqual[z, 8500000000000.0], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      \mathbf{if}\;z \leq 8500000000000:\\
                                      \;\;\;\;\frac{x \cdot y}{z}\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\frac{x \cdot t}{z}\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if z < 8.5e12

                                        1. Initial program 93.5%

                                          \[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{x \cdot y + z \cdot \left(-1 \cdot \left(t \cdot x\right) + -1 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)}{z}} \]
                                        4. Step-by-step derivation
                                          1. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{x \cdot y}{z} \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites65.4%

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

                                          if 8.5e12 < z

                                          1. Initial program 99.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 \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. div-invN/A

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \left(\mathsf{fma}\left(1 - z, y, \left(\mathsf{neg}\left(z\right)\right) \cdot t\right) \cdot x\right) \cdot \frac{1}{\color{blue}{\left(1 - z\right) \cdot z}} \]
                                            18. lower-*.f6450.8

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

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

                                            \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{1 - z}} \]
                                          6. 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 8500000000000:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot t}{z}\\ \end{array} \]
                                          12. Add Preprocessing

                                          Alternative 12: 23.5% accurate, 4.3× speedup?

                                          \[\begin{array}{l} \\ \left(-x\right) \cdot t \end{array} \]
                                          (FPCore (x y z t) :precision binary64 (* (- x) t))
                                          double code(double x, double y, double z, double t) {
                                          	return -x * t;
                                          }
                                          
                                          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 * t
                                          end function
                                          
                                          public static double code(double x, double y, double z, double t) {
                                          	return -x * t;
                                          }
                                          
                                          def code(x, y, z, t):
                                          	return -x * t
                                          
                                          function code(x, y, z, t)
                                          	return Float64(Float64(-x) * t)
                                          end
                                          
                                          function tmp = code(x, y, z, t)
                                          	tmp = -x * t;
                                          end
                                          
                                          code[x_, y_, z_, t_] := N[((-x) * t), $MachinePrecision]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \left(-x\right) \cdot t
                                          \end{array}
                                          
                                          Derivation
                                          1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \color{blue}{\frac{x \cdot \mathsf{fma}\left(-t, z, y\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 rewrites25.7%

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

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

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

                                            Reproduce

                                            ?
                                            herbie shell --seed 2024235 
                                            (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)))))