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

Percentage Accurate: 94.6% → 94.6%
Time: 8.5s
Alternatives: 14
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 94.6% accurate, 1.0× speedup?

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

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

Alternative 1: 94.6% accurate, 1.0× speedup?

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

\\
x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)
\end{array}
Derivation
  1. Initial program 95.8%

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

Alternative 2: 93.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.75 \lor \neg \left(z \leq 0.001\right):\\
\;\;\;\;x \cdot \frac{t + y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.75 or 1e-3 < z

    1. Initial program 96.5%

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

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

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

    if -0.75 < z < 1e-3

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 93.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.98 \lor \neg \left(z \leq 0.001\right):\\
\;\;\;\;x \cdot \frac{t + y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.97999999999999998 or 1e-3 < z

    1. Initial program 96.5%

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

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

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

    if -0.97999999999999998 < z < 1e-3

    1. Initial program 95.0%

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y + -1 \cdot \left(t \cdot \left(x \cdot z\right)\right)}}{z} \]
      3. 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-*.f6494.0

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

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

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

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

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

    Alternative 4: 93.7% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 0.001\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.001)))
       (* 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.001)) {
    		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.001d0))) 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.001)) {
    		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.001):
    		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.001))
    		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.001)))
    		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.001]], $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.001\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 1e-3 < z

      1. Initial program 96.5%

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

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

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

      if -1 < z < 1e-3

      1. Initial program 95.0%

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

        \[\leadsto x \cdot \color{blue}{\frac{y + -1 \cdot \left(t \cdot z\right)}{z}} \]
      4. Step-by-step derivation
        1. 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-/.f6494.7

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

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

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

    Alternative 5: 78.6% accurate, 1.1× speedup?

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

      1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{x \cdot \left(y - -1 \cdot t\right)}{z}} \]
        3. 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. lower-+.f6486.4

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

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

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

          if -4.7000000000000002e-79 < z < 1e-3

          1. Initial program 94.2%

            \[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-/.f6470.0

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

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

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

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

          Alternative 6: 88.7% accurate, 1.1× speedup?

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

            1. Initial program 96.8%

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

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

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

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

            if -1 < z < 1e-3

            1. Initial program 95.0%

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

              \[\leadsto x \cdot \color{blue}{\frac{y + -1 \cdot \left(t \cdot z\right)}{z}} \]
            4. Step-by-step derivation
              1. 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-/.f6494.7

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

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

            if 1e-3 < z

            1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\frac{x \cdot \left(y - -1 \cdot t\right)}{z}} \]
              3. 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. lower-+.f6488.7

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

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

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

              Alternative 7: 78.7% accurate, 1.1× speedup?

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

                1. Initial program 97.3%

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

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

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

                if -4.60000000000000023e-79 < z < 1e-3

                1. Initial program 94.2%

                  \[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-/.f6470.0

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

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

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

                  if 1e-3 < z

                  1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{x \cdot \left(y - -1 \cdot t\right)}{z}} \]
                    3. 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. lower-+.f6488.7

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

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

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

                    Alternative 8: 72.2% accurate, 1.1× speedup?

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

                      1. Initial program 93.3%

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

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

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

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

                        if -3e-152 < y < 2.34999999999999999e-107

                        1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 2.34999999999999999e-107 < y

                          1. Initial program 97.5%

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

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

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

                        Alternative 9: 42.2% accurate, 1.2× speedup?

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

                          1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \color{blue}{\frac{x \cdot \left(y - -1 \cdot t\right)}{z}} \]
                            3. 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. lower-+.f6488.7

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

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

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

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

                              if -0.75 < z < 1.2e20

                              1. Initial program 95.1%

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

                                  \[\leadsto x \cdot \frac{t}{\color{blue}{-1 + z}} \]
                              5. Applied rewrites29.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 rewrites29.3%

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

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

                              Alternative 10: 65.9% accurate, 1.2× speedup?

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

                                1. Initial program 92.6%

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

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

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

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

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

                                  if -9.0000000000000005e216 < t < 3.50000000000000006e200

                                  1. Initial program 96.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-/.f6475.3

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

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

                                  if 3.50000000000000006e200 < t

                                  1. Initial program 91.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-+.f6478.7

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

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

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

                                  Alternative 11: 65.1% accurate, 1.2× speedup?

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

                                    1. Initial program 92.6%

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

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

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

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

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

                                      if -9.0000000000000005e216 < t < 3.50000000000000006e200

                                      1. Initial program 96.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-/.f6475.3

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

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

                                      if 3.50000000000000006e200 < t

                                      1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \color{blue}{\frac{x \cdot \left(y - -1 \cdot t\right)}{z}} \]
                                        3. 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. lower-+.f6454.3

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

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

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

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

                                        Alternative 12: 65.1% accurate, 1.2× speedup?

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

                                          1. Initial program 92.6%

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

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

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

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

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

                                            if -9.0000000000000005e216 < t < 3.5999999999999998e200

                                            1. Initial program 96.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-/.f6475.3

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

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

                                            if 3.5999999999999998e200 < t

                                            1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \color{blue}{\frac{x \cdot \left(y - -1 \cdot t\right)}{z}} \]
                                              3. 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. lower-+.f6454.3

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

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

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

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

                                              Alternative 13: 62.2% accurate, 1.5× speedup?

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

                                                1. Initial program 92.6%

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

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

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

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

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

                                                  if -9.0000000000000005e216 < t

                                                  1. Initial program 96.2%

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

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

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

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

                                                  Alternative 14: 22.9% 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 95.8%

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

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

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

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

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

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

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

                                                    Reproduce

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