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

Percentage Accurate: 86.6% → 99.4%
Time: 10.5s
Alternatives: 14
Speedup: 1.1×

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 14 alternatives:

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

Initial Program: 86.6% 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.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\left(1 - t\right) \cdot \left(z \cdot 2\right) + 2}{t \cdot z} + \frac{x}{y} \leq \infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, 2, \mathsf{fma}\left(z, -2 \cdot t, 2\right)\right)}{t \cdot z} + \frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;-2 + \frac{x}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= (+ (/ (+ (* (- 1.0 t) (* z 2.0)) 2.0) (* t z)) (/ x y)) INFINITY)
   (+ (/ (fma z 2.0 (fma z (* -2.0 t) 2.0)) (* t z)) (/ x y))
   (+ -2.0 (/ x y))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((((((1.0 - t) * (z * 2.0)) + 2.0) / (t * z)) + (x / y)) <= ((double) INFINITY)) {
		tmp = (fma(z, 2.0, fma(z, (-2.0 * t), 2.0)) / (t * z)) + (x / y);
	} else {
		tmp = -2.0 + (x / y);
	}
	return tmp;
}
function code(x, y, z, t)
	tmp = 0.0
	if (Float64(Float64(Float64(Float64(Float64(1.0 - t) * Float64(z * 2.0)) + 2.0) / Float64(t * z)) + Float64(x / y)) <= Inf)
		tmp = Float64(Float64(fma(z, 2.0, fma(z, Float64(-2.0 * t), 2.0)) / Float64(t * z)) + Float64(x / y));
	else
		tmp = Float64(-2.0 + Float64(x / y));
	end
	return tmp
end
code[x_, y_, z_, t_] := If[LessEqual[N[(N[(N[(N[(N[(1.0 - t), $MachinePrecision] * N[(z * 2.0), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(z * 2.0 + N[(z * N[(-2.0 * t), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision], N[(-2.0 + N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(1 - t\right) \cdot \left(z \cdot 2\right) + 2}{t \cdot z} + \frac{x}{y} \leq \infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(z, 2, \mathsf{fma}\left(z, -2 \cdot t, 2\right)\right)}{t \cdot z} + \frac{x}{y}\\

\mathbf{else}:\\
\;\;\;\;-2 + \frac{x}{y}\\


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{y} + \frac{\mathsf{fma}\left(z, 2, \color{blue}{\left(z \cdot 2\right)} \cdot \left(\mathsf{neg}\left(t\right)\right) + 2\right)}{t \cdot z} \]
      12. associate-*l*N/A

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

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

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

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

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

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

        \[\leadsto \frac{x}{y} + \frac{\mathsf{fma}\left(z, 2, \mathsf{fma}\left(z, \color{blue}{\left(\mathsf{neg}\left(2\right)\right) \cdot t}, 2\right)\right)}{t \cdot z} \]
      19. metadata-eval99.8

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

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

    if +inf.0 < (+.f64 (/.f64 x y) (/.f64 (+.f64 #s(literal 2 binary64) (*.f64 (*.f64 z #s(literal 2 binary64)) (-.f64 #s(literal 1 binary64) t))) (*.f64 t z)))

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

      \[\leadsto \frac{x}{y} + \color{blue}{-2} \]
    4. Step-by-step derivation
      1. Applied rewrites97.6%

        \[\leadsto \frac{x}{y} + \color{blue}{-2} \]
    5. Recombined 2 regimes into one program.
    6. Final simplification99.5%

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

    Alternative 2: 84.6% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(1 - t\right) \cdot \left(z \cdot 2\right) + 2}{t \cdot z}\\ t_2 := -2 + \frac{x}{y}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+14}:\\ \;\;\;\;\frac{\mathsf{fma}\left(2, z, 2\right)}{t \cdot z}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+28}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\frac{\frac{2}{z} - -2}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (let* ((t_1 (/ (+ (* (- 1.0 t) (* z 2.0)) 2.0) (* t z)))
            (t_2 (+ -2.0 (/ x y))))
       (if (<= t_1 -5e+14)
         (/ (fma 2.0 z 2.0) (* t z))
         (if (<= t_1 5e+28)
           t_2
           (if (<= t_1 INFINITY) (/ (- (/ 2.0 z) -2.0) t) t_2)))))
    double code(double x, double y, double z, double t) {
    	double t_1 = (((1.0 - t) * (z * 2.0)) + 2.0) / (t * z);
    	double t_2 = -2.0 + (x / y);
    	double tmp;
    	if (t_1 <= -5e+14) {
    		tmp = fma(2.0, z, 2.0) / (t * z);
    	} else if (t_1 <= 5e+28) {
    		tmp = t_2;
    	} else if (t_1 <= ((double) INFINITY)) {
    		tmp = ((2.0 / z) - -2.0) / t;
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t)
    	t_1 = Float64(Float64(Float64(Float64(1.0 - t) * Float64(z * 2.0)) + 2.0) / Float64(t * z))
    	t_2 = Float64(-2.0 + Float64(x / y))
    	tmp = 0.0
    	if (t_1 <= -5e+14)
    		tmp = Float64(fma(2.0, z, 2.0) / Float64(t * z));
    	elseif (t_1 <= 5e+28)
    		tmp = t_2;
    	elseif (t_1 <= Inf)
    		tmp = Float64(Float64(Float64(2.0 / z) - -2.0) / t);
    	else
    		tmp = t_2;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(N[(1.0 - t), $MachinePrecision] * N[(z * 2.0), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 + N[(x / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+14], N[(N[(2.0 * z + 2.0), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+28], t$95$2, If[LessEqual[t$95$1, Infinity], N[(N[(N[(2.0 / z), $MachinePrecision] - -2.0), $MachinePrecision] / t), $MachinePrecision], t$95$2]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{\left(1 - t\right) \cdot \left(z \cdot 2\right) + 2}{t \cdot z}\\
    t_2 := -2 + \frac{x}{y}\\
    \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+14}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(2, z, 2\right)}{t \cdot z}\\
    
    \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+28}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;t\_1 \leq \infty:\\
    \;\;\;\;\frac{\frac{2}{z} - -2}{t}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_2\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (/.f64 (+.f64 #s(literal 2 binary64) (*.f64 (*.f64 z #s(literal 2 binary64)) (-.f64 #s(literal 1 binary64) t))) (*.f64 t z)) < -5e14

      1. Initial program 99.8%

        \[\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. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{2 + 2 \cdot \frac{1}{z}}{t}} \]
        2. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{2 \cdot \frac{1}{z} + 2}}{t} \]
        3. metadata-evalN/A

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

          \[\leadsto \frac{\color{blue}{2 \cdot \frac{1}{z} - -2}}{t} \]
        5. lower--.f64N/A

          \[\leadsto \frac{\color{blue}{2 \cdot \frac{1}{z} - -2}}{t} \]
        6. associate-*r/N/A

          \[\leadsto \frac{\color{blue}{\frac{2 \cdot 1}{z}} - -2}{t} \]
        7. metadata-evalN/A

          \[\leadsto \frac{\frac{\color{blue}{2}}{z} - -2}{t} \]
        8. lower-/.f6476.2

          \[\leadsto \frac{\color{blue}{\frac{2}{z}} - -2}{t} \]
      5. Applied rewrites76.2%

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

        \[\leadsto \frac{2 \cdot \frac{z}{t} + 2 \cdot \frac{1}{t}}{\color{blue}{z}} \]
      7. Applied rewrites77.3%

        \[\leadsto \frac{\mathsf{fma}\left(2, z, 2\right)}{\color{blue}{z \cdot t}} \]

      if -5e14 < (/.f64 (+.f64 #s(literal 2 binary64) (*.f64 (*.f64 z #s(literal 2 binary64)) (-.f64 #s(literal 1 binary64) t))) (*.f64 t z)) < 4.99999999999999957e28 or +inf.0 < (/.f64 (+.f64 #s(literal 2 binary64) (*.f64 (*.f64 z #s(literal 2 binary64)) (-.f64 #s(literal 1 binary64) t))) (*.f64 t z))

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

        \[\leadsto \frac{x}{y} + \color{blue}{-2} \]
      4. Step-by-step derivation
        1. Applied rewrites96.4%

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

        if 4.99999999999999957e28 < (/.f64 (+.f64 #s(literal 2 binary64) (*.f64 (*.f64 z #s(literal 2 binary64)) (-.f64 #s(literal 1 binary64) t))) (*.f64 t z)) < +inf.0

        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 0

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

            \[\leadsto \color{blue}{\frac{2 + 2 \cdot \frac{1}{z}}{t}} \]
          2. +-commutativeN/A

            \[\leadsto \frac{\color{blue}{2 \cdot \frac{1}{z} + 2}}{t} \]
          3. metadata-evalN/A

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

            \[\leadsto \frac{\color{blue}{2 \cdot \frac{1}{z} - -2}}{t} \]
          5. lower--.f64N/A

            \[\leadsto \frac{\color{blue}{2 \cdot \frac{1}{z} - -2}}{t} \]
          6. associate-*r/N/A

            \[\leadsto \frac{\color{blue}{\frac{2 \cdot 1}{z}} - -2}{t} \]
          7. metadata-evalN/A

            \[\leadsto \frac{\frac{\color{blue}{2}}{z} - -2}{t} \]
          8. lower-/.f6475.8

            \[\leadsto \frac{\color{blue}{\frac{2}{z}} - -2}{t} \]
        5. Applied rewrites75.8%

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

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

      Alternative 3: 84.6% accurate, 0.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\mathsf{fma}\left(2, z, 2\right)}{t \cdot z}\\ t_2 := \frac{\left(1 - t\right) \cdot \left(z \cdot 2\right) + 2}{t \cdot z}\\ t_3 := -2 + \frac{x}{y}\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+14}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+28}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (let* ((t_1 (/ (fma 2.0 z 2.0) (* t z)))
              (t_2 (/ (+ (* (- 1.0 t) (* z 2.0)) 2.0) (* t z)))
              (t_3 (+ -2.0 (/ x y))))
         (if (<= t_2 -5e+14)
           t_1
           (if (<= t_2 5e+28) t_3 (if (<= t_2 INFINITY) t_1 t_3)))))
      double code(double x, double y, double z, double t) {
      	double t_1 = fma(2.0, z, 2.0) / (t * z);
      	double t_2 = (((1.0 - t) * (z * 2.0)) + 2.0) / (t * z);
      	double t_3 = -2.0 + (x / y);
      	double tmp;
      	if (t_2 <= -5e+14) {
      		tmp = t_1;
      	} else if (t_2 <= 5e+28) {
      		tmp = t_3;
      	} else if (t_2 <= ((double) INFINITY)) {
      		tmp = t_1;
      	} else {
      		tmp = t_3;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t)
      	t_1 = Float64(fma(2.0, z, 2.0) / Float64(t * z))
      	t_2 = Float64(Float64(Float64(Float64(1.0 - t) * Float64(z * 2.0)) + 2.0) / Float64(t * z))
      	t_3 = Float64(-2.0 + Float64(x / y))
      	tmp = 0.0
      	if (t_2 <= -5e+14)
      		tmp = t_1;
      	elseif (t_2 <= 5e+28)
      		tmp = t_3;
      	elseif (t_2 <= Inf)
      		tmp = t_1;
      	else
      		tmp = t_3;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(2.0 * z + 2.0), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(1.0 - t), $MachinePrecision] * N[(z * 2.0), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-2.0 + N[(x / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+14], t$95$1, If[LessEqual[t$95$2, 5e+28], t$95$3, If[LessEqual[t$95$2, Infinity], t$95$1, t$95$3]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{\mathsf{fma}\left(2, z, 2\right)}{t \cdot z}\\
      t_2 := \frac{\left(1 - t\right) \cdot \left(z \cdot 2\right) + 2}{t \cdot z}\\
      t_3 := -2 + \frac{x}{y}\\
      \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+14}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+28}:\\
      \;\;\;\;t\_3\\
      
      \mathbf{elif}\;t\_2 \leq \infty:\\
      \;\;\;\;t\_1\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_3\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (/.f64 (+.f64 #s(literal 2 binary64) (*.f64 (*.f64 z #s(literal 2 binary64)) (-.f64 #s(literal 1 binary64) t))) (*.f64 t z)) < -5e14 or 4.99999999999999957e28 < (/.f64 (+.f64 #s(literal 2 binary64) (*.f64 (*.f64 z #s(literal 2 binary64)) (-.f64 #s(literal 1 binary64) t))) (*.f64 t z)) < +inf.0

        1. Initial program 98.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 0

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

            \[\leadsto \color{blue}{\frac{2 + 2 \cdot \frac{1}{z}}{t}} \]
          2. +-commutativeN/A

            \[\leadsto \frac{\color{blue}{2 \cdot \frac{1}{z} + 2}}{t} \]
          3. metadata-evalN/A

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

            \[\leadsto \frac{\color{blue}{2 \cdot \frac{1}{z} - -2}}{t} \]
          5. lower--.f64N/A

            \[\leadsto \frac{\color{blue}{2 \cdot \frac{1}{z} - -2}}{t} \]
          6. associate-*r/N/A

            \[\leadsto \frac{\color{blue}{\frac{2 \cdot 1}{z}} - -2}{t} \]
          7. metadata-evalN/A

            \[\leadsto \frac{\frac{\color{blue}{2}}{z} - -2}{t} \]
          8. lower-/.f6476.0

            \[\leadsto \frac{\color{blue}{\frac{2}{z}} - -2}{t} \]
        5. Applied rewrites76.0%

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

          \[\leadsto \frac{2 \cdot \frac{z}{t} + 2 \cdot \frac{1}{t}}{\color{blue}{z}} \]
        7. Applied rewrites76.5%

          \[\leadsto \frac{\mathsf{fma}\left(2, z, 2\right)}{\color{blue}{z \cdot t}} \]

        if -5e14 < (/.f64 (+.f64 #s(literal 2 binary64) (*.f64 (*.f64 z #s(literal 2 binary64)) (-.f64 #s(literal 1 binary64) t))) (*.f64 t z)) < 4.99999999999999957e28 or +inf.0 < (/.f64 (+.f64 #s(literal 2 binary64) (*.f64 (*.f64 z #s(literal 2 binary64)) (-.f64 #s(literal 1 binary64) t))) (*.f64 t z))

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

          \[\leadsto \frac{x}{y} + \color{blue}{-2} \]
        4. Step-by-step derivation
          1. Applied rewrites96.4%

            \[\leadsto \frac{x}{y} + \color{blue}{-2} \]
        5. Recombined 2 regimes into one program.
        6. Final simplification84.2%

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

        Alternative 4: 99.4% accurate, 0.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\left(1 - t\right) \cdot \left(z \cdot 2\right) + 2}{t \cdot z} + \frac{x}{y} \leq \infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(-2, t, 2\right), z, 2\right)}{t \cdot z} + \frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;-2 + \frac{x}{y}\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (if (<= (+ (/ (+ (* (- 1.0 t) (* z 2.0)) 2.0) (* t z)) (/ x y)) INFINITY)
           (+ (/ (fma (fma -2.0 t 2.0) z 2.0) (* t z)) (/ x y))
           (+ -2.0 (/ x y))))
        double code(double x, double y, double z, double t) {
        	double tmp;
        	if ((((((1.0 - t) * (z * 2.0)) + 2.0) / (t * z)) + (x / y)) <= ((double) INFINITY)) {
        		tmp = (fma(fma(-2.0, t, 2.0), z, 2.0) / (t * z)) + (x / y);
        	} else {
        		tmp = -2.0 + (x / y);
        	}
        	return tmp;
        }
        
        function code(x, y, z, t)
        	tmp = 0.0
        	if (Float64(Float64(Float64(Float64(Float64(1.0 - t) * Float64(z * 2.0)) + 2.0) / Float64(t * z)) + Float64(x / y)) <= Inf)
        		tmp = Float64(Float64(fma(fma(-2.0, t, 2.0), z, 2.0) / Float64(t * z)) + Float64(x / y));
        	else
        		tmp = Float64(-2.0 + Float64(x / y));
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_] := If[LessEqual[N[(N[(N[(N[(N[(1.0 - t), $MachinePrecision] * N[(z * 2.0), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[(-2.0 * t + 2.0), $MachinePrecision] * z + 2.0), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision], N[(-2.0 + N[(x / y), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;\frac{\left(1 - t\right) \cdot \left(z \cdot 2\right) + 2}{t \cdot z} + \frac{x}{y} \leq \infty:\\
        \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(-2, t, 2\right), z, 2\right)}{t \cdot z} + \frac{x}{y}\\
        
        \mathbf{else}:\\
        \;\;\;\;-2 + \frac{x}{y}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (+.f64 (/.f64 x y) (/.f64 (+.f64 #s(literal 2 binary64) (*.f64 (*.f64 z #s(literal 2 binary64)) (-.f64 #s(literal 1 binary64) t))) (*.f64 t z))) < +inf.0

          1. Initial program 99.8%

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

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

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

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

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

          if +inf.0 < (+.f64 (/.f64 x y) (/.f64 (+.f64 #s(literal 2 binary64) (*.f64 (*.f64 z #s(literal 2 binary64)) (-.f64 #s(literal 1 binary64) t))) (*.f64 t z)))

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

            \[\leadsto \frac{x}{y} + \color{blue}{-2} \]
          4. Step-by-step derivation
            1. Applied rewrites97.6%

              \[\leadsto \frac{x}{y} + \color{blue}{-2} \]
          5. Recombined 2 regimes into one program.
          6. Final simplification99.5%

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

          Alternative 5: 97.2% accurate, 0.7× speedup?

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

            1. Initial program 83.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 0

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

                \[\leadsto \frac{x}{y} + \frac{\color{blue}{2 \cdot z + 2}}{t \cdot z} \]
              2. lower-fma.f6497.7

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

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

            if -9.99999999999999977e37 < (/.f64 x y) < 1

            1. Initial program 83.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 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. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\mathsf{fma}\left(\frac{x}{y} - 2, t, \frac{\color{blue}{2}}{z} - -2\right)}{t} \]
              18. lower-/.f6499.9

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

              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{x}{y} - 2, t, \frac{2}{z} - -2\right)}{t}} \]
            6. Step-by-step derivation
              1. Applied rewrites99.9%

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

                \[\leadsto \frac{\mathsf{fma}\left(t, -2, \frac{2}{z}\right) - -2}{t} \]
              3. Step-by-step derivation
                1. Applied rewrites98.9%

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

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

              Alternative 6: 88.2% accurate, 0.7× speedup?

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

                1. Initial program 82.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 \frac{x}{y} + \color{blue}{2 \cdot \frac{1 - t}{t}} \]
                4. Step-by-step derivation
                  1. div-subN/A

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{x}{y} + \left(-2 + \frac{\color{blue}{2}}{t}\right) \]
                  10. metadata-evalN/A

                    \[\leadsto \frac{x}{y} + \left(-2 + \frac{\color{blue}{\mathsf{neg}\left(-2\right)}}{t}\right) \]
                  11. distribute-neg-fracN/A

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

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

                    \[\leadsto \frac{x}{y} + \color{blue}{\left(-2 - \frac{-2}{t}\right)} \]
                  14. lower-/.f6491.3

                    \[\leadsto \frac{x}{y} + \left(-2 - \color{blue}{\frac{-2}{t}}\right) \]
                5. Applied rewrites91.3%

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

                if -1.72e50 < (/.f64 x y) < 2.9000000000000001e105

                1. Initial program 84.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 0

                  \[\leadsto \color{blue}{2 \cdot \frac{1 - t}{t} + 2 \cdot \frac{1}{t \cdot z}} \]
                4. Step-by-step derivation
                  1. div-subN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 7: 85.7% accurate, 0.7× speedup?

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

                1. Initial program 82.4%

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\frac{x}{y}} \]
                7. Applied rewrites82.3%

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

                if -1.15000000000000003e51 < (/.f64 x y) < 1.19999999999999992e113

                1. Initial program 84.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 0

                  \[\leadsto \color{blue}{2 \cdot \frac{1 - t}{t} + 2 \cdot \frac{1}{t \cdot z}} \]
                4. Step-by-step derivation
                  1. div-subN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 8: 98.3% accurate, 0.9× speedup?

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

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

                  \[\leadsto \frac{x}{y} + \color{blue}{2 \cdot \frac{1 - t}{t}} \]
                4. Step-by-step derivation
                  1. div-subN/A

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{x}{y} + \left(-2 + \frac{\color{blue}{2}}{t}\right) \]
                  10. metadata-evalN/A

                    \[\leadsto \frac{x}{y} + \left(-2 + \frac{\color{blue}{\mathsf{neg}\left(-2\right)}}{t}\right) \]
                  11. distribute-neg-fracN/A

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

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

                    \[\leadsto \frac{x}{y} + \color{blue}{\left(-2 - \frac{-2}{t}\right)} \]
                  14. lower-/.f6499.7

                    \[\leadsto \frac{x}{y} + \left(-2 - \color{blue}{\frac{-2}{t}}\right) \]
                5. Applied rewrites99.7%

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

                if -1 < z < 5.5000000000000004e-12

                1. Initial program 98.1%

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

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

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

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

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

                  \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{-2 \cdot t}, z, 2\right)}{t \cdot z} + \frac{x}{y} \]
                6. Step-by-step derivation
                  1. lower-*.f6497.8

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

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

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

              Alternative 9: 64.5% accurate, 1.0× speedup?

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

                1. Initial program 83.7%

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

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

                    \[\leadsto \color{blue}{\frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} + \frac{x}{y}} \]
                  3. lower-+.f6483.7

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

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

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

                    \[\leadsto \color{blue}{\frac{x}{y}} \]
                7. Applied rewrites79.0%

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

                if -1.6500000000000001e35 < (/.f64 x y) < 4.49999999999999959e59

                1. Initial program 83.3%

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

                  \[\leadsto \color{blue}{2 \cdot \frac{1 - t}{t} + 2 \cdot \frac{1}{t \cdot z}} \]
                4. Step-by-step derivation
                  1. div-subN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 10: 46.2% accurate, 1.0× speedup?

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

                  1. Initial program 83.7%

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

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

                      \[\leadsto \color{blue}{\frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z} + \frac{x}{y}} \]
                    3. lower-+.f6483.7

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

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

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

                      \[\leadsto \color{blue}{\frac{x}{y}} \]
                  7. Applied rewrites79.0%

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

                  if -1.6500000000000001e35 < (/.f64 x y) < 4.49999999999999959e59

                  1. Initial program 83.3%

                    \[\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. lower-/.f64N/A

                      \[\leadsto \color{blue}{\frac{2 + 2 \cdot \frac{1}{z}}{t}} \]
                    2. +-commutativeN/A

                      \[\leadsto \frac{\color{blue}{2 \cdot \frac{1}{z} + 2}}{t} \]
                    3. metadata-evalN/A

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

                      \[\leadsto \frac{\color{blue}{2 \cdot \frac{1}{z} - -2}}{t} \]
                    5. lower--.f64N/A

                      \[\leadsto \frac{\color{blue}{2 \cdot \frac{1}{z} - -2}}{t} \]
                    6. associate-*r/N/A

                      \[\leadsto \frac{\color{blue}{\frac{2 \cdot 1}{z}} - -2}{t} \]
                    7. metadata-evalN/A

                      \[\leadsto \frac{\frac{\color{blue}{2}}{z} - -2}{t} \]
                    8. lower-/.f6465.6

                      \[\leadsto \frac{\color{blue}{\frac{2}{z}} - -2}{t} \]
                  5. Applied rewrites65.6%

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

                    \[\leadsto \frac{2}{\color{blue}{t}} \]
                  7. Step-by-step derivation
                    1. Applied rewrites30.6%

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

                  Alternative 11: 91.3% accurate, 1.1× speedup?

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

                    1. Initial program 72.3%

                      \[\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 \frac{x}{y} + \color{blue}{2 \cdot \frac{1 - t}{t}} \]
                    4. Step-by-step derivation
                      1. div-subN/A

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{x}{y} + \left(-2 + \frac{\color{blue}{2}}{t}\right) \]
                      10. metadata-evalN/A

                        \[\leadsto \frac{x}{y} + \left(-2 + \frac{\color{blue}{\mathsf{neg}\left(-2\right)}}{t}\right) \]
                      11. distribute-neg-fracN/A

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

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

                        \[\leadsto \frac{x}{y} + \color{blue}{\left(-2 - \frac{-2}{t}\right)} \]
                      14. lower-/.f6499.1

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

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

                    if -0.107999999999999999 < z < 4.3999999999999998e-34

                    1. Initial program 98.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 z around 0

                      \[\leadsto \frac{x}{y} + \frac{\color{blue}{2}}{t \cdot z} \]
                    4. Step-by-step derivation
                      1. Applied rewrites87.8%

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

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

                    Alternative 12: 65.0% accurate, 1.1× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := -2 + \frac{x}{y}\\ \mathbf{if}\;t \leq -2.9 \cdot 10^{-121}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-67}:\\ \;\;\;\;\frac{z \cdot 2}{t \cdot z}\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{+23}:\\ \;\;\;\;\frac{\frac{2}{t}}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                    (FPCore (x y z t)
                     :precision binary64
                     (let* ((t_1 (+ -2.0 (/ x y))))
                       (if (<= t -2.9e-121)
                         t_1
                         (if (<= t 4e-67)
                           (/ (* z 2.0) (* t z))
                           (if (<= t 1.02e+23) (/ (/ 2.0 t) z) t_1)))))
                    double code(double x, double y, double z, double t) {
                    	double t_1 = -2.0 + (x / y);
                    	double tmp;
                    	if (t <= -2.9e-121) {
                    		tmp = t_1;
                    	} else if (t <= 4e-67) {
                    		tmp = (z * 2.0) / (t * z);
                    	} else if (t <= 1.02e+23) {
                    		tmp = (2.0 / t) / z;
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    real(8) function code(x, y, z, t)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8) :: t_1
                        real(8) :: tmp
                        t_1 = (-2.0d0) + (x / y)
                        if (t <= (-2.9d-121)) then
                            tmp = t_1
                        else if (t <= 4d-67) then
                            tmp = (z * 2.0d0) / (t * z)
                        else if (t <= 1.02d+23) then
                            tmp = (2.0d0 / t) / z
                        else
                            tmp = t_1
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t) {
                    	double t_1 = -2.0 + (x / y);
                    	double tmp;
                    	if (t <= -2.9e-121) {
                    		tmp = t_1;
                    	} else if (t <= 4e-67) {
                    		tmp = (z * 2.0) / (t * z);
                    	} else if (t <= 1.02e+23) {
                    		tmp = (2.0 / t) / z;
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t):
                    	t_1 = -2.0 + (x / y)
                    	tmp = 0
                    	if t <= -2.9e-121:
                    		tmp = t_1
                    	elif t <= 4e-67:
                    		tmp = (z * 2.0) / (t * z)
                    	elif t <= 1.02e+23:
                    		tmp = (2.0 / t) / z
                    	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 <= -2.9e-121)
                    		tmp = t_1;
                    	elseif (t <= 4e-67)
                    		tmp = Float64(Float64(z * 2.0) / Float64(t * z));
                    	elseif (t <= 1.02e+23)
                    		tmp = Float64(Float64(2.0 / t) / z);
                    	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 <= -2.9e-121)
                    		tmp = t_1;
                    	elseif (t <= 4e-67)
                    		tmp = (z * 2.0) / (t * z);
                    	elseif (t <= 1.02e+23)
                    		tmp = (2.0 / t) / z;
                    	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, -2.9e-121], t$95$1, If[LessEqual[t, 4e-67], N[(N[(z * 2.0), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.02e+23], N[(N[(2.0 / t), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := -2 + \frac{x}{y}\\
                    \mathbf{if}\;t \leq -2.9 \cdot 10^{-121}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;t \leq 4 \cdot 10^{-67}:\\
                    \;\;\;\;\frac{z \cdot 2}{t \cdot z}\\
                    
                    \mathbf{elif}\;t \leq 1.02 \cdot 10^{+23}:\\
                    \;\;\;\;\frac{\frac{2}{t}}{z}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if t < -2.9e-121 or 1.02e23 < t

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

                        \[\leadsto \frac{x}{y} + \color{blue}{-2} \]
                      4. Step-by-step derivation
                        1. Applied rewrites80.0%

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

                        if -2.9e-121 < t < 3.99999999999999977e-67

                        1. Initial program 97.8%

                          \[\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. lower-/.f64N/A

                            \[\leadsto \color{blue}{\frac{2 + 2 \cdot \frac{1}{z}}{t}} \]
                          2. +-commutativeN/A

                            \[\leadsto \frac{\color{blue}{2 \cdot \frac{1}{z} + 2}}{t} \]
                          3. metadata-evalN/A

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

                            \[\leadsto \frac{\color{blue}{2 \cdot \frac{1}{z} - -2}}{t} \]
                          5. lower--.f64N/A

                            \[\leadsto \frac{\color{blue}{2 \cdot \frac{1}{z} - -2}}{t} \]
                          6. associate-*r/N/A

                            \[\leadsto \frac{\color{blue}{\frac{2 \cdot 1}{z}} - -2}{t} \]
                          7. metadata-evalN/A

                            \[\leadsto \frac{\frac{\color{blue}{2}}{z} - -2}{t} \]
                          8. lower-/.f6483.9

                            \[\leadsto \frac{\color{blue}{\frac{2}{z}} - -2}{t} \]
                        5. Applied rewrites83.9%

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

                          \[\leadsto \frac{2 \cdot \frac{z}{t} + 2 \cdot \frac{1}{t}}{\color{blue}{z}} \]
                        7. Applied rewrites83.7%

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

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

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

                          if 3.99999999999999977e-67 < t < 1.02e23

                          1. Initial program 99.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 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. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{\mathsf{fma}\left(\frac{x}{y} - 2, t, \frac{\color{blue}{2}}{z} - -2\right)}{t} \]
                            18. lower-/.f6499.5

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

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

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

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

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

                          Alternative 13: 65.0% accurate, 1.3× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := -2 + \frac{x}{y}\\ \mathbf{if}\;t \leq -2.9 \cdot 10^{-121}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-67}:\\ \;\;\;\;\frac{z \cdot 2}{t \cdot z}\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{+23}:\\ \;\;\;\;\frac{2}{t \cdot z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                          (FPCore (x y z t)
                           :precision binary64
                           (let* ((t_1 (+ -2.0 (/ x y))))
                             (if (<= t -2.9e-121)
                               t_1
                               (if (<= t 4e-67)
                                 (/ (* z 2.0) (* t z))
                                 (if (<= t 1.02e+23) (/ 2.0 (* t z)) t_1)))))
                          double code(double x, double y, double z, double t) {
                          	double t_1 = -2.0 + (x / y);
                          	double tmp;
                          	if (t <= -2.9e-121) {
                          		tmp = t_1;
                          	} else if (t <= 4e-67) {
                          		tmp = (z * 2.0) / (t * z);
                          	} else if (t <= 1.02e+23) {
                          		tmp = 2.0 / (t * z);
                          	} else {
                          		tmp = t_1;
                          	}
                          	return tmp;
                          }
                          
                          real(8) function code(x, y, z, t)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              real(8), intent (in) :: z
                              real(8), intent (in) :: t
                              real(8) :: t_1
                              real(8) :: tmp
                              t_1 = (-2.0d0) + (x / y)
                              if (t <= (-2.9d-121)) then
                                  tmp = t_1
                              else if (t <= 4d-67) then
                                  tmp = (z * 2.0d0) / (t * z)
                              else if (t <= 1.02d+23) then
                                  tmp = 2.0d0 / (t * z)
                              else
                                  tmp = t_1
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z, double t) {
                          	double t_1 = -2.0 + (x / y);
                          	double tmp;
                          	if (t <= -2.9e-121) {
                          		tmp = t_1;
                          	} else if (t <= 4e-67) {
                          		tmp = (z * 2.0) / (t * z);
                          	} else if (t <= 1.02e+23) {
                          		tmp = 2.0 / (t * z);
                          	} else {
                          		tmp = t_1;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t):
                          	t_1 = -2.0 + (x / y)
                          	tmp = 0
                          	if t <= -2.9e-121:
                          		tmp = t_1
                          	elif t <= 4e-67:
                          		tmp = (z * 2.0) / (t * z)
                          	elif t <= 1.02e+23:
                          		tmp = 2.0 / (t * z)
                          	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 <= -2.9e-121)
                          		tmp = t_1;
                          	elseif (t <= 4e-67)
                          		tmp = Float64(Float64(z * 2.0) / Float64(t * z));
                          	elseif (t <= 1.02e+23)
                          		tmp = Float64(2.0 / Float64(t * z));
                          	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 <= -2.9e-121)
                          		tmp = t_1;
                          	elseif (t <= 4e-67)
                          		tmp = (z * 2.0) / (t * z);
                          	elseif (t <= 1.02e+23)
                          		tmp = 2.0 / (t * z);
                          	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, -2.9e-121], t$95$1, If[LessEqual[t, 4e-67], N[(N[(z * 2.0), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.02e+23], N[(2.0 / N[(t * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_1 := -2 + \frac{x}{y}\\
                          \mathbf{if}\;t \leq -2.9 \cdot 10^{-121}:\\
                          \;\;\;\;t\_1\\
                          
                          \mathbf{elif}\;t \leq 4 \cdot 10^{-67}:\\
                          \;\;\;\;\frac{z \cdot 2}{t \cdot z}\\
                          
                          \mathbf{elif}\;t \leq 1.02 \cdot 10^{+23}:\\
                          \;\;\;\;\frac{2}{t \cdot z}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;t\_1\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if t < -2.9e-121 or 1.02e23 < t

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

                              \[\leadsto \frac{x}{y} + \color{blue}{-2} \]
                            4. Step-by-step derivation
                              1. Applied rewrites80.0%

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

                              if -2.9e-121 < t < 3.99999999999999977e-67

                              1. Initial program 97.8%

                                \[\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. lower-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{2 + 2 \cdot \frac{1}{z}}{t}} \]
                                2. +-commutativeN/A

                                  \[\leadsto \frac{\color{blue}{2 \cdot \frac{1}{z} + 2}}{t} \]
                                3. metadata-evalN/A

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

                                  \[\leadsto \frac{\color{blue}{2 \cdot \frac{1}{z} - -2}}{t} \]
                                5. lower--.f64N/A

                                  \[\leadsto \frac{\color{blue}{2 \cdot \frac{1}{z} - -2}}{t} \]
                                6. associate-*r/N/A

                                  \[\leadsto \frac{\color{blue}{\frac{2 \cdot 1}{z}} - -2}{t} \]
                                7. metadata-evalN/A

                                  \[\leadsto \frac{\frac{\color{blue}{2}}{z} - -2}{t} \]
                                8. lower-/.f6483.9

                                  \[\leadsto \frac{\color{blue}{\frac{2}{z}} - -2}{t} \]
                              5. Applied rewrites83.9%

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

                                \[\leadsto \frac{2 \cdot \frac{z}{t} + 2 \cdot \frac{1}{t}}{\color{blue}{z}} \]
                              7. Applied rewrites83.7%

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

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

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

                                if 3.99999999999999977e-67 < t < 1.02e23

                                1. Initial program 99.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 z around 0

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

                                    \[\leadsto \color{blue}{\frac{2}{t \cdot z}} \]
                                  2. lower-*.f6458.1

                                    \[\leadsto \frac{2}{\color{blue}{t \cdot z}} \]
                                5. Applied rewrites58.1%

                                  \[\leadsto \color{blue}{\frac{2}{t \cdot z}} \]
                              10. Recombined 3 regimes into one program.
                              11. Final simplification71.0%

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

                              Alternative 14: 19.5% accurate, 3.9× speedup?

                              \[\begin{array}{l} \\ \frac{2}{t} \end{array} \]
                              (FPCore (x y z t) :precision binary64 (/ 2.0 t))
                              double code(double x, double y, double z, double t) {
                              	return 2.0 / t;
                              }
                              
                              real(8) function code(x, y, z, t)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  real(8), intent (in) :: z
                                  real(8), intent (in) :: t
                                  code = 2.0d0 / t
                              end function
                              
                              public static double code(double x, double y, double z, double t) {
                              	return 2.0 / t;
                              }
                              
                              def code(x, y, z, t):
                              	return 2.0 / t
                              
                              function code(x, y, z, t)
                              	return Float64(2.0 / t)
                              end
                              
                              function tmp = code(x, y, z, t)
                              	tmp = 2.0 / t;
                              end
                              
                              code[x_, y_, z_, t_] := N[(2.0 / t), $MachinePrecision]
                              
                              \begin{array}{l}
                              
                              \\
                              \frac{2}{t}
                              \end{array}
                              
                              Derivation
                              1. Initial program 83.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 0

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

                                  \[\leadsto \color{blue}{\frac{2 + 2 \cdot \frac{1}{z}}{t}} \]
                                2. +-commutativeN/A

                                  \[\leadsto \frac{\color{blue}{2 \cdot \frac{1}{z} + 2}}{t} \]
                                3. metadata-evalN/A

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

                                  \[\leadsto \frac{\color{blue}{2 \cdot \frac{1}{z} - -2}}{t} \]
                                5. lower--.f64N/A

                                  \[\leadsto \frac{\color{blue}{2 \cdot \frac{1}{z} - -2}}{t} \]
                                6. associate-*r/N/A

                                  \[\leadsto \frac{\color{blue}{\frac{2 \cdot 1}{z}} - -2}{t} \]
                                7. metadata-evalN/A

                                  \[\leadsto \frac{\frac{\color{blue}{2}}{z} - -2}{t} \]
                                8. lower-/.f6448.3

                                  \[\leadsto \frac{\color{blue}{\frac{2}{z}} - -2}{t} \]
                              5. Applied rewrites48.3%

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

                                \[\leadsto \frac{2}{\color{blue}{t}} \]
                              7. Step-by-step derivation
                                1. Applied rewrites22.4%

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

                                Developer Target 1: 99.2% accurate, 1.1× 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 2024332 
                                (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))))