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

Percentage Accurate: 94.6% → 96.7%
Time: 8.3s
Alternatives: 12
Speedup: 0.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 12 alternatives:

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

Initial Program: 94.6% accurate, 1.0× speedup?

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

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

Alternative 1: 96.7% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

        1. Initial program 98.0%

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

      Alternative 2: 90.6% accurate, 0.7× speedup?

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

        1. Initial program 96.8%

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

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

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

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

          if -1.3e5 < z < 6.4000000000000001e-7

          1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 6.4000000000000001e-7 < z

          1. Initial program 96.8%

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

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

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

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

        Alternative 3: 90.1% accurate, 0.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -130000:\\ \;\;\;\;\frac{x}{z} \cdot \left(\left(\frac{t}{z} + y\right) + t\right)\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-18}:\\ \;\;\;\;\frac{\left(y - t \cdot z\right) \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(t + y\right) \cdot x}{z}\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (if (<= z -130000.0)
           (* (/ x z) (+ (+ (/ t z) y) t))
           (if (<= z 2.45e-18) (/ (* (- y (* t z)) x) z) (/ (* (+ t y) x) z))))
        double code(double x, double y, double z, double t) {
        	double tmp;
        	if (z <= -130000.0) {
        		tmp = (x / z) * (((t / z) + y) + t);
        	} else if (z <= 2.45e-18) {
        		tmp = ((y - (t * z)) * x) / z;
        	} else {
        		tmp = ((t + y) * x) / 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 <= (-130000.0d0)) then
                tmp = (x / z) * (((t / z) + y) + t)
            else if (z <= 2.45d-18) then
                tmp = ((y - (t * z)) * x) / z
            else
                tmp = ((t + y) * x) / z
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t) {
        	double tmp;
        	if (z <= -130000.0) {
        		tmp = (x / z) * (((t / z) + y) + t);
        	} else if (z <= 2.45e-18) {
        		tmp = ((y - (t * z)) * x) / z;
        	} else {
        		tmp = ((t + y) * x) / z;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	tmp = 0
        	if z <= -130000.0:
        		tmp = (x / z) * (((t / z) + y) + t)
        	elif z <= 2.45e-18:
        		tmp = ((y - (t * z)) * x) / z
        	else:
        		tmp = ((t + y) * x) / z
        	return tmp
        
        function code(x, y, z, t)
        	tmp = 0.0
        	if (z <= -130000.0)
        		tmp = Float64(Float64(x / z) * Float64(Float64(Float64(t / z) + y) + t));
        	elseif (z <= 2.45e-18)
        		tmp = Float64(Float64(Float64(y - Float64(t * z)) * x) / z);
        	else
        		tmp = Float64(Float64(Float64(t + y) * x) / z);
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t)
        	tmp = 0.0;
        	if (z <= -130000.0)
        		tmp = (x / z) * (((t / z) + y) + t);
        	elseif (z <= 2.45e-18)
        		tmp = ((y - (t * z)) * x) / z;
        	else
        		tmp = ((t + y) * x) / z;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_] := If[LessEqual[z, -130000.0], N[(N[(x / z), $MachinePrecision] * N[(N[(N[(t / z), $MachinePrecision] + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.45e-18], N[(N[(N[(y - N[(t * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(t + y), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z \leq -130000:\\
        \;\;\;\;\frac{x}{z} \cdot \left(\left(\frac{t}{z} + y\right) + t\right)\\
        
        \mathbf{elif}\;z \leq 2.45 \cdot 10^{-18}:\\
        \;\;\;\;\frac{\left(y - t \cdot z\right) \cdot x}{z}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\left(t + y\right) \cdot x}{z}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if z < -1.3e5

          1. Initial program 96.8%

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

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

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

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

            if -1.3e5 < z < 2.4500000000000001e-18

            1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 2.4500000000000001e-18 < z

            1. Initial program 96.9%

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

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

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

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

                \[\leadsto \frac{x \cdot \left(t + y\right)}{z} \]
            7. Recombined 3 regimes into one program.
            8. Final simplification90.5%

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

            Alternative 4: 90.0% accurate, 0.9× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -130000:\\ \;\;\;\;\left(t + y\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-18}:\\ \;\;\;\;\frac{\left(y - t \cdot z\right) \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(t + y\right) \cdot x}{z}\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (if (<= z -130000.0)
               (* (+ t y) (/ x z))
               (if (<= z 2.45e-18) (/ (* (- y (* t z)) x) z) (/ (* (+ t y) x) z))))
            double code(double x, double y, double z, double t) {
            	double tmp;
            	if (z <= -130000.0) {
            		tmp = (t + y) * (x / z);
            	} else if (z <= 2.45e-18) {
            		tmp = ((y - (t * z)) * x) / z;
            	} else {
            		tmp = ((t + y) * x) / 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 <= (-130000.0d0)) then
                    tmp = (t + y) * (x / z)
                else if (z <= 2.45d-18) then
                    tmp = ((y - (t * z)) * x) / z
                else
                    tmp = ((t + y) * x) / z
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t) {
            	double tmp;
            	if (z <= -130000.0) {
            		tmp = (t + y) * (x / z);
            	} else if (z <= 2.45e-18) {
            		tmp = ((y - (t * z)) * x) / z;
            	} else {
            		tmp = ((t + y) * x) / z;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	tmp = 0
            	if z <= -130000.0:
            		tmp = (t + y) * (x / z)
            	elif z <= 2.45e-18:
            		tmp = ((y - (t * z)) * x) / z
            	else:
            		tmp = ((t + y) * x) / z
            	return tmp
            
            function code(x, y, z, t)
            	tmp = 0.0
            	if (z <= -130000.0)
            		tmp = Float64(Float64(t + y) * Float64(x / z));
            	elseif (z <= 2.45e-18)
            		tmp = Float64(Float64(Float64(y - Float64(t * z)) * x) / z);
            	else
            		tmp = Float64(Float64(Float64(t + y) * x) / z);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	tmp = 0.0;
            	if (z <= -130000.0)
            		tmp = (t + y) * (x / z);
            	elseif (z <= 2.45e-18)
            		tmp = ((y - (t * z)) * x) / z;
            	else
            		tmp = ((t + y) * x) / z;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := If[LessEqual[z, -130000.0], N[(N[(t + y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.45e-18], N[(N[(N[(y - N[(t * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(t + y), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -130000:\\
            \;\;\;\;\left(t + y\right) \cdot \frac{x}{z}\\
            
            \mathbf{elif}\;z \leq 2.45 \cdot 10^{-18}:\\
            \;\;\;\;\frac{\left(y - t \cdot z\right) \cdot x}{z}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{\left(t + y\right) \cdot x}{z}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if z < -1.3e5

              1. Initial program 96.8%

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

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

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

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

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

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

                  if -1.3e5 < z < 2.4500000000000001e-18

                  1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 2.4500000000000001e-18 < z

                  1. Initial program 96.9%

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

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

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

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

                      \[\leadsto \frac{x \cdot \left(t + y\right)}{z} \]
                  7. Recombined 3 regimes into one program.
                  8. Final simplification90.5%

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

                  Alternative 5: 75.5% accurate, 1.0× speedup?

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

                    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if -3.6e15 < t < 4.9e8

                    1. Initial program 92.7%

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

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

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

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

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

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

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

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

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

                    Alternative 6: 75.4% accurate, 1.1× speedup?

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

                      1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -4.6e15 < t < 4.9e8

                      1. Initial program 92.7%

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

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

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

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

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

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

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

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

                    Alternative 7: 77.3% accurate, 1.1× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.35 \cdot 10^{-151}:\\ \;\;\;\;\left(t + y\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-18}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(t + y\right) \cdot x}{z}\\ \end{array} \end{array} \]
                    (FPCore (x y z t)
                     :precision binary64
                     (if (<= z -2.35e-151)
                       (* (+ t y) (/ x z))
                       (if (<= z 2.45e-18) (* (/ x z) y) (/ (* (+ t y) x) z))))
                    double code(double x, double y, double z, double t) {
                    	double tmp;
                    	if (z <= -2.35e-151) {
                    		tmp = (t + y) * (x / z);
                    	} else if (z <= 2.45e-18) {
                    		tmp = (x / z) * y;
                    	} else {
                    		tmp = ((t + y) * x) / 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 <= (-2.35d-151)) then
                            tmp = (t + y) * (x / z)
                        else if (z <= 2.45d-18) then
                            tmp = (x / z) * y
                        else
                            tmp = ((t + y) * x) / z
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t) {
                    	double tmp;
                    	if (z <= -2.35e-151) {
                    		tmp = (t + y) * (x / z);
                    	} else if (z <= 2.45e-18) {
                    		tmp = (x / z) * y;
                    	} else {
                    		tmp = ((t + y) * x) / z;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t):
                    	tmp = 0
                    	if z <= -2.35e-151:
                    		tmp = (t + y) * (x / z)
                    	elif z <= 2.45e-18:
                    		tmp = (x / z) * y
                    	else:
                    		tmp = ((t + y) * x) / z
                    	return tmp
                    
                    function code(x, y, z, t)
                    	tmp = 0.0
                    	if (z <= -2.35e-151)
                    		tmp = Float64(Float64(t + y) * Float64(x / z));
                    	elseif (z <= 2.45e-18)
                    		tmp = Float64(Float64(x / z) * y);
                    	else
                    		tmp = Float64(Float64(Float64(t + y) * x) / z);
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t)
                    	tmp = 0.0;
                    	if (z <= -2.35e-151)
                    		tmp = (t + y) * (x / z);
                    	elseif (z <= 2.45e-18)
                    		tmp = (x / z) * y;
                    	else
                    		tmp = ((t + y) * x) / z;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_] := If[LessEqual[z, -2.35e-151], N[(N[(t + y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.45e-18], N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision], N[(N[(N[(t + y), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;z \leq -2.35 \cdot 10^{-151}:\\
                    \;\;\;\;\left(t + y\right) \cdot \frac{x}{z}\\
                    
                    \mathbf{elif}\;z \leq 2.45 \cdot 10^{-18}:\\
                    \;\;\;\;\frac{x}{z} \cdot y\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{\left(t + y\right) \cdot x}{z}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if z < -2.35000000000000014e-151

                      1. Initial program 96.6%

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

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

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

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

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

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

                          if -2.35000000000000014e-151 < z < 2.4500000000000001e-18

                          1. Initial program 89.4%

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

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

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

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

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

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

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

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

                            if 2.4500000000000001e-18 < z

                            1. Initial program 96.9%

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

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

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

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

                                \[\leadsto \frac{x \cdot \left(t + y\right)}{z} \]
                            7. Recombined 3 regimes into one program.
                            8. Final simplification81.6%

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

                            Alternative 8: 77.6% accurate, 1.1× speedup?

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

                              1. Initial program 96.7%

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

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

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

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

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

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

                                  if -2.35000000000000014e-151 < z < 2.4500000000000001e-18

                                  1. Initial program 89.4%

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

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

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

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

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

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

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

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

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

                                  Alternative 9: 64.0% accurate, 1.2× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{z} \cdot t\\ \mathbf{if}\;t \leq -1.05 \cdot 10^{+16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.65 \cdot 10^{+101}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                  (FPCore (x y z t)
                                   :precision binary64
                                   (let* ((t_1 (* (/ x z) t)))
                                     (if (<= t -1.05e+16) t_1 (if (<= t 2.65e+101) (* x (/ y z)) t_1))))
                                  double code(double x, double y, double z, double t) {
                                  	double t_1 = (x / z) * t;
                                  	double tmp;
                                  	if (t <= -1.05e+16) {
                                  		tmp = t_1;
                                  	} else if (t <= 2.65e+101) {
                                  		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 / z) * t
                                      if (t <= (-1.05d+16)) then
                                          tmp = t_1
                                      else if (t <= 2.65d+101) 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 / z) * t;
                                  	double tmp;
                                  	if (t <= -1.05e+16) {
                                  		tmp = t_1;
                                  	} else if (t <= 2.65e+101) {
                                  		tmp = x * (y / z);
                                  	} else {
                                  		tmp = t_1;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x, y, z, t):
                                  	t_1 = (x / z) * t
                                  	tmp = 0
                                  	if t <= -1.05e+16:
                                  		tmp = t_1
                                  	elif t <= 2.65e+101:
                                  		tmp = x * (y / z)
                                  	else:
                                  		tmp = t_1
                                  	return tmp
                                  
                                  function code(x, y, z, t)
                                  	t_1 = Float64(Float64(x / z) * t)
                                  	tmp = 0.0
                                  	if (t <= -1.05e+16)
                                  		tmp = t_1;
                                  	elseif (t <= 2.65e+101)
                                  		tmp = Float64(x * Float64(y / z));
                                  	else
                                  		tmp = t_1;
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x, y, z, t)
                                  	t_1 = (x / z) * t;
                                  	tmp = 0.0;
                                  	if (t <= -1.05e+16)
                                  		tmp = t_1;
                                  	elseif (t <= 2.65e+101)
                                  		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 / z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -1.05e+16], t$95$1, If[LessEqual[t, 2.65e+101], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  t_1 := \frac{x}{z} \cdot t\\
                                  \mathbf{if}\;t \leq -1.05 \cdot 10^{+16}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  \mathbf{elif}\;t \leq 2.65 \cdot 10^{+101}:\\
                                  \;\;\;\;x \cdot \frac{y}{z}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if t < -1.05e16 or 2.65000000000000003e101 < t

                                    1. Initial program 95.6%

                                      \[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--.f6467.9

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

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

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

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

                                      if -1.05e16 < t < 2.65000000000000003e101

                                      1. Initial program 93.0%

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

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

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

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

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

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

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

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+16}:\\ \;\;\;\;\frac{x}{z} \cdot t\\ \mathbf{elif}\;t \leq 2.65 \cdot 10^{+101}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot t\\ \end{array} \]
                                    10. Add Preprocessing

                                    Alternative 10: 63.8% accurate, 1.2× speedup?

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

                                      1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        if -5.2e15 < t < 3.00000000000000003e149

                                        1. Initial program 92.9%

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

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

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

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

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

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

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

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

                                        Alternative 11: 43.2% accurate, 1.2× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{z} \cdot t\\ \mathbf{if}\;z \leq -130000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-18}:\\ \;\;\;\;\left(-t\right) \cdot \mathsf{fma}\left(z, x, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                        (FPCore (x y z t)
                                         :precision binary64
                                         (let* ((t_1 (* (/ x z) t)))
                                           (if (<= z -130000.0) t_1 (if (<= z 2.45e-18) (* (- t) (fma z x x)) t_1))))
                                        double code(double x, double y, double z, double t) {
                                        	double t_1 = (x / z) * t;
                                        	double tmp;
                                        	if (z <= -130000.0) {
                                        		tmp = t_1;
                                        	} else if (z <= 2.45e-18) {
                                        		tmp = -t * fma(z, x, x);
                                        	} else {
                                        		tmp = t_1;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        function code(x, y, z, t)
                                        	t_1 = Float64(Float64(x / z) * t)
                                        	tmp = 0.0
                                        	if (z <= -130000.0)
                                        		tmp = t_1;
                                        	elseif (z <= 2.45e-18)
                                        		tmp = Float64(Float64(-t) * fma(z, x, x));
                                        	else
                                        		tmp = t_1;
                                        	end
                                        	return tmp
                                        end
                                        
                                        code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[z, -130000.0], t$95$1, If[LessEqual[z, 2.45e-18], N[((-t) * N[(z * x + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        t_1 := \frac{x}{z} \cdot t\\
                                        \mathbf{if}\;z \leq -130000:\\
                                        \;\;\;\;t\_1\\
                                        
                                        \mathbf{elif}\;z \leq 2.45 \cdot 10^{-18}:\\
                                        \;\;\;\;\left(-t\right) \cdot \mathsf{fma}\left(z, x, x\right)\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;t\_1\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 2 regimes
                                        2. if z < -1.3e5 or 2.4500000000000001e-18 < z

                                          1. Initial program 96.8%

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

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

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

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

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

                                            if -1.3e5 < z < 2.4500000000000001e-18

                                            1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            Alternative 12: 23.7% accurate, 4.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              Developer Target 1: 95.1% 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 2024296 
                                              (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)))))