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

Percentage Accurate: 95.0% → 98.6%
Time: 8.7s
Alternatives: 13
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 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: 95.0% accurate, 1.0× speedup?

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

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

Alternative 1: 98.6% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 63.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-/.f6463.7

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

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

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

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

      1. Initial program 97.7%

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

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

      1. Initial program 49.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-/.f6449.4

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

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

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

      Alternative 2: 77.0% accurate, 0.9× speedup?

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

        1. Initial program 96.1%

          \[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)}{z}} \]
        4. Step-by-step derivation
          1. lower-/.f64N/A

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

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

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

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

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

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

            \[\leadsto \frac{\color{blue}{\left(t + y\right)} \cdot x}{z} \]
          8. lower-+.f6481.6

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

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

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

          if -5.6e-38 < z < 3.4e-136

          1. Initial program 87.1%

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

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

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

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

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

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

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

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

            if 3.4e-136 < z < 4.99999999999999963e-77

            1. Initial program 99.7%

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

              \[\leadsto 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. *-lft-identityN/A

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

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

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

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

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

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

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

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

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

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

                \[\leadsto x \cdot \left(-\mathsf{fma}\left(z, t, t\right)\right) \]
            8. Recombined 3 regimes into one program.
            9. Add Preprocessing

            Alternative 3: 95.7% accurate, 0.9× speedup?

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

              1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

              if -1 < z < 1

              1. Initial program 89.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 4: 94.1% accurate, 1.1× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 0.225\right):\\ \;\;\;\;x \cdot \frac{t + y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (if (or (<= z -1.0) (not (<= z 0.225)))
               (* x (/ (+ t y) z))
               (* x (- (/ y z) t))))
            double code(double x, double y, double z, double t) {
            	double tmp;
            	if ((z <= -1.0) || !(z <= 0.225)) {
            		tmp = x * ((t + y) / z);
            	} else {
            		tmp = x * ((y / z) - t);
            	}
            	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 <= (-1.0d0)) .or. (.not. (z <= 0.225d0))) then
                    tmp = x * ((t + y) / z)
                else
                    tmp = x * ((y / z) - t)
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t) {
            	double tmp;
            	if ((z <= -1.0) || !(z <= 0.225)) {
            		tmp = x * ((t + y) / z);
            	} else {
            		tmp = x * ((y / z) - t);
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	tmp = 0
            	if (z <= -1.0) or not (z <= 0.225):
            		tmp = x * ((t + y) / z)
            	else:
            		tmp = x * ((y / z) - t)
            	return tmp
            
            function code(x, y, z, t)
            	tmp = 0.0
            	if ((z <= -1.0) || !(z <= 0.225))
            		tmp = Float64(x * Float64(Float64(t + y) / z));
            	else
            		tmp = Float64(x * Float64(Float64(y / z) - t));
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	tmp = 0.0;
            	if ((z <= -1.0) || ~((z <= 0.225)))
            		tmp = x * ((t + y) / z);
            	else
            		tmp = x * ((y / z) - t);
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.0], N[Not[LessEqual[z, 0.225]], $MachinePrecision]], N[(x * N[(N[(t + y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 0.225\right):\\
            \;\;\;\;x \cdot \frac{t + y}{z}\\
            
            \mathbf{else}:\\
            \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -1 or 0.225000000000000006 < z

              1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

              if -1 < z < 0.225000000000000006

              1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

                  \[\leadsto x \cdot \color{blue}{\left(\frac{y}{z} - t\right)} \]
                9. lower-/.f6488.0

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

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

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

            Alternative 5: 76.9% accurate, 1.1× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{-181} \lor \neg \left(y \leq 3.05 \cdot 10^{-102}\right):\\ \;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot x}{-1 + z}\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (if (or (<= y -1.8e-181) (not (<= y 3.05e-102)))
               (* (/ x z) (+ y t))
               (/ (* t x) (+ -1.0 z))))
            double code(double x, double y, double z, double t) {
            	double tmp;
            	if ((y <= -1.8e-181) || !(y <= 3.05e-102)) {
            		tmp = (x / z) * (y + t);
            	} else {
            		tmp = (t * x) / (-1.0 + 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 ((y <= (-1.8d-181)) .or. (.not. (y <= 3.05d-102))) then
                    tmp = (x / z) * (y + t)
                else
                    tmp = (t * x) / ((-1.0d0) + z)
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t) {
            	double tmp;
            	if ((y <= -1.8e-181) || !(y <= 3.05e-102)) {
            		tmp = (x / z) * (y + t);
            	} else {
            		tmp = (t * x) / (-1.0 + z);
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	tmp = 0
            	if (y <= -1.8e-181) or not (y <= 3.05e-102):
            		tmp = (x / z) * (y + t)
            	else:
            		tmp = (t * x) / (-1.0 + z)
            	return tmp
            
            function code(x, y, z, t)
            	tmp = 0.0
            	if ((y <= -1.8e-181) || !(y <= 3.05e-102))
            		tmp = Float64(Float64(x / z) * Float64(y + t));
            	else
            		tmp = Float64(Float64(t * x) / Float64(-1.0 + z));
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	tmp = 0.0;
            	if ((y <= -1.8e-181) || ~((y <= 3.05e-102)))
            		tmp = (x / z) * (y + t);
            	else
            		tmp = (t * x) / (-1.0 + z);
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.8e-181], N[Not[LessEqual[y, 3.05e-102]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] * N[(y + t), $MachinePrecision]), $MachinePrecision], N[(N[(t * x), $MachinePrecision] / N[(-1.0 + z), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;y \leq -1.8 \cdot 10^{-181} \lor \neg \left(y \leq 3.05 \cdot 10^{-102}\right):\\
            \;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{t \cdot x}{-1 + z}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if y < -1.8e-181 or 3.0499999999999999e-102 < y

              1. Initial program 92.2%

                \[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)}{z}} \]
              4. Step-by-step derivation
                1. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

                if -1.8e-181 < y < 3.0499999999999999e-102

                1. Initial program 94.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. *-lft-identityN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\frac{t \cdot x}{-1 + z}} \]
              7. Recombined 2 regimes into one program.
              8. Final simplification79.3%

                \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{-181} \lor \neg \left(y \leq 3.05 \cdot 10^{-102}\right):\\ \;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot x}{-1 + z}\\ \end{array} \]
              9. Add Preprocessing

              Alternative 6: 89.3% accurate, 1.1× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1:\\ \;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\ \mathbf{elif}\;z \leq 0.225:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(t + y\right) \cdot x}{z}\\ \end{array} \end{array} \]
              (FPCore (x y z t)
               :precision binary64
               (if (<= z -1.0)
                 (* (/ x z) (+ y t))
                 (if (<= z 0.225) (* x (- (/ y z) t)) (/ (* (+ t y) x) z))))
              double code(double x, double y, double z, double t) {
              	double tmp;
              	if (z <= -1.0) {
              		tmp = (x / z) * (y + t);
              	} else if (z <= 0.225) {
              		tmp = x * ((y / z) - t);
              	} 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 <= (-1.0d0)) then
                      tmp = (x / z) * (y + t)
                  else if (z <= 0.225d0) then
                      tmp = x * ((y / z) - t)
                  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 <= -1.0) {
              		tmp = (x / z) * (y + t);
              	} else if (z <= 0.225) {
              		tmp = x * ((y / z) - t);
              	} else {
              		tmp = ((t + y) * x) / z;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t):
              	tmp = 0
              	if z <= -1.0:
              		tmp = (x / z) * (y + t)
              	elif z <= 0.225:
              		tmp = x * ((y / z) - t)
              	else:
              		tmp = ((t + y) * x) / z
              	return tmp
              
              function code(x, y, z, t)
              	tmp = 0.0
              	if (z <= -1.0)
              		tmp = Float64(Float64(x / z) * Float64(y + t));
              	elseif (z <= 0.225)
              		tmp = Float64(x * Float64(Float64(y / z) - t));
              	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 <= -1.0)
              		tmp = (x / z) * (y + t);
              	elseif (z <= 0.225)
              		tmp = x * ((y / z) - t);
              	else
              		tmp = ((t + y) * x) / z;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_] := If[LessEqual[z, -1.0], N[(N[(x / z), $MachinePrecision] * N[(y + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.225], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t + y), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;z \leq -1:\\
              \;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\
              
              \mathbf{elif}\;z \leq 0.225:\\
              \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
              
              \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

                1. Initial program 94.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)}{z}} \]
                4. Step-by-step derivation
                  1. lower-/.f64N/A

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

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

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

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

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

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

                    \[\leadsto \frac{\color{blue}{\left(t + y\right)} \cdot x}{z} \]
                  8. lower-+.f6483.0

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

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

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

                  if -1 < z < 0.225000000000000006

                  1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

                      \[\leadsto x \cdot \color{blue}{\left(\frac{y}{z} - t\right)} \]
                    9. lower-/.f6488.0

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

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

                  if 0.225000000000000006 < z

                  1. Initial program 97.4%

                    \[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)}{z}} \]
                  4. Step-by-step derivation
                    1. lower-/.f64N/A

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

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

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

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

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

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

                      \[\leadsto \frac{\color{blue}{\left(t + y\right)} \cdot x}{z} \]
                    8. lower-+.f6489.4

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

                    \[\leadsto \color{blue}{\frac{\left(t + y\right) \cdot x}{z}} \]
                7. Recombined 3 regimes into one program.
                8. Add Preprocessing

                Alternative 7: 76.9% accurate, 1.1× speedup?

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

                  1. Initial program 91.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)}{z}} \]
                  4. Step-by-step derivation
                    1. lower-/.f64N/A

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

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

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

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

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

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

                      \[\leadsto \frac{\color{blue}{\left(t + y\right)} \cdot x}{z} \]
                    8. lower-+.f6472.6

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

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

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

                    if -1.8e-181 < y < 3.0499999999999999e-102

                    1. Initial program 94.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. *-lft-identityN/A

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

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

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

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

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

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

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

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

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

                    if 3.0499999999999999e-102 < y

                    1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{\left(t + y\right) \cdot x}{z}} \]
                  7. Recombined 3 regimes into one program.
                  8. Add Preprocessing

                  Alternative 8: 42.9% accurate, 1.2× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.75 \lor \neg \left(z \leq 0.225\right):\\ \;\;\;\;\frac{x}{z} \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-\mathsf{fma}\left(z, t, t\right)\right)\\ \end{array} \end{array} \]
                  (FPCore (x y z t)
                   :precision binary64
                   (if (or (<= z -0.75) (not (<= z 0.225))) (* (/ x z) t) (* x (- (fma z t t)))))
                  double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if ((z <= -0.75) || !(z <= 0.225)) {
                  		tmp = (x / z) * t;
                  	} else {
                  		tmp = x * -fma(z, t, t);
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t)
                  	tmp = 0.0
                  	if ((z <= -0.75) || !(z <= 0.225))
                  		tmp = Float64(Float64(x / z) * t);
                  	else
                  		tmp = Float64(x * Float64(-fma(z, t, t)));
                  	end
                  	return tmp
                  end
                  
                  code[x_, y_, z_, t_] := If[Or[LessEqual[z, -0.75], N[Not[LessEqual[z, 0.225]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] * t), $MachinePrecision], N[(x * (-N[(z * t + t), $MachinePrecision])), $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;z \leq -0.75 \lor \neg \left(z \leq 0.225\right):\\
                  \;\;\;\;\frac{x}{z} \cdot t\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;x \cdot \left(-\mathsf{fma}\left(z, t, t\right)\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if z < -0.75 or 0.225000000000000006 < z

                    1. Initial program 96.2%

                      \[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)}{z}} \]
                    4. Step-by-step derivation
                      1. lower-/.f64N/A

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

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

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

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

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

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

                        \[\leadsto \frac{\color{blue}{\left(t + y\right)} \cdot x}{z} \]
                      8. lower-+.f6486.5

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

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

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

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

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

                        if -0.75 < z < 0.225000000000000006

                        1. Initial program 89.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. *-lft-identityN/A

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.75 \lor \neg \left(z \leq 0.225\right):\\ \;\;\;\;\frac{x}{z} \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-\mathsf{fma}\left(z, t, t\right)\right)\\ \end{array} \]
                        10. Add Preprocessing

                        Alternative 9: 64.1% accurate, 1.2× speedup?

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

                          1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

                              \[\leadsto x \cdot \color{blue}{\left(\frac{y}{z} - t\right)} \]
                            9. lower-/.f6466.6

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

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

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

                              \[\leadsto x \cdot \left(-t\right) \]

                            if -4.10000000000000015e241 < t < 1.7e234

                            1. Initial program 92.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-/.f6466.4

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

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

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

                              if 1.7e234 < t

                              1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 10: 63.2% accurate, 1.2× speedup?

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

                                1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

                                    \[\leadsto x \cdot \color{blue}{\left(\frac{y}{z} - t\right)} \]
                                  9. lower-/.f6466.6

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

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

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

                                    \[\leadsto x \cdot \left(-t\right) \]

                                  if -4.10000000000000015e241 < t < 1.32e253

                                  1. Initial program 92.1%

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

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

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

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

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

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

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

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

                                    if 1.32e253 < t

                                    1. Initial program 99.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)}{z}} \]
                                    4. Step-by-step derivation
                                      1. lower-/.f64N/A

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

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

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

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

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

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

                                        \[\leadsto \frac{\color{blue}{\left(t + y\right)} \cdot x}{z} \]
                                      8. lower-+.f6468.0

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

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

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

                                        \[\leadsto \frac{x \cdot t}{z} \]
                                    8. Recombined 3 regimes into one program.
                                    9. Add Preprocessing

                                    Alternative 11: 62.9% accurate, 1.2× speedup?

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

                                      1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

                                          \[\leadsto x \cdot \color{blue}{\left(\frac{y}{z} - t\right)} \]
                                        9. lower-/.f6466.6

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

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

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

                                          \[\leadsto x \cdot \left(-t\right) \]

                                        if -4.10000000000000015e241 < t < 1.8e253

                                        1. Initial program 92.1%

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

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

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

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

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

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

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

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

                                          if 1.8e253 < t

                                          1. Initial program 99.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)}{z}} \]
                                          4. Step-by-step derivation
                                            1. lower-/.f64N/A

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

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

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

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

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

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

                                              \[\leadsto \frac{\color{blue}{\left(t + y\right)} \cdot x}{z} \]
                                            8. lower-+.f6468.0

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

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

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

                                              \[\leadsto \frac{x \cdot t}{z} \]
                                          8. Recombined 3 regimes into one program.
                                          9. Add Preprocessing

                                          Alternative 12: 62.9% accurate, 1.2× speedup?

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

                                            1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

                                                \[\leadsto x \cdot \color{blue}{\left(\frac{y}{z} - t\right)} \]
                                              9. lower-/.f6466.6

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

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

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

                                                \[\leadsto x \cdot \left(-t\right) \]

                                              if -4.10000000000000015e241 < t < 1.85000000000000014e253

                                              1. Initial program 92.1%

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

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

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

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

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

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

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

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

                                                if 1.85000000000000014e253 < t

                                                1. Initial program 99.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)}{z}} \]
                                                4. Step-by-step derivation
                                                  1. lower-/.f64N/A

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

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

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

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

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

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

                                                    \[\leadsto \frac{\color{blue}{\left(t + y\right)} \cdot x}{z} \]
                                                  8. lower-+.f6468.0

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

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

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

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

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

                                                  Alternative 13: 22.5% accurate, 4.3× speedup?

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto x \cdot \color{blue}{\left(\frac{y}{z} - t\right)} \]
                                                    9. lower-/.f6463.7

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

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

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

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

                                                    Developer Target 1: 95.3% 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 2024339 
                                                    (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)))))