Data.HashTable.ST.Basic:computeOverhead from hashtables-1.2.0.2

Percentage Accurate: 86.8% → 99.3%
Time: 15.1s
Alternatives: 13
Speedup: 1.3×

Specification

?
\[\begin{array}{l} \\ \frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))
double code(double x, double y, double z, double t) {
	return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * 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) + ((2.0d0 + ((z * 2.0d0) * (1.0d0 - t))) / (t * z))
end function
public static double code(double x, double y, double z, double t) {
	return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
}
def code(x, y, z, t):
	return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z))
function code(x, y, z, t)
	return Float64(Float64(x / y) + Float64(Float64(2.0 + Float64(Float64(z * 2.0) * Float64(1.0 - t))) / Float64(t * z)))
end
function tmp = code(x, y, z, t)
	tmp = (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
end
code[x_, y_, z_, t_] := N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 + N[(N[(z * 2.0), $MachinePrecision] * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}
\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: 86.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))
double code(double x, double y, double z, double t) {
	return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * 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) + ((2.0d0 + ((z * 2.0d0) * (1.0d0 - t))) / (t * z))
end function
public static double code(double x, double y, double z, double t) {
	return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
}
def code(x, y, z, t):
	return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z))
function code(x, y, z, t)
	return Float64(Float64(x / y) + Float64(Float64(2.0 + Float64(Float64(z * 2.0) * Float64(1.0 - t))) / Float64(t * z)))
end
function tmp = code(x, y, z, t)
	tmp = (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
end
code[x_, y_, z_, t_] := N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 + N[(N[(z * 2.0), $MachinePrecision] * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 99.3% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \frac{x}{y} + \left(\frac{2 + \frac{2}{z}}{t} + -2\right) \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (+ (/ x y) (+ (/ (+ 2.0 (/ 2.0 z)) t) -2.0)))
double code(double x, double y, double z, double t) {
	return (x / y) + (((2.0 + (2.0 / z)) / t) + -2.0);
}
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) + (((2.0d0 + (2.0d0 / z)) / t) + (-2.0d0))
end function
public static double code(double x, double y, double z, double t) {
	return (x / y) + (((2.0 + (2.0 / z)) / t) + -2.0);
}
def code(x, y, z, t):
	return (x / y) + (((2.0 + (2.0 / z)) / t) + -2.0)
function code(x, y, z, t)
	return Float64(Float64(x / y) + Float64(Float64(Float64(2.0 + Float64(2.0 / z)) / t) + -2.0))
end
function tmp = code(x, y, z, t)
	tmp = (x / y) + (((2.0 + (2.0 / z)) / t) + -2.0);
end
code[x_, y_, z_, t_] := N[(N[(x / y), $MachinePrecision] + N[(N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] + -2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

    \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
  2. Step-by-step derivation
    1. +-lowering-+.f64N/A

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

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
    4. distribute-lft-inN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
    5. *-rgt-identityN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
    6. associate-+r+N/A

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
    8. unsub-negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
    9. div-subN/A

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
    11. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
  3. Simplified98.7%

    \[\leadsto \color{blue}{\frac{x}{y} + \left(\frac{2 + \frac{2}{z}}{t} + -2\right)} \]
  4. Add Preprocessing
  5. Add Preprocessing

Alternative 2: 91.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{2 \cdot \frac{y}{t}}{z}}{y}\\ \mathbf{if}\;\frac{x}{y} \leq -5 \cdot 10^{+23}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;\frac{x}{y} \leq 4 \cdot 10^{-27}:\\ \;\;\;\;\frac{2}{t} + \left(-2 + \frac{2}{z \cdot t}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ (* 2.0 (/ y t)) z)) y)))
   (if (<= (/ x y) -5e+23)
     t_1
     (if (<= (/ x y) 4e-27) (+ (/ 2.0 t) (+ -2.0 (/ 2.0 (* z t)))) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = (x + ((2.0 * (y / t)) / z)) / y;
	double tmp;
	if ((x / y) <= -5e+23) {
		tmp = t_1;
	} else if ((x / y) <= 4e-27) {
		tmp = (2.0 / t) + (-2.0 + (2.0 / (z * 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 + ((2.0d0 * (y / t)) / z)) / y
    if ((x / y) <= (-5d+23)) then
        tmp = t_1
    else if ((x / y) <= 4d-27) then
        tmp = (2.0d0 / t) + ((-2.0d0) + (2.0d0 / (z * 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 + ((2.0 * (y / t)) / z)) / y;
	double tmp;
	if ((x / y) <= -5e+23) {
		tmp = t_1;
	} else if ((x / y) <= 4e-27) {
		tmp = (2.0 / t) + (-2.0 + (2.0 / (z * t)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x + ((2.0 * (y / t)) / z)) / y
	tmp = 0
	if (x / y) <= -5e+23:
		tmp = t_1
	elif (x / y) <= 4e-27:
		tmp = (2.0 / t) + (-2.0 + (2.0 / (z * t)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x + Float64(Float64(2.0 * Float64(y / t)) / z)) / y)
	tmp = 0.0
	if (Float64(x / y) <= -5e+23)
		tmp = t_1;
	elseif (Float64(x / y) <= 4e-27)
		tmp = Float64(Float64(2.0 / t) + Float64(-2.0 + Float64(2.0 / Float64(z * t))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x + ((2.0 * (y / t)) / z)) / y;
	tmp = 0.0;
	if ((x / y) <= -5e+23)
		tmp = t_1;
	elseif ((x / y) <= 4e-27)
		tmp = (2.0 / t) + (-2.0 + (2.0 / (z * t)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(2.0 * N[(y / t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -5e+23], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 4e-27], N[(N[(2.0 / t), $MachinePrecision] + N[(-2.0 + N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x + \frac{2 \cdot \frac{y}{t}}{z}}{y}\\
\mathbf{if}\;\frac{x}{y} \leq -5 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;\frac{x}{y} \leq 4 \cdot 10^{-27}:\\
\;\;\;\;\frac{2}{t} + \left(-2 + \frac{2}{z \cdot t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 x y) < -4.9999999999999999e23 or 4.0000000000000002e-27 < (/.f64 x y)

    1. Initial program 82.7%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{/.f64}\left(\color{blue}{\left(2 + 2 \cdot z\right)}, \mathsf{*.f64}\left(t, z\right)\right)\right) \]
    4. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(2 \cdot z\right)\right), \mathsf{*.f64}\left(\color{blue}{t}, z\right)\right)\right) \]
      2. *-lowering-*.f6496.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, z\right)\right), \mathsf{*.f64}\left(t, z\right)\right)\right) \]
    5. Simplified96.8%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(x + y \cdot \left(2 \cdot \frac{1}{t} + 2 \cdot \frac{1}{t \cdot z}\right)\right), \color{blue}{y}\right) \]
    8. Simplified97.5%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \left(\frac{2 \cdot \frac{y}{t}}{z}\right)\right), y\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(2 \cdot \frac{y}{t}\right), z\right)\right), y\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{y}{t}\right)\right), z\right)\right), y\right) \]
      5. /-lowering-/.f6495.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(y, t\right)\right), z\right)\right), y\right) \]
    11. Simplified95.4%

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

    if -4.9999999999999999e23 < (/.f64 x y) < 4.0000000000000002e-27

    1. Initial program 86.0%

      \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
    2. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
      4. distribute-lft-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
      5. *-rgt-identityN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
      6. associate-+r+N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
      8. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
      9. div-subN/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
      11. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
    3. Simplified99.8%

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

      \[\leadsto \color{blue}{\left(2 \cdot \frac{1}{t} + 2 \cdot \frac{1}{t \cdot z}\right) - 2} \]
    6. Simplified99.0%

      \[\leadsto \color{blue}{-2 + \frac{2 + \frac{2}{z}}{t}} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \frac{2 + \frac{2}{z}}{t} + \color{blue}{-2} \]
      2. div-invN/A

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

        \[\leadsto \frac{1}{t} \cdot \left(2 + \frac{2}{z}\right) + -2 \]
      4. distribute-lft-inN/A

        \[\leadsto \left(\frac{1}{t} \cdot 2 + \frac{1}{t} \cdot \frac{2}{z}\right) + -2 \]
      5. associate-+l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(2 \cdot \frac{1}{t}\right), \color{blue}{\left(\frac{1}{t} \cdot \frac{2}{z} + -2\right)}\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{t}\right), \left(\color{blue}{\frac{1}{t} \cdot \frac{2}{z}} + -2\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, t\right), \left(\color{blue}{\frac{1}{t} \cdot \frac{2}{z}} + -2\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, t\right), \mathsf{+.f64}\left(\left(\frac{1}{t} \cdot \frac{2}{z}\right), \color{blue}{-2}\right)\right) \]
      11. frac-timesN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, t\right), \mathsf{+.f64}\left(\left(\frac{1 \cdot 2}{t \cdot z}\right), -2\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, t\right), \mathsf{+.f64}\left(\left(\frac{2}{t \cdot z}\right), -2\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, t\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(t \cdot z\right)\right), -2\right)\right) \]
      14. *-lowering-*.f6499.1%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, t\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, z\right)\right), -2\right)\right) \]
    8. Applied egg-rr99.1%

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

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

Alternative 3: 91.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{2}{z \cdot t}\\ t_2 := \frac{x}{y} + t\_1\\ \mathbf{if}\;\frac{x}{y} \leq -5 \cdot 10^{+23}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;\frac{x}{y} \leq 4 \cdot 10^{-27}:\\ \;\;\;\;\frac{2}{t} + \left(-2 + t\_1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ 2.0 (* z t))) (t_2 (+ (/ x y) t_1)))
   (if (<= (/ x y) -5e+23)
     t_2
     (if (<= (/ x y) 4e-27) (+ (/ 2.0 t) (+ -2.0 t_1)) t_2))))
double code(double x, double y, double z, double t) {
	double t_1 = 2.0 / (z * t);
	double t_2 = (x / y) + t_1;
	double tmp;
	if ((x / y) <= -5e+23) {
		tmp = t_2;
	} else if ((x / y) <= 4e-27) {
		tmp = (2.0 / t) + (-2.0 + t_1);
	} else {
		tmp = t_2;
	}
	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 = 2.0d0 / (z * t)
    t_2 = (x / y) + t_1
    if ((x / y) <= (-5d+23)) then
        tmp = t_2
    else if ((x / y) <= 4d-27) then
        tmp = (2.0d0 / t) + ((-2.0d0) + t_1)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = 2.0 / (z * t);
	double t_2 = (x / y) + t_1;
	double tmp;
	if ((x / y) <= -5e+23) {
		tmp = t_2;
	} else if ((x / y) <= 4e-27) {
		tmp = (2.0 / t) + (-2.0 + t_1);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = 2.0 / (z * t)
	t_2 = (x / y) + t_1
	tmp = 0
	if (x / y) <= -5e+23:
		tmp = t_2
	elif (x / y) <= 4e-27:
		tmp = (2.0 / t) + (-2.0 + t_1)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(2.0 / Float64(z * t))
	t_2 = Float64(Float64(x / y) + t_1)
	tmp = 0.0
	if (Float64(x / y) <= -5e+23)
		tmp = t_2;
	elseif (Float64(x / y) <= 4e-27)
		tmp = Float64(Float64(2.0 / t) + Float64(-2.0 + t_1));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = 2.0 / (z * t);
	t_2 = (x / y) + t_1;
	tmp = 0.0;
	if ((x / y) <= -5e+23)
		tmp = t_2;
	elseif ((x / y) <= 4e-27)
		tmp = (2.0 / t) + (-2.0 + t_1);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / y), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -5e+23], t$95$2, If[LessEqual[N[(x / y), $MachinePrecision], 4e-27], N[(N[(2.0 / t), $MachinePrecision] + N[(-2.0 + t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{2}{z \cdot t}\\
t_2 := \frac{x}{y} + t\_1\\
\mathbf{if}\;\frac{x}{y} \leq -5 \cdot 10^{+23}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;\frac{x}{y} \leq 4 \cdot 10^{-27}:\\
\;\;\;\;\frac{2}{t} + \left(-2 + t\_1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 x y) < -4.9999999999999999e23 or 4.0000000000000002e-27 < (/.f64 x y)

    1. Initial program 82.7%

      \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
    2. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
      4. distribute-lft-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
      5. *-rgt-identityN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
      6. associate-+r+N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
      8. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
      9. div-subN/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
      11. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
    3. Simplified97.7%

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{/.f64}\left(2, \color{blue}{\left(t \cdot z\right)}\right)\right) \]
      2. *-lowering-*.f6493.1%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \color{blue}{z}\right)\right)\right) \]
    7. Simplified93.1%

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

    if -4.9999999999999999e23 < (/.f64 x y) < 4.0000000000000002e-27

    1. Initial program 86.0%

      \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
    2. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
      4. distribute-lft-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
      5. *-rgt-identityN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
      6. associate-+r+N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
      8. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
      9. div-subN/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
      11. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
    3. Simplified99.8%

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

      \[\leadsto \color{blue}{\left(2 \cdot \frac{1}{t} + 2 \cdot \frac{1}{t \cdot z}\right) - 2} \]
    6. Simplified99.0%

      \[\leadsto \color{blue}{-2 + \frac{2 + \frac{2}{z}}{t}} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \frac{2 + \frac{2}{z}}{t} + \color{blue}{-2} \]
      2. div-invN/A

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

        \[\leadsto \frac{1}{t} \cdot \left(2 + \frac{2}{z}\right) + -2 \]
      4. distribute-lft-inN/A

        \[\leadsto \left(\frac{1}{t} \cdot 2 + \frac{1}{t} \cdot \frac{2}{z}\right) + -2 \]
      5. associate-+l+N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\left(2 \cdot \frac{1}{t}\right), \color{blue}{\left(\frac{1}{t} \cdot \frac{2}{z} + -2\right)}\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{t}\right), \left(\color{blue}{\frac{1}{t} \cdot \frac{2}{z}} + -2\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, t\right), \left(\color{blue}{\frac{1}{t} \cdot \frac{2}{z}} + -2\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, t\right), \mathsf{+.f64}\left(\left(\frac{1}{t} \cdot \frac{2}{z}\right), \color{blue}{-2}\right)\right) \]
      11. frac-timesN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, t\right), \mathsf{+.f64}\left(\left(\frac{1 \cdot 2}{t \cdot z}\right), -2\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, t\right), \mathsf{+.f64}\left(\left(\frac{2}{t \cdot z}\right), -2\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, t\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(t \cdot z\right)\right), -2\right)\right) \]
      14. *-lowering-*.f6499.1%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, t\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, z\right)\right), -2\right)\right) \]
    8. Applied egg-rr99.1%

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

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

Alternative 4: 53.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{x}{y} \leq -5.8 \cdot 10^{+19}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;\frac{x}{y} \leq -4.7 \cdot 10^{-34}:\\ \;\;\;\;\frac{2}{t}\\ \mathbf{elif}\;\frac{x}{y} \leq 3 \cdot 10^{-11}:\\ \;\;\;\;-2\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= (/ x y) -5.8e+19)
   (/ x y)
   (if (<= (/ x y) -4.7e-34) (/ 2.0 t) (if (<= (/ x y) 3e-11) -2.0 (/ x y)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x / y) <= -5.8e+19) {
		tmp = x / y;
	} else if ((x / y) <= -4.7e-34) {
		tmp = 2.0 / t;
	} else if ((x / y) <= 3e-11) {
		tmp = -2.0;
	} else {
		tmp = x / 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 ((x / y) <= (-5.8d+19)) then
        tmp = x / y
    else if ((x / y) <= (-4.7d-34)) then
        tmp = 2.0d0 / t
    else if ((x / y) <= 3d-11) then
        tmp = -2.0d0
    else
        tmp = x / y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((x / y) <= -5.8e+19) {
		tmp = x / y;
	} else if ((x / y) <= -4.7e-34) {
		tmp = 2.0 / t;
	} else if ((x / y) <= 3e-11) {
		tmp = -2.0;
	} else {
		tmp = x / y;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (x / y) <= -5.8e+19:
		tmp = x / y
	elif (x / y) <= -4.7e-34:
		tmp = 2.0 / t
	elif (x / y) <= 3e-11:
		tmp = -2.0
	else:
		tmp = x / y
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (Float64(x / y) <= -5.8e+19)
		tmp = Float64(x / y);
	elseif (Float64(x / y) <= -4.7e-34)
		tmp = Float64(2.0 / t);
	elseif (Float64(x / y) <= 3e-11)
		tmp = -2.0;
	else
		tmp = Float64(x / y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((x / y) <= -5.8e+19)
		tmp = x / y;
	elseif ((x / y) <= -4.7e-34)
		tmp = 2.0 / t;
	elseif ((x / y) <= 3e-11)
		tmp = -2.0;
	else
		tmp = x / y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[N[(x / y), $MachinePrecision], -5.8e+19], N[(x / y), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], -4.7e-34], N[(2.0 / t), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 3e-11], -2.0, N[(x / y), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -5.8 \cdot 10^{+19}:\\
\;\;\;\;\frac{x}{y}\\

\mathbf{elif}\;\frac{x}{y} \leq -4.7 \cdot 10^{-34}:\\
\;\;\;\;\frac{2}{t}\\

\mathbf{elif}\;\frac{x}{y} \leq 3 \cdot 10^{-11}:\\
\;\;\;\;-2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 x y) < -5.8e19 or 3e-11 < (/.f64 x y)

    1. Initial program 82.5%

      \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
    2. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
      4. distribute-lft-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
      5. *-rgt-identityN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
      6. associate-+r+N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
      8. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
      9. div-subN/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
      11. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
    3. Simplified97.7%

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

      \[\leadsto \color{blue}{\frac{x}{y}} \]
    6. Step-by-step derivation
      1. /-lowering-/.f6478.7%

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{y}\right) \]
    7. Simplified78.7%

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

    if -5.8e19 < (/.f64 x y) < -4.70000000000000002e-34

    1. Initial program 81.0%

      \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
    2. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
      4. distribute-lft-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
      5. *-rgt-identityN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
      6. associate-+r+N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
      8. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
      9. div-subN/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
      11. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
    3. Simplified99.9%

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

      \[\leadsto \color{blue}{\left(2 \cdot \frac{1}{t} + 2 \cdot \frac{1}{t \cdot z}\right) - 2} \]
    6. Simplified93.5%

      \[\leadsto \color{blue}{-2 + \frac{2 + \frac{2}{z}}{t}} \]
    7. Taylor expanded in z around inf

      \[\leadsto \color{blue}{2 \cdot \frac{1}{t} - 2} \]
    8. Step-by-step derivation
      1. sub-negN/A

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

        \[\leadsto 2 \cdot \frac{1}{t} + -2 \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(2 \cdot \frac{1}{t}\right), \color{blue}{-2}\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{2 \cdot 1}{t}\right), -2\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{t}\right), -2\right) \]
      6. /-lowering-/.f6457.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, t\right), -2\right) \]
    9. Simplified57.8%

      \[\leadsto \color{blue}{\frac{2}{t} + -2} \]
    10. Taylor expanded in t around 0

      \[\leadsto \color{blue}{\frac{2}{t}} \]
    11. Step-by-step derivation
      1. /-lowering-/.f6441.5%

        \[\leadsto \mathsf{/.f64}\left(2, \color{blue}{t}\right) \]
    12. Simplified41.5%

      \[\leadsto \color{blue}{\frac{2}{t}} \]

    if -4.70000000000000002e-34 < (/.f64 x y) < 3e-11

    1. Initial program 86.9%

      \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
    2. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
      4. distribute-lft-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
      5. *-rgt-identityN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
      6. associate-+r+N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
      8. unsub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
      9. div-subN/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
      11. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
    3. Simplified99.8%

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

      \[\leadsto \color{blue}{\left(2 \cdot \frac{1}{t} + 2 \cdot \frac{1}{t \cdot z}\right) - 2} \]
    6. Simplified99.8%

      \[\leadsto \color{blue}{-2 + \frac{2 + \frac{2}{z}}{t}} \]
    7. Taylor expanded in t around inf

      \[\leadsto \color{blue}{-2} \]
    8. Step-by-step derivation
      1. Simplified43.2%

        \[\leadsto \color{blue}{-2} \]
    9. Recombined 3 regimes into one program.
    10. Add Preprocessing

    Alternative 5: 91.7% accurate, 0.7× speedup?

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

      1. Initial program 82.7%

        \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
      2. Step-by-step derivation
        1. +-lowering-+.f64N/A

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

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
        4. distribute-lft-inN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
        5. *-rgt-identityN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
        6. associate-+r+N/A

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
        8. unsub-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
        9. div-subN/A

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
        11. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
      3. Simplified97.7%

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

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{/.f64}\left(2, \color{blue}{\left(t \cdot z\right)}\right)\right) \]
        2. *-lowering-*.f6493.1%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \color{blue}{z}\right)\right)\right) \]
      7. Simplified93.1%

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

      if -4.9999999999999999e23 < (/.f64 x y) < 4.0000000000000002e-27

      1. Initial program 86.0%

        \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
      2. Step-by-step derivation
        1. +-lowering-+.f64N/A

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

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
        4. distribute-lft-inN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
        5. *-rgt-identityN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
        6. associate-+r+N/A

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
        8. unsub-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
        9. div-subN/A

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
        11. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
      3. Simplified99.8%

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

        \[\leadsto \color{blue}{\left(2 \cdot \frac{1}{t} + 2 \cdot \frac{1}{t \cdot z}\right) - 2} \]
      6. Simplified99.0%

        \[\leadsto \color{blue}{-2 + \frac{2 + \frac{2}{z}}{t}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification95.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x}{y} \leq -5 \cdot 10^{+23}:\\ \;\;\;\;\frac{x}{y} + \frac{2}{z \cdot t}\\ \mathbf{elif}\;\frac{x}{y} \leq 4 \cdot 10^{-27}:\\ \;\;\;\;\frac{2 + \frac{2}{z}}{t} + -2\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y} + \frac{2}{z \cdot t}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 6: 85.0% accurate, 0.7× speedup?

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

      1. Initial program 83.0%

        \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
      2. Step-by-step derivation
        1. +-lowering-+.f64N/A

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

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
        4. distribute-lft-inN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
        5. *-rgt-identityN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
        6. associate-+r+N/A

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
        8. unsub-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
        9. div-subN/A

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
        11. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
      3. Simplified96.2%

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

        \[\leadsto \color{blue}{\frac{x}{y}} \]
      6. Step-by-step derivation
        1. /-lowering-/.f6487.0%

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{y}\right) \]
      7. Simplified87.0%

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

      if -1.99999999999999997e67 < (/.f64 x y) < 5.00000000000000018e-11

      1. Initial program 86.5%

        \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
      2. Step-by-step derivation
        1. +-lowering-+.f64N/A

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

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
        4. distribute-lft-inN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
        5. *-rgt-identityN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
        6. associate-+r+N/A

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
        8. unsub-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
        9. div-subN/A

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
        11. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
      3. Simplified99.9%

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

        \[\leadsto \color{blue}{\left(2 \cdot \frac{1}{t} + 2 \cdot \frac{1}{t \cdot z}\right) - 2} \]
      6. Simplified97.1%

        \[\leadsto \color{blue}{-2 + \frac{2 + \frac{2}{z}}{t}} \]

      if 5.00000000000000018e-11 < (/.f64 x y)

      1. Initial program 80.8%

        \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
      2. Step-by-step derivation
        1. +-lowering-+.f64N/A

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

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
        4. distribute-lft-inN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
        5. *-rgt-identityN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
        6. associate-+r+N/A

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
        8. unsub-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
        9. div-subN/A

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
        11. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
      3. Simplified98.5%

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \color{blue}{-2}\right) \]
      6. Step-by-step derivation
        1. Simplified82.1%

          \[\leadsto \frac{x}{y} + \color{blue}{-2} \]
      7. Recombined 3 regimes into one program.
      8. Final simplification91.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x}{y} \leq -2 \cdot 10^{+67}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;\frac{x}{y} \leq 5 \cdot 10^{-11}:\\ \;\;\;\;\frac{2 + \frac{2}{z}}{t} + -2\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y} + -2\\ \end{array} \]
      9. Add Preprocessing

      Alternative 7: 72.6% accurate, 0.8× speedup?

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

        1. Initial program 83.0%

          \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
        2. Step-by-step derivation
          1. +-lowering-+.f64N/A

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

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

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
          4. distribute-lft-inN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
          5. *-rgt-identityN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
          6. associate-+r+N/A

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

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
          8. unsub-negN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
          9. div-subN/A

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

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
          11. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
        3. Simplified96.2%

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

          \[\leadsto \color{blue}{\frac{x}{y}} \]
        6. Step-by-step derivation
          1. /-lowering-/.f6487.0%

            \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{y}\right) \]
        7. Simplified87.0%

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

        if -1.99999999999999997e67 < (/.f64 x y) < 5.00000000000000018e-11

        1. Initial program 86.5%

          \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
        2. Step-by-step derivation
          1. +-lowering-+.f64N/A

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

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

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
          4. distribute-lft-inN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
          5. *-rgt-identityN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
          6. associate-+r+N/A

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

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
          8. unsub-negN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
          9. div-subN/A

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

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
          11. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
        3. Simplified99.9%

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

          \[\leadsto \color{blue}{\left(2 \cdot \frac{1}{t} + 2 \cdot \frac{1}{t \cdot z}\right) - 2} \]
        6. Simplified97.1%

          \[\leadsto \color{blue}{-2 + \frac{2 + \frac{2}{z}}{t}} \]
        7. Taylor expanded in z around 0

          \[\leadsto \mathsf{+.f64}\left(-2, \mathsf{/.f64}\left(\color{blue}{\left(\frac{2}{z}\right)}, t\right)\right) \]
        8. Step-by-step derivation
          1. /-lowering-/.f6473.8%

            \[\leadsto \mathsf{+.f64}\left(-2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, z\right), t\right)\right) \]
        9. Simplified73.8%

          \[\leadsto -2 + \frac{\color{blue}{\frac{2}{z}}}{t} \]

        if 5.00000000000000018e-11 < (/.f64 x y)

        1. Initial program 80.8%

          \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
        2. Step-by-step derivation
          1. +-lowering-+.f64N/A

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

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

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
          4. distribute-lft-inN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
          5. *-rgt-identityN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
          6. associate-+r+N/A

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

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
          8. unsub-negN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
          9. div-subN/A

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

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
          11. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
        3. Simplified98.5%

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \color{blue}{-2}\right) \]
        6. Step-by-step derivation
          1. Simplified82.1%

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

        Alternative 8: 64.7% accurate, 0.9× speedup?

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

          1. Initial program 84.1%

            \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
          2. Step-by-step derivation
            1. +-lowering-+.f64N/A

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

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
            4. distribute-lft-inN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
            5. *-rgt-identityN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
            6. associate-+r+N/A

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
            8. unsub-negN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
            9. div-subN/A

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
            11. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
          3. Simplified96.8%

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

            \[\leadsto \color{blue}{\frac{x}{y}} \]
          6. Step-by-step derivation
            1. /-lowering-/.f6478.2%

              \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{y}\right) \]
          7. Simplified78.2%

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

          if -4.9999999999999999e23 < (/.f64 x y) < 5.00000000000000018e-11

          1. Initial program 86.2%

            \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
          2. Step-by-step derivation
            1. +-lowering-+.f64N/A

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

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
            4. distribute-lft-inN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
            5. *-rgt-identityN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
            6. associate-+r+N/A

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
            8. unsub-negN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
            9. div-subN/A

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
            11. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
          3. Simplified99.8%

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

            \[\leadsto \color{blue}{\left(2 \cdot \frac{1}{t} + 2 \cdot \frac{1}{t \cdot z}\right) - 2} \]
          6. Simplified99.0%

            \[\leadsto \color{blue}{-2 + \frac{2 + \frac{2}{z}}{t}} \]
          7. Taylor expanded in z around inf

            \[\leadsto \color{blue}{2 \cdot \frac{1}{t} - 2} \]
          8. Step-by-step derivation
            1. sub-negN/A

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

              \[\leadsto 2 \cdot \frac{1}{t} + -2 \]
            3. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\left(2 \cdot \frac{1}{t}\right), \color{blue}{-2}\right) \]
            4. associate-*r/N/A

              \[\leadsto \mathsf{+.f64}\left(\left(\frac{2 \cdot 1}{t}\right), -2\right) \]
            5. metadata-evalN/A

              \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{t}\right), -2\right) \]
            6. /-lowering-/.f6462.5%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, t\right), -2\right) \]
          9. Simplified62.5%

            \[\leadsto \color{blue}{\frac{2}{t} + -2} \]

          if 5.00000000000000018e-11 < (/.f64 x y)

          1. Initial program 80.8%

            \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
          2. Step-by-step derivation
            1. +-lowering-+.f64N/A

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

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
            4. distribute-lft-inN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
            5. *-rgt-identityN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
            6. associate-+r+N/A

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
            8. unsub-negN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
            9. div-subN/A

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
            11. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
          3. Simplified98.5%

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

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \color{blue}{-2}\right) \]
          6. Step-by-step derivation
            1. Simplified82.1%

              \[\leadsto \frac{x}{y} + \color{blue}{-2} \]
          7. Recombined 3 regimes into one program.
          8. Final simplification71.6%

            \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x}{y} \leq -5 \cdot 10^{+23}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;\frac{x}{y} \leq 5 \cdot 10^{-11}:\\ \;\;\;\;-2 + \frac{2}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y} + -2\\ \end{array} \]
          9. Add Preprocessing

          Alternative 9: 64.6% accurate, 0.9× speedup?

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

            1. Initial program 82.4%

              \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
            2. Step-by-step derivation
              1. +-lowering-+.f64N/A

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

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
              4. distribute-lft-inN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
              5. *-rgt-identityN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
              6. associate-+r+N/A

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
              8. unsub-negN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
              9. div-subN/A

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
              11. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
            3. Simplified97.7%

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

              \[\leadsto \color{blue}{\frac{x}{y}} \]
            6. Step-by-step derivation
              1. /-lowering-/.f6479.3%

                \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{y}\right) \]
            7. Simplified79.3%

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

            if -6e20 < (/.f64 x y) < 6.2e5

            1. Initial program 86.2%

              \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
            2. Step-by-step derivation
              1. +-lowering-+.f64N/A

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

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
              4. distribute-lft-inN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
              5. *-rgt-identityN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
              6. associate-+r+N/A

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
              8. unsub-negN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
              9. div-subN/A

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
              11. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
            3. Simplified99.8%

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

              \[\leadsto \color{blue}{\left(2 \cdot \frac{1}{t} + 2 \cdot \frac{1}{t \cdot z}\right) - 2} \]
            6. Simplified99.0%

              \[\leadsto \color{blue}{-2 + \frac{2 + \frac{2}{z}}{t}} \]
            7. Taylor expanded in z around inf

              \[\leadsto \color{blue}{2 \cdot \frac{1}{t} - 2} \]
            8. Step-by-step derivation
              1. sub-negN/A

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

                \[\leadsto 2 \cdot \frac{1}{t} + -2 \]
              3. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\left(2 \cdot \frac{1}{t}\right), \color{blue}{-2}\right) \]
              4. associate-*r/N/A

                \[\leadsto \mathsf{+.f64}\left(\left(\frac{2 \cdot 1}{t}\right), -2\right) \]
              5. metadata-evalN/A

                \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{t}\right), -2\right) \]
              6. /-lowering-/.f6462.5%

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, t\right), -2\right) \]
            9. Simplified62.5%

              \[\leadsto \color{blue}{\frac{2}{t} + -2} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification71.1%

            \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x}{y} \leq -6 \cdot 10^{+20}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;\frac{x}{y} \leq 620000:\\ \;\;\;\;-2 + \frac{2}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 10: 79.8% accurate, 1.0× speedup?

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

            1. Initial program 76.3%

              \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
            2. Step-by-step derivation
              1. +-lowering-+.f64N/A

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

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
              4. distribute-lft-inN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
              5. *-rgt-identityN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
              6. associate-+r+N/A

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
              8. unsub-negN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
              9. div-subN/A

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
              11. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
            3. Simplified99.9%

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \color{blue}{-2}\right) \]
            6. Step-by-step derivation
              1. Simplified81.7%

                \[\leadsto \frac{x}{y} + \color{blue}{-2} \]

              if -8.6e-31 < t < 6.1999999999999998e-52

              1. Initial program 96.9%

                \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
              2. Step-by-step derivation
                1. +-lowering-+.f64N/A

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

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

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
                4. distribute-lft-inN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
                5. *-rgt-identityN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
                6. associate-+r+N/A

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

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
                8. unsub-negN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
                9. div-subN/A

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

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
                11. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
              3. Simplified96.9%

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

                \[\leadsto \color{blue}{\frac{2 + 2 \cdot \frac{1}{z}}{t}} \]
              6. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(2 + 2 \cdot \frac{1}{z}\right), \color{blue}{t}\right) \]
                2. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(2 \cdot \frac{1}{z}\right)\right), t\right) \]
                3. associate-*r/N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{2 \cdot 1}{z}\right)\right), t\right) \]
                4. metadata-evalN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{2}{z}\right)\right), t\right) \]
                5. /-lowering-/.f6479.0%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(2, z\right)\right), t\right) \]
              7. Simplified79.0%

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

            Alternative 11: 64.5% accurate, 1.1× speedup?

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

              1. Initial program 77.4%

                \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
              2. Step-by-step derivation
                1. +-lowering-+.f64N/A

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

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

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
                4. distribute-lft-inN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
                5. *-rgt-identityN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
                6. associate-+r+N/A

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

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
                8. unsub-negN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
                9. div-subN/A

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

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
                11. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
              3. Simplified98.3%

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \color{blue}{-2}\right) \]
              6. Step-by-step derivation
                1. Simplified72.0%

                  \[\leadsto \frac{x}{y} + \color{blue}{-2} \]

                if -5.7999999999999997e-69 < z < 1.2999999999999999e-190

                1. Initial program 99.9%

                  \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
                2. Step-by-step derivation
                  1. +-lowering-+.f64N/A

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

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
                  4. distribute-lft-inN/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
                  5. *-rgt-identityN/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
                  6. associate-+r+N/A

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
                  8. unsub-negN/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
                  9. div-subN/A

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
                  11. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
                3. Simplified99.8%

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

                  \[\leadsto \color{blue}{\frac{2}{t \cdot z}} \]
                6. Step-by-step derivation
                  1. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(2, \color{blue}{\left(t \cdot z\right)}\right) \]
                  2. *-lowering-*.f6471.5%

                    \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \color{blue}{z}\right)\right) \]
                7. Simplified71.5%

                  \[\leadsto \color{blue}{\frac{2}{t \cdot z}} \]
              7. Recombined 2 regimes into one program.
              8. Final simplification71.8%

                \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{-69}:\\ \;\;\;\;\frac{x}{y} + -2\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-190}:\\ \;\;\;\;\frac{2}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y} + -2\\ \end{array} \]
              9. Add Preprocessing

              Alternative 12: 36.0% accurate, 1.3× speedup?

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

                1. Initial program 72.3%

                  \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
                2. Step-by-step derivation
                  1. +-lowering-+.f64N/A

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

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
                  4. distribute-lft-inN/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
                  5. *-rgt-identityN/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
                  6. associate-+r+N/A

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
                  8. unsub-negN/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
                  9. div-subN/A

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
                  11. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
                3. Simplified99.9%

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

                  \[\leadsto \color{blue}{\left(2 \cdot \frac{1}{t} + 2 \cdot \frac{1}{t \cdot z}\right) - 2} \]
                6. Simplified50.6%

                  \[\leadsto \color{blue}{-2 + \frac{2 + \frac{2}{z}}{t}} \]
                7. Taylor expanded in t around inf

                  \[\leadsto \color{blue}{-2} \]
                8. Step-by-step derivation
                  1. Simplified36.7%

                    \[\leadsto \color{blue}{-2} \]

                  if -1.3e5 < t < 8.5e20

                  1. Initial program 97.4%

                    \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
                  2. Step-by-step derivation
                    1. +-lowering-+.f64N/A

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

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

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
                    4. distribute-lft-inN/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
                    5. *-rgt-identityN/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
                    6. associate-+r+N/A

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

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
                    8. unsub-negN/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
                    9. div-subN/A

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

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
                    11. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
                  3. Simplified97.4%

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

                    \[\leadsto \color{blue}{\left(2 \cdot \frac{1}{t} + 2 \cdot \frac{1}{t \cdot z}\right) - 2} \]
                  6. Simplified72.5%

                    \[\leadsto \color{blue}{-2 + \frac{2 + \frac{2}{z}}{t}} \]
                  7. Taylor expanded in z around inf

                    \[\leadsto \color{blue}{2 \cdot \frac{1}{t} - 2} \]
                  8. Step-by-step derivation
                    1. sub-negN/A

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

                      \[\leadsto 2 \cdot \frac{1}{t} + -2 \]
                    3. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\left(2 \cdot \frac{1}{t}\right), \color{blue}{-2}\right) \]
                    4. associate-*r/N/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\frac{2 \cdot 1}{t}\right), -2\right) \]
                    5. metadata-evalN/A

                      \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{t}\right), -2\right) \]
                    6. /-lowering-/.f6430.5%

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, t\right), -2\right) \]
                  9. Simplified30.5%

                    \[\leadsto \color{blue}{\frac{2}{t} + -2} \]
                  10. Taylor expanded in t around 0

                    \[\leadsto \color{blue}{\frac{2}{t}} \]
                  11. Step-by-step derivation
                    1. /-lowering-/.f6429.7%

                      \[\leadsto \mathsf{/.f64}\left(2, \color{blue}{t}\right) \]
                  12. Simplified29.7%

                    \[\leadsto \color{blue}{\frac{2}{t}} \]
                9. Recombined 2 regimes into one program.
                10. Add Preprocessing

                Alternative 13: 20.2% accurate, 17.0× speedup?

                \[\begin{array}{l} \\ -2 \end{array} \]
                (FPCore (x y z t) :precision binary64 -2.0)
                double code(double x, double y, double z, double t) {
                	return -2.0;
                }
                
                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 = -2.0d0
                end function
                
                public static double code(double x, double y, double z, double t) {
                	return -2.0;
                }
                
                def code(x, y, z, t):
                	return -2.0
                
                function code(x, y, z, t)
                	return -2.0
                end
                
                function tmp = code(x, y, z, t)
                	tmp = -2.0;
                end
                
                code[x_, y_, z_, t_] := -2.0
                
                \begin{array}{l}
                
                \\
                -2
                \end{array}
                
                Derivation
                1. Initial program 84.3%

                  \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
                2. Step-by-step derivation
                  1. +-lowering-+.f64N/A

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

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2\right) \cdot \left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
                  4. distribute-lft-inN/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(\left(z \cdot 2\right) \cdot 1 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
                  5. *-rgt-identityN/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + \left(z \cdot 2 + \left(z \cdot 2\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)}{t \cdot z}\right)\right) \]
                  6. associate-+r+N/A

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) + \left(\mathsf{neg}\left(\left(z \cdot 2\right) \cdot t\right)\right)}{t \cdot z}\right)\right) \]
                  8. unsub-negN/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{\left(2 + z \cdot 2\right) - \left(z \cdot 2\right) \cdot t}{\color{blue}{t} \cdot z}\right)\right) \]
                  9. div-subN/A

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\frac{2 + z \cdot 2}{t \cdot z} + \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
                  11. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2 + z \cdot 2}{t \cdot z}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{\left(z \cdot 2\right) \cdot t}{t \cdot z}\right)\right)}\right)\right) \]
                3. Simplified98.7%

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

                  \[\leadsto \color{blue}{\left(2 \cdot \frac{1}{t} + 2 \cdot \frac{1}{t \cdot z}\right) - 2} \]
                6. Simplified61.1%

                  \[\leadsto \color{blue}{-2 + \frac{2 + \frac{2}{z}}{t}} \]
                7. Taylor expanded in t around inf

                  \[\leadsto \color{blue}{-2} \]
                8. Step-by-step derivation
                  1. Simplified20.4%

                    \[\leadsto \color{blue}{-2} \]
                  2. Add Preprocessing

                  Developer Target 1: 99.3% accurate, 1.3× speedup?

                  \[\begin{array}{l} \\ \frac{\frac{2}{z} + 2}{t} - \left(2 - \frac{x}{y}\right) \end{array} \]
                  (FPCore (x y z t)
                   :precision binary64
                   (- (/ (+ (/ 2.0 z) 2.0) t) (- 2.0 (/ x y))))
                  double code(double x, double y, double z, double t) {
                  	return (((2.0 / z) + 2.0) / t) - (2.0 - (x / y));
                  }
                  
                  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 = (((2.0d0 / z) + 2.0d0) / t) - (2.0d0 - (x / y))
                  end function
                  
                  public static double code(double x, double y, double z, double t) {
                  	return (((2.0 / z) + 2.0) / t) - (2.0 - (x / y));
                  }
                  
                  def code(x, y, z, t):
                  	return (((2.0 / z) + 2.0) / t) - (2.0 - (x / y))
                  
                  function code(x, y, z, t)
                  	return Float64(Float64(Float64(Float64(2.0 / z) + 2.0) / t) - Float64(2.0 - Float64(x / y)))
                  end
                  
                  function tmp = code(x, y, z, t)
                  	tmp = (((2.0 / z) + 2.0) / t) - (2.0 - (x / y));
                  end
                  
                  code[x_, y_, z_, t_] := N[(N[(N[(N[(2.0 / z), $MachinePrecision] + 2.0), $MachinePrecision] / t), $MachinePrecision] - N[(2.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                  
                  \begin{array}{l}
                  
                  \\
                  \frac{\frac{2}{z} + 2}{t} - \left(2 - \frac{x}{y}\right)
                  \end{array}
                  

                  Reproduce

                  ?
                  herbie shell --seed 2024192 
                  (FPCore (x y z t)
                    :name "Data.HashTable.ST.Basic:computeOverhead from hashtables-1.2.0.2"
                    :precision binary64
                  
                    :alt
                    (! :herbie-platform default (- (/ (+ (/ 2 z) 2) t) (- 2 (/ x y))))
                  
                    (+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))