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

Percentage Accurate: 95.0% → 95.0%
Time: 8.1s
Alternatives: 13
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 13 alternatives:

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

Initial Program: 95.0% accurate, 1.0× speedup?

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

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

Alternative 1: 95.0% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 94.3% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.7e7 or 1 < z

    1. Initial program 98.3%

      \[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. metadata-evalN/A

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

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

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

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

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

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

    if -1.7e7 < z < 1

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 77.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{\left(t + y\right) \cdot x}{z}\\
\mathbf{if}\;y \leq -3.1 \cdot 10^{-114}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.8 \cdot 10^{-156}:\\
\;\;\;\;\frac{x}{z - 1} \cdot t\\

\mathbf{elif}\;y \leq 3.95 \cdot 10^{+182}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.1e-114 or 1.79999999999999999e-156 < y < 3.9500000000000001e182

    1. Initial program 95.7%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.1e-114 < y < 1.79999999999999999e-156

    1. Initial program 99.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

      if 3.9500000000000001e182 < y

      1. Initial program 87.9%

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

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

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

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

          \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
        4. lower-/.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 rewrites79.7%

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

      Alternative 4: 95.0% accurate, 0.9× speedup?

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

        1. Initial program 98.3%

          \[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. metadata-evalN/A

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

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

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

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

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

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

        if -1.7e7 < z < 1

        1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 5: 63.6% accurate, 1.0× speedup?

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

        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 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.8

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

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

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

          if -6.1999999999999997e-36 < y < 1.15000000000000001e-278

          1. Initial program 99.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. sub-negN/A

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

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

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

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

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

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

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

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

              \[\leadsto x \cdot \frac{t}{\color{blue}{z - \frac{1}{z} \cdot z}} \]
            13. lft-mult-inverseN/A

              \[\leadsto x \cdot \frac{t}{z - \color{blue}{1}} \]
            14. lower--.f6479.8

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

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

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

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

            if 1.15000000000000001e-278 < y < 2.34999999999999988e-172

            1. Initial program 99.9%

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x \cdot \color{blue}{\left(y - t \cdot z\right)}}{z} \]
              13. lower-*.f6474.3

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

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

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

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

              if 2.34999999999999988e-172 < y

              1. Initial program 93.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.9

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

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{-36}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-278}:\\ \;\;\;\;\frac{t}{z} \cdot x\\ \mathbf{elif}\;y \leq 2.35 \cdot 10^{-172}:\\ \;\;\;\;\left(-t\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \end{array} \]
              9. Add Preprocessing

              Alternative 6: 63.1% accurate, 1.0× speedup?

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

                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 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.8

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

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

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

                  if -6.1999999999999997e-36 < y < 3.3e-279

                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 3.3e-279 < y < 2.34999999999999988e-172

                      1. Initial program 99.9%

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{x \cdot \color{blue}{\left(y - t \cdot z\right)}}{z} \]
                        13. lower-*.f6474.3

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

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

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

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

                        if 2.34999999999999988e-172 < y

                        1. Initial program 93.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.9

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

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

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{-36}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{-279}:\\ \;\;\;\;\frac{x}{z} \cdot t\\ \mathbf{elif}\;y \leq 2.35 \cdot 10^{-172}:\\ \;\;\;\;\left(-t\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \end{array} \]
                        9. Add Preprocessing

                        Alternative 7: 64.1% accurate, 1.0× speedup?

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

                          1. Initial program 94.9%

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

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

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

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

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

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

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

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

                            if -2.9500000000000002e-117 < y < 3.3e-279

                            1. Initial program 99.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if 3.3e-279 < y < 2.34999999999999988e-172

                                1. Initial program 99.9%

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{x \cdot \color{blue}{\left(y - t \cdot z\right)}}{z} \]
                                  13. lower-*.f6474.3

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

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

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

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

                                Alternative 8: 94.1% accurate, 1.1× speedup?

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

                                  1. Initial program 98.3%

                                    \[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. metadata-evalN/A

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

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

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

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

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

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

                                  if -1.7e7 < z < 1

                                  1. Initial program 93.6%

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

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

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

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

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

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

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

                                      \[\leadsto x \cdot \color{blue}{\left(\frac{y}{z} - t \cdot 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-/.f6492.2

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

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

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

                                Alternative 9: 89.1% accurate, 1.1× speedup?

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

                                  1. Initial program 98.4%

                                    \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
                                  2. Add Preprocessing
                                  3. Step-by-step derivation
                                    1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if -7.49999999999999957e-19 < z < 1

                                  1. Initial program 93.4%

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

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

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

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

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

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

                                      \[\leadsto x \cdot \color{blue}{\left(\frac{y}{z} - t \cdot 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-/.f6491.9

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

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

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

                                Alternative 10: 71.8% accurate, 1.1× speedup?

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

                                  1. Initial program 95.5%

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

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

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

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

                                    if -1.64000000000000006e-23 < y < 2.10000000000000012e-156

                                    1. Initial program 99.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                                      if 2.10000000000000012e-156 < y

                                      1. Initial program 92.8%

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

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

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

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

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.64 \cdot 10^{-23}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-156}:\\ \;\;\;\;\frac{x}{z - 1} \cdot t\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \end{array} \]
                                      9. Add Preprocessing

                                      Alternative 11: 67.2% accurate, 1.2× speedup?

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

                                        1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            if -2.3999999999999999e161 < t < 1.2500000000000001e90

                                            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-/.f6474.3

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

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

                                          Alternative 12: 42.6% accurate, 1.2× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{z} \cdot t\\ \mathbf{if}\;z \leq -17000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 650000:\\ \;\;\;\;\left(\left(-1 - z\right) \cdot x\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                          (FPCore (x y z t)
                                           :precision binary64
                                           (let* ((t_1 (* (/ x z) t)))
                                             (if (<= z -17000000.0)
                                               t_1
                                               (if (<= z 650000.0) (* (* (- -1.0 z) x) t) t_1))))
                                          double code(double x, double y, double z, double t) {
                                          	double t_1 = (x / z) * t;
                                          	double tmp;
                                          	if (z <= -17000000.0) {
                                          		tmp = t_1;
                                          	} else if (z <= 650000.0) {
                                          		tmp = ((-1.0 - z) * x) * t;
                                          	} else {
                                          		tmp = t_1;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          real(8) function code(x, y, z, t)
                                              real(8), intent (in) :: x
                                              real(8), intent (in) :: y
                                              real(8), intent (in) :: z
                                              real(8), intent (in) :: t
                                              real(8) :: t_1
                                              real(8) :: tmp
                                              t_1 = (x / z) * t
                                              if (z <= (-17000000.0d0)) then
                                                  tmp = t_1
                                              else if (z <= 650000.0d0) then
                                                  tmp = (((-1.0d0) - z) * x) * t
                                              else
                                                  tmp = t_1
                                              end if
                                              code = tmp
                                          end function
                                          
                                          public static double code(double x, double y, double z, double t) {
                                          	double t_1 = (x / z) * t;
                                          	double tmp;
                                          	if (z <= -17000000.0) {
                                          		tmp = t_1;
                                          	} else if (z <= 650000.0) {
                                          		tmp = ((-1.0 - z) * x) * t;
                                          	} else {
                                          		tmp = t_1;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          def code(x, y, z, t):
                                          	t_1 = (x / z) * t
                                          	tmp = 0
                                          	if z <= -17000000.0:
                                          		tmp = t_1
                                          	elif z <= 650000.0:
                                          		tmp = ((-1.0 - z) * x) * t
                                          	else:
                                          		tmp = t_1
                                          	return tmp
                                          
                                          function code(x, y, z, t)
                                          	t_1 = Float64(Float64(x / z) * t)
                                          	tmp = 0.0
                                          	if (z <= -17000000.0)
                                          		tmp = t_1;
                                          	elseif (z <= 650000.0)
                                          		tmp = Float64(Float64(Float64(-1.0 - z) * x) * t);
                                          	else
                                          		tmp = t_1;
                                          	end
                                          	return tmp
                                          end
                                          
                                          function tmp_2 = code(x, y, z, t)
                                          	t_1 = (x / z) * t;
                                          	tmp = 0.0;
                                          	if (z <= -17000000.0)
                                          		tmp = t_1;
                                          	elseif (z <= 650000.0)
                                          		tmp = ((-1.0 - z) * x) * t;
                                          	else
                                          		tmp = t_1;
                                          	end
                                          	tmp_2 = tmp;
                                          end
                                          
                                          code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[z, -17000000.0], t$95$1, If[LessEqual[z, 650000.0], N[(N[(N[(-1.0 - z), $MachinePrecision] * x), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          t_1 := \frac{x}{z} \cdot t\\
                                          \mathbf{if}\;z \leq -17000000:\\
                                          \;\;\;\;t\_1\\
                                          
                                          \mathbf{elif}\;z \leq 650000:\\
                                          \;\;\;\;\left(\left(-1 - z\right) \cdot x\right) \cdot t\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;t\_1\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if z < -1.7e7 or 6.5e5 < z

                                            1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                if -1.7e7 < z < 6.5e5

                                                1. Initial program 93.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \left(-1 \cdot x + -1 \cdot \left(x \cdot z\right)\right) \cdot t \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites35.1%

                                                      \[\leadsto \left(\left(-1 - z\right) \cdot x\right) \cdot t \]
                                                  4. Recombined 2 regimes into one program.
                                                  5. Add Preprocessing

                                                  Alternative 13: 23.2% accurate, 4.3× speedup?

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

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

                                                    \[\leadsto \color{blue}{\frac{-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. *-commutativeN/A

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

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

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

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

                                                      \[\leadsto \frac{x \cdot \color{blue}{\left(y - t \cdot z\right)}}{z} \]
                                                    13. lower-*.f6460.9

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

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

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

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

                                                    Developer Target 1: 95.5% 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 2024298 
                                                    (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)))))