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

Percentage Accurate: 85.8% → 99.0%
Time: 11.2s
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: 85.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.0% accurate, 1.3× speedup?

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

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

    \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
  2. Simplified99.5%

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

Alternative 2: 60.6% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -9.5 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.3 \cdot 10^{-31}:\\
\;\;\;\;\frac{2}{z \cdot t}\\

\mathbf{elif}\;z \leq 280000000000:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.49999999999999951e126 or 2.8e11 < z

    1. Initial program 73.2%

      \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
    2. Simplified100.0%

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

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

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

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

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

        if -9.49999999999999951e126 < z < -9.50000000000000032e-196 or 2.2999999999999998e-31 < z < 2.8e11

        1. Initial program 97.2%

          \[\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 inf

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

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

          if -9.50000000000000032e-196 < z < 2.2999999999999998e-31

          1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(2, z\right)\right), \mathsf{*.f64}\left(t, \left(\frac{x}{y} + \left(\mathsf{neg}\left(2\right)\right)\right)\right)\right), t\right) \]
            10. metadata-evalN/A

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(2, z\right)\right), \mathsf{*.f64}\left(t, \left(-2 + \frac{x}{y}\right)\right)\right), t\right) \]
            12. *-lft-identityN/A

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \color{blue}{z}\right)\right) \]
          8. Simplified79.4%

            \[\leadsto \color{blue}{\frac{2}{t \cdot z}} \]
        5. Recombined 3 regimes into one program.
        6. Final simplification73.5%

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+126}:\\ \;\;\;\;-2 + \frac{2}{t}\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-196}:\\ \;\;\;\;-2 + \frac{x}{y}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-31}:\\ \;\;\;\;\frac{2}{z \cdot t}\\ \mathbf{elif}\;z \leq 280000000000:\\ \;\;\;\;-2 + \frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;-2 + \frac{2}{t}\\ \end{array} \]
        7. Add Preprocessing

        Alternative 3: 97.5% accurate, 0.7× speedup?

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

          1. Initial program 89.5%

            \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
          2. Simplified99.2%

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

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

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

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

          if -2e14 < (/.f64 x y) < 9.99999999999999908e-22

          1. Initial program 87.2%

            \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
          2. Simplified99.8%

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

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

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

          Alternative 4: 50.7% accurate, 0.7× speedup?

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

            1. Initial program 87.2%

              \[\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 x around inf

              \[\leadsto \color{blue}{\frac{x}{y}} \]
            4. Step-by-step derivation
              1. /-lowering-/.f6469.9%

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

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

            if -0.091999999999999998 < (/.f64 x y) < 8.49999999999999963e-172

            1. Initial program 88.9%

              \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
            2. Simplified99.8%

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

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

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

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

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

                if 8.49999999999999963e-172 < (/.f64 x y) < 2.20000000000000009e88

                1. Initial program 90.2%

                  \[\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 \color{blue}{\frac{2 + 2 \cdot \frac{1}{z}}{t}} \]
                4. 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-/.f6482.2%

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

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

                  \[\leadsto \mathsf{/.f64}\left(\color{blue}{2}, t\right) \]
                7. Step-by-step derivation
                  1. Simplified37.0%

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

                Alternative 5: 65.9% accurate, 0.8× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{y} + \frac{2}{t}\\ \mathbf{if}\;z \leq -3 \cdot 10^{+142}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-195}:\\ \;\;\;\;-2 + \frac{x}{y}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-31}:\\ \;\;\;\;\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 t))))
                   (if (<= z -3e+142)
                     t_1
                     (if (<= z -1.05e-195)
                       (+ -2.0 (/ x y))
                       (if (<= z 7.2e-31) (/ 2.0 (* z t)) t_1)))))
                double code(double x, double y, double z, double t) {
                	double t_1 = (x / y) + (2.0 / t);
                	double tmp;
                	if (z <= -3e+142) {
                		tmp = t_1;
                	} else if (z <= -1.05e-195) {
                		tmp = -2.0 + (x / y);
                	} else if (z <= 7.2e-31) {
                		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 / t)
                    if (z <= (-3d+142)) then
                        tmp = t_1
                    else if (z <= (-1.05d-195)) then
                        tmp = (-2.0d0) + (x / y)
                    else if (z <= 7.2d-31) 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 / t);
                	double tmp;
                	if (z <= -3e+142) {
                		tmp = t_1;
                	} else if (z <= -1.05e-195) {
                		tmp = -2.0 + (x / y);
                	} else if (z <= 7.2e-31) {
                		tmp = 2.0 / (z * t);
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t):
                	t_1 = (x / y) + (2.0 / t)
                	tmp = 0
                	if z <= -3e+142:
                		tmp = t_1
                	elif z <= -1.05e-195:
                		tmp = -2.0 + (x / y)
                	elif z <= 7.2e-31:
                		tmp = 2.0 / (z * t)
                	else:
                		tmp = t_1
                	return tmp
                
                function code(x, y, z, t)
                	t_1 = Float64(Float64(x / y) + Float64(2.0 / t))
                	tmp = 0.0
                	if (z <= -3e+142)
                		tmp = t_1;
                	elseif (z <= -1.05e-195)
                		tmp = Float64(-2.0 + Float64(x / y));
                	elseif (z <= 7.2e-31)
                		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 / t);
                	tmp = 0.0;
                	if (z <= -3e+142)
                		tmp = t_1;
                	elseif (z <= -1.05e-195)
                		tmp = -2.0 + (x / y);
                	elseif (z <= 7.2e-31)
                		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] + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e+142], t$95$1, If[LessEqual[z, -1.05e-195], N[(-2.0 + N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e-31], N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \frac{x}{y} + \frac{2}{t}\\
                \mathbf{if}\;z \leq -3 \cdot 10^{+142}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;z \leq -1.05 \cdot 10^{-195}:\\
                \;\;\;\;-2 + \frac{x}{y}\\
                
                \mathbf{elif}\;z \leq 7.2 \cdot 10^{-31}:\\
                \;\;\;\;\frac{2}{z \cdot t}\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if z < -2.99999999999999975e142 or 7.20000000000000007e-31 < z

                  1. Initial program 75.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 z around inf

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2}{t}\right), -2\right)\right) \]
                    10. /-lowering-/.f6499.0%

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, t\right), -2\right)\right) \]
                  5. Simplified99.0%

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

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

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

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

                  if -2.99999999999999975e142 < z < -1.05e-195

                  1. Initial program 95.5%

                    \[\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 inf

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

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

                    if -1.05e-195 < z < 7.20000000000000007e-31

                    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(2, z\right)\right), \mathsf{*.f64}\left(t, \left(\frac{x}{y} + \left(\mathsf{neg}\left(2\right)\right)\right)\right)\right), t\right) \]
                      10. metadata-evalN/A

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

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(2, z\right)\right), \mathsf{*.f64}\left(t, \left(-2 + \frac{x}{y}\right)\right)\right), t\right) \]
                      12. *-lft-identityN/A

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \color{blue}{z}\right)\right) \]
                    8. Simplified79.4%

                      \[\leadsto \color{blue}{\frac{2}{t \cdot z}} \]
                  5. Recombined 3 regimes into one program.
                  6. Final simplification75.4%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+142}:\\ \;\;\;\;\frac{x}{y} + \frac{2}{t}\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-195}:\\ \;\;\;\;-2 + \frac{x}{y}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-31}:\\ \;\;\;\;\frac{2}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y} + \frac{2}{t}\\ \end{array} \]
                  7. Add Preprocessing

                  Alternative 6: 91.7% accurate, 0.9× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{y} + \left(-2 + \frac{2}{t}\right)\\ \mathbf{if}\;z \leq -1.45 \cdot 10^{-16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-30}:\\ \;\;\;\;\frac{x}{y} + \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 (/ 2.0 t)))))
                     (if (<= z -1.45e-16)
                       t_1
                       (if (<= z 1.25e-30) (+ (/ x y) (/ 2.0 (* z t))) t_1))))
                  double code(double x, double y, double z, double t) {
                  	double t_1 = (x / y) + (-2.0 + (2.0 / t));
                  	double tmp;
                  	if (z <= -1.45e-16) {
                  		tmp = t_1;
                  	} else if (z <= 1.25e-30) {
                  		tmp = (x / y) + (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) + (2.0d0 / t))
                      if (z <= (-1.45d-16)) then
                          tmp = t_1
                      else if (z <= 1.25d-30) then
                          tmp = (x / y) + (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 + (2.0 / t));
                  	double tmp;
                  	if (z <= -1.45e-16) {
                  		tmp = t_1;
                  	} else if (z <= 1.25e-30) {
                  		tmp = (x / y) + (2.0 / (z * t));
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t):
                  	t_1 = (x / y) + (-2.0 + (2.0 / t))
                  	tmp = 0
                  	if z <= -1.45e-16:
                  		tmp = t_1
                  	elif z <= 1.25e-30:
                  		tmp = (x / y) + (2.0 / (z * t))
                  	else:
                  		tmp = t_1
                  	return tmp
                  
                  function code(x, y, z, t)
                  	t_1 = Float64(Float64(x / y) + Float64(-2.0 + Float64(2.0 / t)))
                  	tmp = 0.0
                  	if (z <= -1.45e-16)
                  		tmp = t_1;
                  	elseif (z <= 1.25e-30)
                  		tmp = Float64(Float64(x / y) + 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 + (2.0 / t));
                  	tmp = 0.0;
                  	if (z <= -1.45e-16)
                  		tmp = t_1;
                  	elseif (z <= 1.25e-30)
                  		tmp = (x / y) + (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] + N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e-16], t$95$1, If[LessEqual[z, 1.25e-30], N[(N[(x / y), $MachinePrecision] + N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := \frac{x}{y} + \left(-2 + \frac{2}{t}\right)\\
                  \mathbf{if}\;z \leq -1.45 \cdot 10^{-16}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;z \leq 1.25 \cdot 10^{-30}:\\
                  \;\;\;\;\frac{x}{y} + \frac{2}{z \cdot t}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if z < -1.4499999999999999e-16 or 1.24999999999999993e-30 < z

                    1. Initial program 79.0%

                      \[\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 z around inf

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\left(\frac{2}{t}\right), -2\right)\right) \]
                      10. /-lowering-/.f6497.7%

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, t\right), -2\right)\right) \]
                    5. Simplified97.7%

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

                    if -1.4499999999999999e-16 < z < 1.24999999999999993e-30

                    1. Initial program 99.0%

                      \[\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 z around 0

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

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

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

                    Alternative 7: 85.3% accurate, 0.9× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{y} + \left(-2 + \frac{2}{t}\right)\\ \mathbf{if}\;z \leq -2.3 \cdot 10^{-77}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-31}:\\ \;\;\;\;-2 + \frac{\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 (/ 2.0 t)))))
                       (if (<= z -2.3e-77) t_1 (if (<= z 7.5e-31) (+ -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 + (2.0 / t));
                    	double tmp;
                    	if (z <= -2.3e-77) {
                    		tmp = t_1;
                    	} else if (z <= 7.5e-31) {
                    		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) + (2.0d0 / t))
                        if (z <= (-2.3d-77)) then
                            tmp = t_1
                        else if (z <= 7.5d-31) 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 + (2.0 / t));
                    	double tmp;
                    	if (z <= -2.3e-77) {
                    		tmp = t_1;
                    	} else if (z <= 7.5e-31) {
                    		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 + (2.0 / t))
                    	tmp = 0
                    	if z <= -2.3e-77:
                    		tmp = t_1
                    	elif z <= 7.5e-31:
                    		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) + Float64(-2.0 + Float64(2.0 / t)))
                    	tmp = 0.0
                    	if (z <= -2.3e-77)
                    		tmp = t_1;
                    	elseif (z <= 7.5e-31)
                    		tmp = Float64(-2.0 + Float64(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 + (2.0 / t));
                    	tmp = 0.0;
                    	if (z <= -2.3e-77)
                    		tmp = t_1;
                    	elseif (z <= 7.5e-31)
                    		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] + N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.3e-77], t$95$1, If[LessEqual[z, 7.5e-31], N[(-2.0 + N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \frac{x}{y} + \left(-2 + \frac{2}{t}\right)\\
                    \mathbf{if}\;z \leq -2.3 \cdot 10^{-77}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;z \leq 7.5 \cdot 10^{-31}:\\
                    \;\;\;\;-2 + \frac{\frac{2}{z}}{t}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if z < -2.29999999999999999e-77 or 7.49999999999999975e-31 < z

                      1. Initial program 80.6%

                        \[\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 z around inf

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

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

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

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

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

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

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

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

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

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

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

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

                      if -2.29999999999999999e-77 < z < 7.49999999999999975e-31

                      1. Initial program 98.9%

                        \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
                      2. Simplified98.8%

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

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

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

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

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

                          \[\leadsto \frac{\color{blue}{\frac{2}{z}}}{t} + -2 \]
                      6. Recombined 2 regimes into one program.
                      7. Final simplification88.7%

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

                      Alternative 8: 64.7% accurate, 0.9× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{x}{y} \leq -250000:\\ \;\;\;\;-2 + \frac{x}{y}\\ \mathbf{elif}\;\frac{x}{y} \leq 10^{+88}:\\ \;\;\;\;-2 + \frac{2}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \end{array} \]
                      (FPCore (x y z t)
                       :precision binary64
                       (if (<= (/ x y) -250000.0)
                         (+ -2.0 (/ x y))
                         (if (<= (/ x y) 1e+88) (+ -2.0 (/ 2.0 t)) (/ x y))))
                      double code(double x, double y, double z, double t) {
                      	double tmp;
                      	if ((x / y) <= -250000.0) {
                      		tmp = -2.0 + (x / y);
                      	} else if ((x / y) <= 1e+88) {
                      		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) <= (-250000.0d0)) then
                              tmp = (-2.0d0) + (x / y)
                          else if ((x / y) <= 1d+88) 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) <= -250000.0) {
                      		tmp = -2.0 + (x / y);
                      	} else if ((x / y) <= 1e+88) {
                      		tmp = -2.0 + (2.0 / t);
                      	} else {
                      		tmp = x / y;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t):
                      	tmp = 0
                      	if (x / y) <= -250000.0:
                      		tmp = -2.0 + (x / y)
                      	elif (x / y) <= 1e+88:
                      		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) <= -250000.0)
                      		tmp = Float64(-2.0 + Float64(x / y));
                      	elseif (Float64(x / y) <= 1e+88)
                      		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) <= -250000.0)
                      		tmp = -2.0 + (x / y);
                      	elseif ((x / y) <= 1e+88)
                      		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], -250000.0], N[(-2.0 + N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 1e+88], 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 -250000:\\
                      \;\;\;\;-2 + \frac{x}{y}\\
                      
                      \mathbf{elif}\;\frac{x}{y} \leq 10^{+88}:\\
                      \;\;\;\;-2 + \frac{2}{t}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{x}{y}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if (/.f64 x y) < -2.5e5

                        1. Initial program 91.4%

                          \[\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 inf

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

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

                          if -2.5e5 < (/.f64 x y) < 9.99999999999999959e87

                          1. Initial program 89.5%

                            \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
                          2. Simplified99.8%

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

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

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

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\color{blue}{2}, t\right), -2\right) \]
                            3. Step-by-step derivation
                              1. Simplified56.7%

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

                              if 9.99999999999999959e87 < (/.f64 x y)

                              1. Initial program 82.0%

                                \[\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 x around inf

                                \[\leadsto \color{blue}{\frac{x}{y}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f6480.5%

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

                                \[\leadsto \color{blue}{\frac{x}{y}} \]
                            4. Recombined 3 regimes into one program.
                            5. Final simplification62.6%

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

                            Alternative 9: 64.6% accurate, 0.9× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{x}{y} \leq -480000000000:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;\frac{x}{y} \leq 10^{+88}:\\ \;\;\;\;-2 + \frac{2}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \end{array} \]
                            (FPCore (x y z t)
                             :precision binary64
                             (if (<= (/ x y) -480000000000.0)
                               (/ x y)
                               (if (<= (/ x y) 1e+88) (+ -2.0 (/ 2.0 t)) (/ x y))))
                            double code(double x, double y, double z, double t) {
                            	double tmp;
                            	if ((x / y) <= -480000000000.0) {
                            		tmp = x / y;
                            	} else if ((x / y) <= 1e+88) {
                            		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) <= (-480000000000.0d0)) then
                                    tmp = x / y
                                else if ((x / y) <= 1d+88) 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) <= -480000000000.0) {
                            		tmp = x / y;
                            	} else if ((x / y) <= 1e+88) {
                            		tmp = -2.0 + (2.0 / t);
                            	} else {
                            		tmp = x / y;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t):
                            	tmp = 0
                            	if (x / y) <= -480000000000.0:
                            		tmp = x / y
                            	elif (x / y) <= 1e+88:
                            		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) <= -480000000000.0)
                            		tmp = Float64(x / y);
                            	elseif (Float64(x / y) <= 1e+88)
                            		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) <= -480000000000.0)
                            		tmp = x / y;
                            	elseif ((x / y) <= 1e+88)
                            		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], -480000000000.0], N[(x / y), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 1e+88], 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 -480000000000:\\
                            \;\;\;\;\frac{x}{y}\\
                            
                            \mathbf{elif}\;\frac{x}{y} \leq 10^{+88}:\\
                            \;\;\;\;-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) < -4.8e11 or 9.99999999999999959e87 < (/.f64 x y)

                              1. Initial program 87.1%

                                \[\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 x around inf

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

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

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

                              if -4.8e11 < (/.f64 x y) < 9.99999999999999959e87

                              1. Initial program 89.5%

                                \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
                              2. Simplified99.8%

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

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

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

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\color{blue}{2}, t\right), -2\right) \]
                                3. Step-by-step derivation
                                  1. Simplified56.7%

                                    \[\leadsto \frac{\color{blue}{2}}{t} + -2 \]
                                4. Recombined 2 regimes into one program.
                                5. Final simplification62.6%

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

                                Alternative 10: 80.6% accurate, 1.0× speedup?

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

                                  1. Initial program 75.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 inf

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

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

                                    if -5.5e13 < t < 1.30000000000000005e-6

                                    1. Initial program 99.0%

                                      \[\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 \color{blue}{\frac{2 + 2 \cdot \frac{1}{z}}{t}} \]
                                    4. 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-/.f6480.6%

                                        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(2, z\right)\right), t\right) \]
                                    5. Simplified80.6%

                                      \[\leadsto \color{blue}{\frac{2 + \frac{2}{z}}{t}} \]
                                  5. Recombined 2 regimes into one program.
                                  6. Final simplification79.8%

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

                                  Alternative 11: 72.5% accurate, 1.0× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{y} + \frac{2}{t}\\ \mathbf{if}\;z \leq -5.8 \cdot 10^{-6}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-31}:\\ \;\;\;\;-2 + \frac{\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 t))))
                                     (if (<= z -5.8e-6) t_1 (if (<= z 5e-31) (+ -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 / t);
                                  	double tmp;
                                  	if (z <= -5.8e-6) {
                                  		tmp = t_1;
                                  	} else if (z <= 5e-31) {
                                  		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 / t)
                                      if (z <= (-5.8d-6)) then
                                          tmp = t_1
                                      else if (z <= 5d-31) 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 / t);
                                  	double tmp;
                                  	if (z <= -5.8e-6) {
                                  		tmp = t_1;
                                  	} else if (z <= 5e-31) {
                                  		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 / t)
                                  	tmp = 0
                                  	if z <= -5.8e-6:
                                  		tmp = t_1
                                  	elif z <= 5e-31:
                                  		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) + Float64(2.0 / t))
                                  	tmp = 0.0
                                  	if (z <= -5.8e-6)
                                  		tmp = t_1;
                                  	elseif (z <= 5e-31)
                                  		tmp = Float64(-2.0 + Float64(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 / t);
                                  	tmp = 0.0;
                                  	if (z <= -5.8e-6)
                                  		tmp = t_1;
                                  	elseif (z <= 5e-31)
                                  		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] + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.8e-6], t$95$1, If[LessEqual[z, 5e-31], N[(-2.0 + N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  t_1 := \frac{x}{y} + \frac{2}{t}\\
                                  \mathbf{if}\;z \leq -5.8 \cdot 10^{-6}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  \mathbf{elif}\;z \leq 5 \cdot 10^{-31}:\\
                                  \;\;\;\;-2 + \frac{\frac{2}{z}}{t}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if z < -5.8000000000000004e-6 or 5e-31 < z

                                    1. Initial program 78.6%

                                      \[\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 z around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if -5.8000000000000004e-6 < z < 5e-31

                                    1. Initial program 99.0%

                                      \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
                                    2. Simplified99.0%

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

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

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

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

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

                                        \[\leadsto \frac{\color{blue}{\frac{2}{z}}}{t} + -2 \]
                                    6. Recombined 2 regimes into one program.
                                    7. Final simplification77.8%

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

                                    Alternative 12: 36.8% accurate, 1.3× speedup?

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

                                      1. Initial program 76.2%

                                        \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
                                      2. Simplified99.8%

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

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

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

                                          \[\leadsto \color{blue}{-2} \]
                                        3. Step-by-step derivation
                                          1. Simplified35.0%

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

                                          if -1 < t < 4.50000000000000011e-6

                                          1. Initial program 99.0%

                                            \[\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 \color{blue}{\frac{2 + 2 \cdot \frac{1}{z}}{t}} \]
                                          4. 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-/.f6480.3%

                                              \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(2, z\right)\right), t\right) \]
                                          5. Simplified80.3%

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

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

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

                                          Alternative 13: 20.3% 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 88.5%

                                            \[\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} \]
                                          2. Simplified99.5%

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

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

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

                                              \[\leadsto \color{blue}{-2} \]
                                            3. Step-by-step derivation
                                              1. Simplified17.5%

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

                                              Developer Target 1: 99.0% 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 2024158 
                                              (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))))