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

Percentage Accurate: 86.9% → 99.5%
Time: 6.3s
Alternatives: 18
Speedup: 1.0×

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));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t)
use fmin_fmax_functions
    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 18 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.9% 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));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t)
use fmin_fmax_functions
    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.5% accurate, 0.5× speedup?

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

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

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


\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. Taylor expanded in t around 0

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

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

        \[\leadsto \frac{x}{y} + \frac{\left(\left(-2 \cdot t\right) \cdot z + 2 \cdot z\right) + 2}{t \cdot z} \]
      3. distribute-rgt-outN/A

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

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

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

      \[\leadsto \frac{x}{y} + \frac{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(-2, t, 2\right), 2\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 z around inf

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

        \[\leadsto \frac{1 - t}{t} \cdot 2 + \frac{\color{blue}{x}}{y} \]
      2. lower-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right) \]
      4. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right) \]
      5. lift-/.f6496.8

        \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right) \]
    5. Applied rewrites96.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 81.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+176} \lor \neg \left(t\_1 \leq -1 \lor \neg \left(t\_1 \leq \infty\right)\right):\\ \;\;\;\;\frac{\frac{2}{z} - -2}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y} + -2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))
   (if (or (<= t_1 -5e+176) (not (or (<= t_1 -1.0) (not (<= t_1 INFINITY)))))
     (/ (- (/ 2.0 z) -2.0) t)
     (+ (/ x y) -2.0))))
double code(double x, double y, double z, double t) {
	double t_1 = (2.0 + ((z * 2.0) * (1.0 - t))) / (t * z);
	double tmp;
	if ((t_1 <= -5e+176) || !((t_1 <= -1.0) || !(t_1 <= ((double) INFINITY)))) {
		tmp = ((2.0 / z) - -2.0) / t;
	} else {
		tmp = (x / y) + -2.0;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = (2.0 + ((z * 2.0) * (1.0 - t))) / (t * z);
	double tmp;
	if ((t_1 <= -5e+176) || !((t_1 <= -1.0) || !(t_1 <= Double.POSITIVE_INFINITY))) {
		tmp = ((2.0 / z) - -2.0) / t;
	} else {
		tmp = (x / y) + -2.0;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (2.0 + ((z * 2.0) * (1.0 - t))) / (t * z)
	tmp = 0
	if (t_1 <= -5e+176) or not ((t_1 <= -1.0) or not (t_1 <= math.inf)):
		tmp = ((2.0 / z) - -2.0) / t
	else:
		tmp = (x / y) + -2.0
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(2.0 + Float64(Float64(z * 2.0) * Float64(1.0 - t))) / Float64(t * z))
	tmp = 0.0
	if ((t_1 <= -5e+176) || !((t_1 <= -1.0) || !(t_1 <= Inf)))
		tmp = Float64(Float64(Float64(2.0 / z) - -2.0) / t);
	else
		tmp = Float64(Float64(x / y) + -2.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (2.0 + ((z * 2.0) * (1.0 - t))) / (t * z);
	tmp = 0.0;
	if ((t_1 <= -5e+176) || ~(((t_1 <= -1.0) || ~((t_1 <= Inf)))))
		tmp = ((2.0 / z) - -2.0) / t;
	else
		tmp = (x / y) + -2.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(2.0 + N[(N[(z * 2.0), $MachinePrecision] * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+176], N[Not[Or[LessEqual[t$95$1, -1.0], N[Not[LessEqual[t$95$1, Infinity]], $MachinePrecision]]], $MachinePrecision]], N[(N[(N[(2.0 / z), $MachinePrecision] - -2.0), $MachinePrecision] / t), $MachinePrecision], N[(N[(x / y), $MachinePrecision] + -2.0), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+176} \lor \neg \left(t\_1 \leq -1 \lor \neg \left(t\_1 \leq \infty\right)\right):\\
\;\;\;\;\frac{\frac{2}{z} - -2}{t}\\

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


\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)) < -5e176 or -1 < (/.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.0%

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

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

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

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

        \[\leadsto \frac{2 \cdot \frac{1}{z} + 2 \cdot 1}{t} \]
      4. fp-cancel-sign-sub-invN/A

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

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

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

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

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

        \[\leadsto \frac{\frac{2}{z} - -2}{t} \]
      10. lower-/.f6478.6

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

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

    if -5e176 < (/.f64 (+.f64 #s(literal 2 binary64) (*.f64 (*.f64 z #s(literal 2 binary64)) (-.f64 #s(literal 1 binary64) t))) (*.f64 t z)) < -1 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 78.9%

      \[\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 rewrites86.6%

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

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

    Alternative 3: 81.0% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+176} \lor \neg \left(t\_1 \leq -1 \lor \neg \left(t\_1 \leq \infty\right)\right):\\ \;\;\;\;\frac{\mathsf{fma}\left(z, 2, 2\right)}{t \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y} + -2\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (let* ((t_1 (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))
       (if (or (<= t_1 -5e+176) (not (or (<= t_1 -1.0) (not (<= t_1 INFINITY)))))
         (/ (fma z 2.0 2.0) (* t z))
         (+ (/ x y) -2.0))))
    double code(double x, double y, double z, double t) {
    	double t_1 = (2.0 + ((z * 2.0) * (1.0 - t))) / (t * z);
    	double tmp;
    	if ((t_1 <= -5e+176) || !((t_1 <= -1.0) || !(t_1 <= ((double) INFINITY)))) {
    		tmp = fma(z, 2.0, 2.0) / (t * z);
    	} else {
    		tmp = (x / y) + -2.0;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t)
    	t_1 = Float64(Float64(2.0 + Float64(Float64(z * 2.0) * Float64(1.0 - t))) / Float64(t * z))
    	tmp = 0.0
    	if ((t_1 <= -5e+176) || !((t_1 <= -1.0) || !(t_1 <= Inf)))
    		tmp = Float64(fma(z, 2.0, 2.0) / Float64(t * z));
    	else
    		tmp = Float64(Float64(x / y) + -2.0);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(2.0 + N[(N[(z * 2.0), $MachinePrecision] * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+176], N[Not[Or[LessEqual[t$95$1, -1.0], N[Not[LessEqual[t$95$1, Infinity]], $MachinePrecision]]], $MachinePrecision]], N[(N[(z * 2.0 + 2.0), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] + -2.0), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}\\
    \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+176} \lor \neg \left(t\_1 \leq -1 \lor \neg \left(t\_1 \leq \infty\right)\right):\\
    \;\;\;\;\frac{\mathsf{fma}\left(z, 2, 2\right)}{t \cdot z}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{x}{y} + -2\\
    
    
    \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)) < -5e176 or -1 < (/.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.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{z \cdot 2 + 2}{t \cdot z} \]
        7. lower-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(z, 2, 2\right)}{\color{blue}{t} \cdot z} \]
        8. lift-*.f6478.5

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

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

      if -5e176 < (/.f64 (+.f64 #s(literal 2 binary64) (*.f64 (*.f64 z #s(literal 2 binary64)) (-.f64 #s(literal 1 binary64) t))) (*.f64 t z)) < -1 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 78.9%

        \[\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 rewrites86.6%

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

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

      Alternative 4: 67.2% accurate, 0.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+286}:\\ \;\;\;\;\frac{2}{t \cdot z}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+57} \lor \neg \left(t\_1 \leq \infty\right):\\ \;\;\;\;\frac{x}{y} + -2\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{2}{z}}{t}\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (let* ((t_1 (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))
         (if (<= t_1 -5e+286)
           (/ 2.0 (* t z))
           (if (or (<= t_1 2e+57) (not (<= t_1 INFINITY)))
             (+ (/ x y) -2.0)
             (/ (/ 2.0 z) t)))))
      double code(double x, double y, double z, double t) {
      	double t_1 = (2.0 + ((z * 2.0) * (1.0 - t))) / (t * z);
      	double tmp;
      	if (t_1 <= -5e+286) {
      		tmp = 2.0 / (t * z);
      	} else if ((t_1 <= 2e+57) || !(t_1 <= ((double) INFINITY))) {
      		tmp = (x / y) + -2.0;
      	} else {
      		tmp = (2.0 / z) / t;
      	}
      	return tmp;
      }
      
      public static double code(double x, double y, double z, double t) {
      	double t_1 = (2.0 + ((z * 2.0) * (1.0 - t))) / (t * z);
      	double tmp;
      	if (t_1 <= -5e+286) {
      		tmp = 2.0 / (t * z);
      	} else if ((t_1 <= 2e+57) || !(t_1 <= Double.POSITIVE_INFINITY)) {
      		tmp = (x / y) + -2.0;
      	} else {
      		tmp = (2.0 / z) / t;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t):
      	t_1 = (2.0 + ((z * 2.0) * (1.0 - t))) / (t * z)
      	tmp = 0
      	if t_1 <= -5e+286:
      		tmp = 2.0 / (t * z)
      	elif (t_1 <= 2e+57) or not (t_1 <= math.inf):
      		tmp = (x / y) + -2.0
      	else:
      		tmp = (2.0 / z) / t
      	return tmp
      
      function code(x, y, z, t)
      	t_1 = Float64(Float64(2.0 + Float64(Float64(z * 2.0) * Float64(1.0 - t))) / Float64(t * z))
      	tmp = 0.0
      	if (t_1 <= -5e+286)
      		tmp = Float64(2.0 / Float64(t * z));
      	elseif ((t_1 <= 2e+57) || !(t_1 <= Inf))
      		tmp = Float64(Float64(x / y) + -2.0);
      	else
      		tmp = Float64(Float64(2.0 / z) / t);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t)
      	t_1 = (2.0 + ((z * 2.0) * (1.0 - t))) / (t * z);
      	tmp = 0.0;
      	if (t_1 <= -5e+286)
      		tmp = 2.0 / (t * z);
      	elseif ((t_1 <= 2e+57) || ~((t_1 <= Inf)))
      		tmp = (x / y) + -2.0;
      	else
      		tmp = (2.0 / z) / t;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(2.0 + N[(N[(z * 2.0), $MachinePrecision] * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+286], N[(2.0 / N[(t * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, 2e+57], N[Not[LessEqual[t$95$1, Infinity]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + -2.0), $MachinePrecision], N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}\\
      \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+286}:\\
      \;\;\;\;\frac{2}{t \cdot z}\\
      
      \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+57} \lor \neg \left(t\_1 \leq \infty\right):\\
      \;\;\;\;\frac{x}{y} + -2\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\frac{2}{z}}{t}\\
      
      
      \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)) < -5.0000000000000004e286

        1. Initial program 99.9%

          \[\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 \frac{2}{\color{blue}{t \cdot z}} \]
          2. lift-*.f6481.8

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

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

        if -5.0000000000000004e286 < (/.f64 (+.f64 #s(literal 2 binary64) (*.f64 (*.f64 z #s(literal 2 binary64)) (-.f64 #s(literal 1 binary64) t))) (*.f64 t z)) < 2.0000000000000001e57 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 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 t around inf

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

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

          if 2.0000000000000001e57 < (/.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 96.9%

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

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

              \[\leadsto \frac{2 \cdot \frac{1}{z} + 2 \cdot 1}{t} \]
            4. fp-cancel-sign-sub-invN/A

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

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

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

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

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

              \[\leadsto \frac{\frac{2}{z} - -2}{t} \]
            10. lower-/.f6480.8

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

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

            \[\leadsto \frac{\frac{2}{z}}{t} \]
          7. Step-by-step derivation
            1. lift-/.f6455.9

              \[\leadsto \frac{\frac{2}{z}}{t} \]
          8. Applied rewrites55.9%

            \[\leadsto \frac{\frac{2}{z}}{t} \]
        5. Recombined 3 regimes into one program.
        6. Final simplification71.7%

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

        Alternative 5: 67.2% accurate, 0.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+286} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+57} \lor \neg \left(t\_1 \leq \infty\right)\right):\\ \;\;\;\;\frac{2}{t \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y} + -2\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (let* ((t_1 (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))
           (if (or (<= t_1 -5e+286) (not (or (<= t_1 2e+57) (not (<= t_1 INFINITY)))))
             (/ 2.0 (* t z))
             (+ (/ x y) -2.0))))
        double code(double x, double y, double z, double t) {
        	double t_1 = (2.0 + ((z * 2.0) * (1.0 - t))) / (t * z);
        	double tmp;
        	if ((t_1 <= -5e+286) || !((t_1 <= 2e+57) || !(t_1 <= ((double) INFINITY)))) {
        		tmp = 2.0 / (t * z);
        	} else {
        		tmp = (x / y) + -2.0;
        	}
        	return tmp;
        }
        
        public static double code(double x, double y, double z, double t) {
        	double t_1 = (2.0 + ((z * 2.0) * (1.0 - t))) / (t * z);
        	double tmp;
        	if ((t_1 <= -5e+286) || !((t_1 <= 2e+57) || !(t_1 <= Double.POSITIVE_INFINITY))) {
        		tmp = 2.0 / (t * z);
        	} else {
        		tmp = (x / y) + -2.0;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	t_1 = (2.0 + ((z * 2.0) * (1.0 - t))) / (t * z)
        	tmp = 0
        	if (t_1 <= -5e+286) or not ((t_1 <= 2e+57) or not (t_1 <= math.inf)):
        		tmp = 2.0 / (t * z)
        	else:
        		tmp = (x / y) + -2.0
        	return tmp
        
        function code(x, y, z, t)
        	t_1 = Float64(Float64(2.0 + Float64(Float64(z * 2.0) * Float64(1.0 - t))) / Float64(t * z))
        	tmp = 0.0
        	if ((t_1 <= -5e+286) || !((t_1 <= 2e+57) || !(t_1 <= Inf)))
        		tmp = Float64(2.0 / Float64(t * z));
        	else
        		tmp = Float64(Float64(x / y) + -2.0);
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t)
        	t_1 = (2.0 + ((z * 2.0) * (1.0 - t))) / (t * z);
        	tmp = 0.0;
        	if ((t_1 <= -5e+286) || ~(((t_1 <= 2e+57) || ~((t_1 <= Inf)))))
        		tmp = 2.0 / (t * z);
        	else
        		tmp = (x / y) + -2.0;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(2.0 + N[(N[(z * 2.0), $MachinePrecision] * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+286], N[Not[Or[LessEqual[t$95$1, 2e+57], N[Not[LessEqual[t$95$1, Infinity]], $MachinePrecision]]], $MachinePrecision]], N[(2.0 / N[(t * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] + -2.0), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}\\
        \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+286} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+57} \lor \neg \left(t\_1 \leq \infty\right)\right):\\
        \;\;\;\;\frac{2}{t \cdot z}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{x}{y} + -2\\
        
        
        \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)) < -5.0000000000000004e286 or 2.0000000000000001e57 < (/.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.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 z around 0

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

              \[\leadsto \frac{2}{\color{blue}{t \cdot z}} \]
            2. lift-*.f6460.6

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

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

          if -5.0000000000000004e286 < (/.f64 (+.f64 #s(literal 2 binary64) (*.f64 (*.f64 z #s(literal 2 binary64)) (-.f64 #s(literal 1 binary64) t))) (*.f64 t z)) < 2.0000000000000001e57 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 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 t around inf

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

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

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

          Alternative 6: 92.7% accurate, 0.7× speedup?

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

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

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

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

              if -1e7 < (/.f64 x y) < 4.99999999999999977e-7

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

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, 2 \cdot \frac{1}{t \cdot z}\right) \]
                4. lift--.f64N/A

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

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
                8. lift-*.f6498.5

                  \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
              5. Applied rewrites98.5%

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

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

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

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

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

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

                  \[\leadsto \frac{\left(-2 \cdot t + \frac{2}{z}\right) + 2}{t} \]
                6. lower-fma.f64N/A

                  \[\leadsto \frac{\mathsf{fma}\left(-2, t, \frac{2}{z}\right) + 2}{t} \]
                7. lift-/.f6498.6

                  \[\leadsto \frac{\mathsf{fma}\left(-2, t, \frac{2}{z}\right) + 2}{t} \]
              8. Applied rewrites98.6%

                \[\leadsto \frac{\mathsf{fma}\left(-2, t, \frac{2}{z}\right) + 2}{\color{blue}{t}} \]
            5. Recombined 2 regimes into one program.
            6. Final simplification93.1%

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

            Alternative 7: 91.1% accurate, 0.7× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{x}{y} \leq -10000000:\\ \;\;\;\;\frac{x}{y} + \frac{\frac{\mathsf{fma}\left(z, 2, 2\right)}{t}}{z}\\ \mathbf{elif}\;\frac{x}{y} \leq 0.5:\\ \;\;\;\;\frac{\mathsf{fma}\left(-2, t, \frac{2}{z}\right) + 2}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right)\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (if (<= (/ x y) -10000000.0)
               (+ (/ x y) (/ (/ (fma z 2.0 2.0) t) z))
               (if (<= (/ x y) 0.5)
                 (/ (+ (fma -2.0 t (/ 2.0 z)) 2.0) t)
                 (fma (/ (- 1.0 t) t) 2.0 (/ x y)))))
            double code(double x, double y, double z, double t) {
            	double tmp;
            	if ((x / y) <= -10000000.0) {
            		tmp = (x / y) + ((fma(z, 2.0, 2.0) / t) / z);
            	} else if ((x / y) <= 0.5) {
            		tmp = (fma(-2.0, t, (2.0 / z)) + 2.0) / t;
            	} else {
            		tmp = fma(((1.0 - t) / t), 2.0, (x / y));
            	}
            	return tmp;
            }
            
            function code(x, y, z, t)
            	tmp = 0.0
            	if (Float64(x / y) <= -10000000.0)
            		tmp = Float64(Float64(x / y) + Float64(Float64(fma(z, 2.0, 2.0) / t) / z));
            	elseif (Float64(x / y) <= 0.5)
            		tmp = Float64(Float64(fma(-2.0, t, Float64(2.0 / z)) + 2.0) / t);
            	else
            		tmp = fma(Float64(Float64(1.0 - t) / t), 2.0, Float64(x / y));
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_] := If[LessEqual[N[(x / y), $MachinePrecision], -10000000.0], N[(N[(x / y), $MachinePrecision] + N[(N[(N[(z * 2.0 + 2.0), $MachinePrecision] / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 0.5], N[(N[(N[(-2.0 * t + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision] / t), $MachinePrecision], N[(N[(N[(1.0 - t), $MachinePrecision] / t), $MachinePrecision] * 2.0 + N[(x / y), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;\frac{x}{y} \leq -10000000:\\
            \;\;\;\;\frac{x}{y} + \frac{\frac{\mathsf{fma}\left(z, 2, 2\right)}{t}}{z}\\
            
            \mathbf{elif}\;\frac{x}{y} \leq 0.5:\\
            \;\;\;\;\frac{\mathsf{fma}\left(-2, t, \frac{2}{z}\right) + 2}{t}\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if (/.f64 x y) < -1e7

              1. Initial program 79.9%

                \[\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} + \color{blue}{\frac{2 + 2 \cdot z}{t \cdot z}} \]
              4. Step-by-step derivation
                1. associate-/r*N/A

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

                  \[\leadsto \frac{x}{y} + \frac{\frac{2}{t} + \frac{2 \cdot z}{t}}{z} \]
                3. metadata-evalN/A

                  \[\leadsto \frac{x}{y} + \frac{\frac{2 \cdot 1}{t} + \frac{2 \cdot z}{t}}{z} \]
                4. associate-*r/N/A

                  \[\leadsto \frac{x}{y} + \frac{2 \cdot \frac{1}{t} + \frac{2 \cdot z}{t}}{z} \]
                5. associate-*r/N/A

                  \[\leadsto \frac{x}{y} + \frac{2 \cdot \frac{1}{t} + 2 \cdot \frac{z}{t}}{z} \]
                6. +-commutativeN/A

                  \[\leadsto \frac{x}{y} + \frac{2 \cdot \frac{z}{t} + 2 \cdot \frac{1}{t}}{z} \]
                7. lower-/.f64N/A

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

                  \[\leadsto \frac{x}{y} + \frac{2 \cdot \frac{1}{t} + 2 \cdot \frac{z}{t}}{z} \]
                9. associate-*r/N/A

                  \[\leadsto \frac{x}{y} + \frac{\frac{2 \cdot 1}{t} + 2 \cdot \frac{z}{t}}{z} \]
                10. metadata-evalN/A

                  \[\leadsto \frac{x}{y} + \frac{\frac{2}{t} + 2 \cdot \frac{z}{t}}{z} \]
                11. associate-*r/N/A

                  \[\leadsto \frac{x}{y} + \frac{\frac{2}{t} + \frac{2 \cdot z}{t}}{z} \]
                12. div-addN/A

                  \[\leadsto \frac{x}{y} + \frac{\frac{2 + 2 \cdot z}{t}}{z} \]
                13. lower-/.f64N/A

                  \[\leadsto \frac{x}{y} + \frac{\frac{2 + 2 \cdot z}{t}}{z} \]
                14. +-commutativeN/A

                  \[\leadsto \frac{x}{y} + \frac{\frac{2 \cdot z + 2}{t}}{z} \]
                15. *-commutativeN/A

                  \[\leadsto \frac{x}{y} + \frac{\frac{z \cdot 2 + 2}{t}}{z} \]
                16. lower-fma.f6489.9

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

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

              if -1e7 < (/.f64 x y) < 0.5

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

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, 2 \cdot \frac{1}{t \cdot z}\right) \]
                4. lift--.f64N/A

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

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
                8. lift-*.f6498.5

                  \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
              5. Applied rewrites98.5%

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

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

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

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

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

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

                  \[\leadsto \frac{\left(-2 \cdot t + \frac{2}{z}\right) + 2}{t} \]
                6. lower-fma.f64N/A

                  \[\leadsto \frac{\mathsf{fma}\left(-2, t, \frac{2}{z}\right) + 2}{t} \]
                7. lift-/.f6498.6

                  \[\leadsto \frac{\mathsf{fma}\left(-2, t, \frac{2}{z}\right) + 2}{t} \]
              8. Applied rewrites98.6%

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

              if 0.5 < (/.f64 x y)

              1. Initial program 92.9%

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

                  \[\leadsto \frac{1 - t}{t} \cdot 2 + \frac{\color{blue}{x}}{y} \]
                2. lower-fma.f64N/A

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

                  \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right) \]
                4. lift--.f64N/A

                  \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right) \]
                5. lift-/.f6490.1

                  \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right) \]
              5. Applied rewrites90.1%

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

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

            Alternative 8: 91.3% accurate, 0.7× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{x}{y} \leq -10000000:\\ \;\;\;\;\frac{\frac{2}{t}}{z} + \frac{x}{y}\\ \mathbf{elif}\;\frac{x}{y} \leq 0.5:\\ \;\;\;\;\frac{\mathsf{fma}\left(-2, t, \frac{2}{z}\right) + 2}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right)\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (if (<= (/ x y) -10000000.0)
               (+ (/ (/ 2.0 t) z) (/ x y))
               (if (<= (/ x y) 0.5)
                 (/ (+ (fma -2.0 t (/ 2.0 z)) 2.0) t)
                 (fma (/ (- 1.0 t) t) 2.0 (/ x y)))))
            double code(double x, double y, double z, double t) {
            	double tmp;
            	if ((x / y) <= -10000000.0) {
            		tmp = ((2.0 / t) / z) + (x / y);
            	} else if ((x / y) <= 0.5) {
            		tmp = (fma(-2.0, t, (2.0 / z)) + 2.0) / t;
            	} else {
            		tmp = fma(((1.0 - t) / t), 2.0, (x / y));
            	}
            	return tmp;
            }
            
            function code(x, y, z, t)
            	tmp = 0.0
            	if (Float64(x / y) <= -10000000.0)
            		tmp = Float64(Float64(Float64(2.0 / t) / z) + Float64(x / y));
            	elseif (Float64(x / y) <= 0.5)
            		tmp = Float64(Float64(fma(-2.0, t, Float64(2.0 / z)) + 2.0) / t);
            	else
            		tmp = fma(Float64(Float64(1.0 - t) / t), 2.0, Float64(x / y));
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_] := If[LessEqual[N[(x / y), $MachinePrecision], -10000000.0], N[(N[(N[(2.0 / t), $MachinePrecision] / z), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 0.5], N[(N[(N[(-2.0 * t + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision] / t), $MachinePrecision], N[(N[(N[(1.0 - t), $MachinePrecision] / t), $MachinePrecision] * 2.0 + N[(x / y), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;\frac{x}{y} \leq -10000000:\\
            \;\;\;\;\frac{\frac{2}{t}}{z} + \frac{x}{y}\\
            
            \mathbf{elif}\;\frac{x}{y} \leq 0.5:\\
            \;\;\;\;\frac{\mathsf{fma}\left(-2, t, \frac{2}{z}\right) + 2}{t}\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if (/.f64 x y) < -1e7

              1. Initial program 79.9%

                \[\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 rewrites88.1%

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

                    \[\leadsto \color{blue}{\frac{x}{y} + \frac{2}{t \cdot z}} \]
                  2. lift-/.f64N/A

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

                    \[\leadsto \color{blue}{\frac{2}{t \cdot z} + \frac{x}{y}} \]
                  4. lower-+.f64N/A

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

                    \[\leadsto \frac{2}{\color{blue}{t \cdot z}} + \frac{x}{y} \]
                  6. lift-/.f64N/A

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

                    \[\leadsto \color{blue}{\frac{\frac{2}{t}}{z}} + \frac{x}{y} \]
                  8. lower-/.f64N/A

                    \[\leadsto \color{blue}{\frac{\frac{2}{t}}{z}} + \frac{x}{y} \]
                  9. lower-/.f64N/A

                    \[\leadsto \frac{\color{blue}{\frac{2}{t}}}{z} + \frac{x}{y} \]
                  10. lift-/.f6488.2

                    \[\leadsto \frac{\frac{2}{t}}{z} + \color{blue}{\frac{x}{y}} \]
                3. Applied rewrites88.2%

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

                if -1e7 < (/.f64 x y) < 0.5

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

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

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

                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, 2 \cdot \frac{1}{t \cdot z}\right) \]
                  4. lift--.f64N/A

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

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

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

                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
                  8. lift-*.f6498.5

                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
                5. Applied rewrites98.5%

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

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

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

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

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

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

                    \[\leadsto \frac{\left(-2 \cdot t + \frac{2}{z}\right) + 2}{t} \]
                  6. lower-fma.f64N/A

                    \[\leadsto \frac{\mathsf{fma}\left(-2, t, \frac{2}{z}\right) + 2}{t} \]
                  7. lift-/.f6498.6

                    \[\leadsto \frac{\mathsf{fma}\left(-2, t, \frac{2}{z}\right) + 2}{t} \]
                8. Applied rewrites98.6%

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

                if 0.5 < (/.f64 x y)

                1. Initial program 92.9%

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

                    \[\leadsto \frac{1 - t}{t} \cdot 2 + \frac{\color{blue}{x}}{y} \]
                  2. lower-fma.f64N/A

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

                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right) \]
                  4. lift--.f64N/A

                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right) \]
                  5. lift-/.f6490.1

                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right) \]
                5. Applied rewrites90.1%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right)} \]
              5. Recombined 3 regimes into one program.
              6. Final simplification93.9%

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

              Alternative 9: 91.3% accurate, 0.7× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{x}{y} \leq -10000000:\\ \;\;\;\;\frac{x}{y} + \frac{\frac{2}{z}}{t}\\ \mathbf{elif}\;\frac{x}{y} \leq 0.5:\\ \;\;\;\;\frac{\mathsf{fma}\left(-2, t, \frac{2}{z}\right) + 2}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right)\\ \end{array} \end{array} \]
              (FPCore (x y z t)
               :precision binary64
               (if (<= (/ x y) -10000000.0)
                 (+ (/ x y) (/ (/ 2.0 z) t))
                 (if (<= (/ x y) 0.5)
                   (/ (+ (fma -2.0 t (/ 2.0 z)) 2.0) t)
                   (fma (/ (- 1.0 t) t) 2.0 (/ x y)))))
              double code(double x, double y, double z, double t) {
              	double tmp;
              	if ((x / y) <= -10000000.0) {
              		tmp = (x / y) + ((2.0 / z) / t);
              	} else if ((x / y) <= 0.5) {
              		tmp = (fma(-2.0, t, (2.0 / z)) + 2.0) / t;
              	} else {
              		tmp = fma(((1.0 - t) / t), 2.0, (x / y));
              	}
              	return tmp;
              }
              
              function code(x, y, z, t)
              	tmp = 0.0
              	if (Float64(x / y) <= -10000000.0)
              		tmp = Float64(Float64(x / y) + Float64(Float64(2.0 / z) / t));
              	elseif (Float64(x / y) <= 0.5)
              		tmp = Float64(Float64(fma(-2.0, t, Float64(2.0 / z)) + 2.0) / t);
              	else
              		tmp = fma(Float64(Float64(1.0 - t) / t), 2.0, Float64(x / y));
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_] := If[LessEqual[N[(x / y), $MachinePrecision], -10000000.0], N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 0.5], N[(N[(N[(-2.0 * t + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision] / t), $MachinePrecision], N[(N[(N[(1.0 - t), $MachinePrecision] / t), $MachinePrecision] * 2.0 + N[(x / y), $MachinePrecision]), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;\frac{x}{y} \leq -10000000:\\
              \;\;\;\;\frac{x}{y} + \frac{\frac{2}{z}}{t}\\
              
              \mathbf{elif}\;\frac{x}{y} \leq 0.5:\\
              \;\;\;\;\frac{\mathsf{fma}\left(-2, t, \frac{2}{z}\right) + 2}{t}\\
              
              \mathbf{else}:\\
              \;\;\;\;\mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if (/.f64 x y) < -1e7

                1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{x}{y} + \frac{\mathsf{fma}\left(-2, t, \frac{2}{z} - -2\right)}{t} \]
                  14. lower-/.f6497.1

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

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

                  \[\leadsto \frac{x}{y} + \frac{\frac{2}{z}}{t} \]
                7. Step-by-step derivation
                  1. lift-/.f6488.2

                    \[\leadsto \frac{x}{y} + \frac{\frac{2}{z}}{t} \]
                8. Applied rewrites88.2%

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

                if -1e7 < (/.f64 x y) < 0.5

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

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

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

                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, 2 \cdot \frac{1}{t \cdot z}\right) \]
                  4. lift--.f64N/A

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

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

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

                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
                  8. lift-*.f6498.5

                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
                5. Applied rewrites98.5%

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

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

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

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

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

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

                    \[\leadsto \frac{\left(-2 \cdot t + \frac{2}{z}\right) + 2}{t} \]
                  6. lower-fma.f64N/A

                    \[\leadsto \frac{\mathsf{fma}\left(-2, t, \frac{2}{z}\right) + 2}{t} \]
                  7. lift-/.f6498.6

                    \[\leadsto \frac{\mathsf{fma}\left(-2, t, \frac{2}{z}\right) + 2}{t} \]
                8. Applied rewrites98.6%

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

                if 0.5 < (/.f64 x y)

                1. Initial program 92.9%

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

                    \[\leadsto \frac{1 - t}{t} \cdot 2 + \frac{\color{blue}{x}}{y} \]
                  2. lower-fma.f64N/A

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

                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right) \]
                  4. lift--.f64N/A

                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right) \]
                  5. lift-/.f6490.1

                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right) \]
                5. Applied rewrites90.1%

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

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

              Alternative 10: 91.3% accurate, 0.7× speedup?

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

                1. Initial program 79.9%

                  \[\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 rewrites88.1%

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

                  if -1e7 < (/.f64 x y) < 0.5

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, 2 \cdot \frac{1}{t \cdot z}\right) \]
                    4. lift--.f64N/A

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
                    8. lift-*.f6498.5

                      \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
                  5. Applied rewrites98.5%

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

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

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

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

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

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

                      \[\leadsto \frac{\left(-2 \cdot t + \frac{2}{z}\right) + 2}{t} \]
                    6. lower-fma.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(-2, t, \frac{2}{z}\right) + 2}{t} \]
                    7. lift-/.f6498.6

                      \[\leadsto \frac{\mathsf{fma}\left(-2, t, \frac{2}{z}\right) + 2}{t} \]
                  8. Applied rewrites98.6%

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

                  if 0.5 < (/.f64 x y)

                  1. Initial program 92.9%

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

                      \[\leadsto \frac{1 - t}{t} \cdot 2 + \frac{\color{blue}{x}}{y} \]
                    2. lower-fma.f64N/A

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

                      \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right) \]
                    4. lift--.f64N/A

                      \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right) \]
                    5. lift-/.f6490.1

                      \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right) \]
                  5. Applied rewrites90.1%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{x}{y}\right)} \]
                5. Recombined 3 regimes into one program.
                6. Final simplification93.8%

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

                Alternative 11: 87.0% accurate, 0.7× speedup?

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

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

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

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

                    if -1e7 < (/.f64 x y) < 4.99999999999999977e-7

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

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, 2 \cdot \frac{1}{t \cdot z}\right) \]
                      4. lift--.f64N/A

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

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
                      8. lift-*.f6498.5

                        \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
                    5. Applied rewrites98.5%

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

                      \[\leadsto -2 \]
                    7. Step-by-step derivation
                      1. Applied rewrites39.7%

                        \[\leadsto -2 \]
                      2. Taylor expanded in z around 0

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

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

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

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

                          \[\leadsto \frac{\frac{2}{t} + \frac{2 \cdot \left(z \cdot \left(1 - t\right)\right)}{t}}{z} \]
                        5. div-add-revN/A

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

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

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

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

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

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

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

                    Alternative 12: 79.2% accurate, 0.7× speedup?

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

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

                        \[\leadsto \color{blue}{\frac{x}{y}} \]
                      4. Step-by-step derivation
                        1. lift-/.f6486.1

                          \[\leadsto \frac{x}{\color{blue}{y}} \]
                      5. Applied rewrites86.1%

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

                      if -5.60000000000000026e119 < (/.f64 x y) < 3.1e12

                      1. Initial program 89.7%

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

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

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

                          \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, 2 \cdot \frac{1}{t \cdot z}\right) \]
                        4. lift--.f64N/A

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

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

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

                          \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
                        8. lift-*.f6493.6

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

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

                        \[\leadsto -2 \]
                      7. Step-by-step derivation
                        1. Applied rewrites34.5%

                          \[\leadsto -2 \]
                        2. Taylor expanded in z around 0

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

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

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

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

                            \[\leadsto \frac{\frac{2}{t} + \frac{2 \cdot \left(z \cdot \left(1 - t\right)\right)}{t}}{z} \]
                          5. div-add-revN/A

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

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

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

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

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

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

                        if 3.1e12 < (/.f64 x y)

                        1. Initial program 92.9%

                          \[\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 rewrites77.0%

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

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

                        Alternative 13: 71.5% accurate, 0.8× speedup?

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

                          1. Initial program 85.9%

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

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

                            if -5.5000000000000003e-8 < (/.f64 x y) < 700

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

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

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

                                \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, 2 \cdot \frac{1}{t \cdot z}\right) \]
                              4. lift--.f64N/A

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

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

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

                                \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
                              8. lift-*.f6499.2

                                \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
                            5. Applied rewrites99.2%

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

                              \[\leadsto \mathsf{fma}\left(-1, 2, \frac{2}{t \cdot z}\right) \]
                            7. Step-by-step derivation
                              1. Applied rewrites77.6%

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

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

                            Alternative 14: 64.8% accurate, 1.0× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{x}{y} \leq -5.1 \cdot 10^{-40} \lor \neg \left(\frac{x}{y} \leq 1.65 \cdot 10^{-21}\right):\\ \;\;\;\;\frac{x}{y} + -2\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t} - 2\\ \end{array} \end{array} \]
                            (FPCore (x y z t)
                             :precision binary64
                             (if (or (<= (/ x y) -5.1e-40) (not (<= (/ x y) 1.65e-21)))
                               (+ (/ x y) -2.0)
                               (- (/ 2.0 t) 2.0)))
                            double code(double x, double y, double z, double t) {
                            	double tmp;
                            	if (((x / y) <= -5.1e-40) || !((x / y) <= 1.65e-21)) {
                            		tmp = (x / y) + -2.0;
                            	} else {
                            		tmp = (2.0 / t) - 2.0;
                            	}
                            	return tmp;
                            }
                            
                            module fmin_fmax_functions
                                implicit none
                                private
                                public fmax
                                public fmin
                            
                                interface fmax
                                    module procedure fmax88
                                    module procedure fmax44
                                    module procedure fmax84
                                    module procedure fmax48
                                end interface
                                interface fmin
                                    module procedure fmin88
                                    module procedure fmin44
                                    module procedure fmin84
                                    module procedure fmin48
                                end interface
                            contains
                                real(8) function fmax88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmax44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmax84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmax48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                end function
                                real(8) function fmin88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmin44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmin84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmin48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                end function
                            end module
                            
                            real(8) function code(x, y, z, t)
                            use fmin_fmax_functions
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                real(8), intent (in) :: z
                                real(8), intent (in) :: t
                                real(8) :: tmp
                                if (((x / y) <= (-5.1d-40)) .or. (.not. ((x / y) <= 1.65d-21))) then
                                    tmp = (x / y) + (-2.0d0)
                                else
                                    tmp = (2.0d0 / t) - 2.0d0
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y, double z, double t) {
                            	double tmp;
                            	if (((x / y) <= -5.1e-40) || !((x / y) <= 1.65e-21)) {
                            		tmp = (x / y) + -2.0;
                            	} else {
                            		tmp = (2.0 / t) - 2.0;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t):
                            	tmp = 0
                            	if ((x / y) <= -5.1e-40) or not ((x / y) <= 1.65e-21):
                            		tmp = (x / y) + -2.0
                            	else:
                            		tmp = (2.0 / t) - 2.0
                            	return tmp
                            
                            function code(x, y, z, t)
                            	tmp = 0.0
                            	if ((Float64(x / y) <= -5.1e-40) || !(Float64(x / y) <= 1.65e-21))
                            		tmp = Float64(Float64(x / y) + -2.0);
                            	else
                            		tmp = Float64(Float64(2.0 / t) - 2.0);
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t)
                            	tmp = 0.0;
                            	if (((x / y) <= -5.1e-40) || ~(((x / y) <= 1.65e-21)))
                            		tmp = (x / y) + -2.0;
                            	else
                            		tmp = (2.0 / t) - 2.0;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -5.1e-40], N[Not[LessEqual[N[(x / y), $MachinePrecision], 1.65e-21]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] + -2.0), $MachinePrecision], N[(N[(2.0 / t), $MachinePrecision] - 2.0), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;\frac{x}{y} \leq -5.1 \cdot 10^{-40} \lor \neg \left(\frac{x}{y} \leq 1.65 \cdot 10^{-21}\right):\\
                            \;\;\;\;\frac{x}{y} + -2\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{2}{t} - 2\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if (/.f64 x y) < -5.10000000000000037e-40 or 1.65000000000000004e-21 < (/.f64 x y)

                              1. Initial program 85.4%

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

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

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

                                if -5.10000000000000037e-40 < (/.f64 x y) < 1.65000000000000004e-21

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

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

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

                                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, 2 \cdot \frac{1}{t \cdot z}\right) \]
                                  4. lift--.f64N/A

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

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

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

                                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
                                  8. lift-*.f6499.8

                                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
                                5. Applied rewrites99.8%

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

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

                                    \[\leadsto \frac{1 - t}{t} \cdot 2 \]
                                  2. lower-*.f64N/A

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

                                    \[\leadsto \frac{1 - t}{t} \cdot 2 \]
                                  4. lift--.f6462.5

                                    \[\leadsto \frac{1 - t}{t} \cdot 2 \]
                                8. Applied rewrites62.5%

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

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

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

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

                                    \[\leadsto \frac{2}{t} - 2 \]
                                  4. lower-/.f6462.5

                                    \[\leadsto \frac{2}{t} - 2 \]
                                11. Applied rewrites62.5%

                                  \[\leadsto \frac{2}{t} - 2 \]
                              5. Recombined 2 regimes into one program.
                              6. Final simplification67.8%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x}{y} \leq -5.1 \cdot 10^{-40} \lor \neg \left(\frac{x}{y} \leq 1.65 \cdot 10^{-21}\right):\\ \;\;\;\;\frac{x}{y} + -2\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t} - 2\\ \end{array} \]
                              7. Add Preprocessing

                              Alternative 15: 65.1% accurate, 1.0× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{x}{y} \leq -240000 \lor \neg \left(\frac{x}{y} \leq 3900000000\right):\\ \;\;\;\;\frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t} - 2\\ \end{array} \end{array} \]
                              (FPCore (x y z t)
                               :precision binary64
                               (if (or (<= (/ x y) -240000.0) (not (<= (/ x y) 3900000000.0)))
                                 (/ x y)
                                 (- (/ 2.0 t) 2.0)))
                              double code(double x, double y, double z, double t) {
                              	double tmp;
                              	if (((x / y) <= -240000.0) || !((x / y) <= 3900000000.0)) {
                              		tmp = x / y;
                              	} else {
                              		tmp = (2.0 / t) - 2.0;
                              	}
                              	return tmp;
                              }
                              
                              module fmin_fmax_functions
                                  implicit none
                                  private
                                  public fmax
                                  public fmin
                              
                                  interface fmax
                                      module procedure fmax88
                                      module procedure fmax44
                                      module procedure fmax84
                                      module procedure fmax48
                                  end interface
                                  interface fmin
                                      module procedure fmin88
                                      module procedure fmin44
                                      module procedure fmin84
                                      module procedure fmin48
                                  end interface
                              contains
                                  real(8) function fmax88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmax44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmax84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmax48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmin44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmin48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                  end function
                              end module
                              
                              real(8) function code(x, y, z, t)
                              use fmin_fmax_functions
                                  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) <= (-240000.0d0)) .or. (.not. ((x / y) <= 3900000000.0d0))) then
                                      tmp = x / y
                                  else
                                      tmp = (2.0d0 / t) - 2.0d0
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double x, double y, double z, double t) {
                              	double tmp;
                              	if (((x / y) <= -240000.0) || !((x / y) <= 3900000000.0)) {
                              		tmp = x / y;
                              	} else {
                              		tmp = (2.0 / t) - 2.0;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t):
                              	tmp = 0
                              	if ((x / y) <= -240000.0) or not ((x / y) <= 3900000000.0):
                              		tmp = x / y
                              	else:
                              		tmp = (2.0 / t) - 2.0
                              	return tmp
                              
                              function code(x, y, z, t)
                              	tmp = 0.0
                              	if ((Float64(x / y) <= -240000.0) || !(Float64(x / y) <= 3900000000.0))
                              		tmp = Float64(x / y);
                              	else
                              		tmp = Float64(Float64(2.0 / t) - 2.0);
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z, t)
                              	tmp = 0.0;
                              	if (((x / y) <= -240000.0) || ~(((x / y) <= 3900000000.0)))
                              		tmp = x / y;
                              	else
                              		tmp = (2.0 / t) - 2.0;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -240000.0], N[Not[LessEqual[N[(x / y), $MachinePrecision], 3900000000.0]], $MachinePrecision]], N[(x / y), $MachinePrecision], N[(N[(2.0 / t), $MachinePrecision] - 2.0), $MachinePrecision]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;\frac{x}{y} \leq -240000 \lor \neg \left(\frac{x}{y} \leq 3900000000\right):\\
                              \;\;\;\;\frac{x}{y}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{2}{t} - 2\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if (/.f64 x y) < -2.4e5 or 3.9e9 < (/.f64 x y)

                                1. Initial program 85.7%

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

                                  \[\leadsto \color{blue}{\frac{x}{y}} \]
                                4. Step-by-step derivation
                                  1. lift-/.f6473.8

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

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

                                if -2.4e5 < (/.f64 x y) < 3.9e9

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

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

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

                                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, 2 \cdot \frac{1}{t \cdot z}\right) \]
                                  4. lift--.f64N/A

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

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

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

                                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
                                  8. lift-*.f6498.5

                                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
                                5. Applied rewrites98.5%

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

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

                                    \[\leadsto \frac{1 - t}{t} \cdot 2 \]
                                  2. lower-*.f64N/A

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

                                    \[\leadsto \frac{1 - t}{t} \cdot 2 \]
                                  4. lift--.f6460.2

                                    \[\leadsto \frac{1 - t}{t} \cdot 2 \]
                                8. Applied rewrites60.2%

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

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

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

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

                                    \[\leadsto \frac{2}{t} - 2 \]
                                  4. lower-/.f6460.2

                                    \[\leadsto \frac{2}{t} - 2 \]
                                11. Applied rewrites60.2%

                                  \[\leadsto \frac{2}{t} - 2 \]
                              3. Recombined 2 regimes into one program.
                              4. Final simplification67.0%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x}{y} \leq -240000 \lor \neg \left(\frac{x}{y} \leq 3900000000\right):\\ \;\;\;\;\frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t} - 2\\ \end{array} \]
                              5. Add Preprocessing

                              Alternative 16: 52.7% accurate, 1.0× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{x}{y} \leq -2 \lor \neg \left(\frac{x}{y} \leq 2\right):\\ \;\;\;\;\frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;-2\\ \end{array} \end{array} \]
                              (FPCore (x y z t)
                               :precision binary64
                               (if (or (<= (/ x y) -2.0) (not (<= (/ x y) 2.0))) (/ x y) -2.0))
                              double code(double x, double y, double z, double t) {
                              	double tmp;
                              	if (((x / y) <= -2.0) || !((x / y) <= 2.0)) {
                              		tmp = x / y;
                              	} else {
                              		tmp = -2.0;
                              	}
                              	return tmp;
                              }
                              
                              module fmin_fmax_functions
                                  implicit none
                                  private
                                  public fmax
                                  public fmin
                              
                                  interface fmax
                                      module procedure fmax88
                                      module procedure fmax44
                                      module procedure fmax84
                                      module procedure fmax48
                                  end interface
                                  interface fmin
                                      module procedure fmin88
                                      module procedure fmin44
                                      module procedure fmin84
                                      module procedure fmin48
                                  end interface
                              contains
                                  real(8) function fmax88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmax44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmax84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmax48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmin44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmin48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                  end function
                              end module
                              
                              real(8) function code(x, y, z, t)
                              use fmin_fmax_functions
                                  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) <= (-2.0d0)) .or. (.not. ((x / y) <= 2.0d0))) then
                                      tmp = x / y
                                  else
                                      tmp = -2.0d0
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double x, double y, double z, double t) {
                              	double tmp;
                              	if (((x / y) <= -2.0) || !((x / y) <= 2.0)) {
                              		tmp = x / y;
                              	} else {
                              		tmp = -2.0;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t):
                              	tmp = 0
                              	if ((x / y) <= -2.0) or not ((x / y) <= 2.0):
                              		tmp = x / y
                              	else:
                              		tmp = -2.0
                              	return tmp
                              
                              function code(x, y, z, t)
                              	tmp = 0.0
                              	if ((Float64(x / y) <= -2.0) || !(Float64(x / y) <= 2.0))
                              		tmp = Float64(x / y);
                              	else
                              		tmp = -2.0;
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z, t)
                              	tmp = 0.0;
                              	if (((x / y) <= -2.0) || ~(((x / y) <= 2.0)))
                              		tmp = x / y;
                              	else
                              		tmp = -2.0;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -2.0], N[Not[LessEqual[N[(x / y), $MachinePrecision], 2.0]], $MachinePrecision]], N[(x / y), $MachinePrecision], -2.0]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;\frac{x}{y} \leq -2 \lor \neg \left(\frac{x}{y} \leq 2\right):\\
                              \;\;\;\;\frac{x}{y}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;-2\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if (/.f64 x y) < -2 or 2 < (/.f64 x y)

                                1. Initial program 85.7%

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

                                  \[\leadsto \color{blue}{\frac{x}{y}} \]
                                4. Step-by-step derivation
                                  1. lift-/.f6473.8

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

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

                                if -2 < (/.f64 x y) < 2

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

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

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

                                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, 2 \cdot \frac{1}{t \cdot z}\right) \]
                                  4. lift--.f64N/A

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

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

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

                                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
                                  8. lift-*.f6498.5

                                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
                                5. Applied rewrites98.5%

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

                                  \[\leadsto -2 \]
                                7. Step-by-step derivation
                                  1. Applied rewrites39.4%

                                    \[\leadsto -2 \]
                                8. Recombined 2 regimes into one program.
                                9. Final simplification56.5%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x}{y} \leq -2 \lor \neg \left(\frac{x}{y} \leq 2\right):\\ \;\;\;\;\frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;-2\\ \end{array} \]
                                10. Add Preprocessing

                                Alternative 17: 99.1% accurate, 1.0× speedup?

                                \[\begin{array}{l} \\ \frac{x}{y} + \frac{\mathsf{fma}\left(-2, t, \frac{2}{z} - -2\right)}{t} \end{array} \]
                                (FPCore (x y z t)
                                 :precision binary64
                                 (+ (/ x y) (/ (fma -2.0 t (- (/ 2.0 z) -2.0)) t)))
                                double code(double x, double y, double z, double t) {
                                	return (x / y) + (fma(-2.0, t, ((2.0 / z) - -2.0)) / t);
                                }
                                
                                function code(x, y, z, t)
                                	return Float64(Float64(x / y) + Float64(fma(-2.0, t, Float64(Float64(2.0 / z) - -2.0)) / t))
                                end
                                
                                code[x_, y_, z_, t_] := N[(N[(x / y), $MachinePrecision] + N[(N[(-2.0 * t + N[(N[(2.0 / z), $MachinePrecision] - -2.0), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
                                
                                \begin{array}{l}
                                
                                \\
                                \frac{x}{y} + \frac{\mathsf{fma}\left(-2, t, \frac{2}{z} - -2\right)}{t}
                                \end{array}
                                
                                Derivation
                                1. Initial program 87.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 18: 19.5% accurate, 47.0× speedup?

                                \[\begin{array}{l} \\ -2 \end{array} \]
                                (FPCore (x y z t) :precision binary64 -2.0)
                                double code(double x, double y, double z, double t) {
                                	return -2.0;
                                }
                                
                                module fmin_fmax_functions
                                    implicit none
                                    private
                                    public fmax
                                    public fmin
                                
                                    interface fmax
                                        module procedure fmax88
                                        module procedure fmax44
                                        module procedure fmax84
                                        module procedure fmax48
                                    end interface
                                    interface fmin
                                        module procedure fmin88
                                        module procedure fmin44
                                        module procedure fmin84
                                        module procedure fmin48
                                    end interface
                                contains
                                    real(8) function fmax88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmax44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmax84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmax48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmin44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmin48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                    end function
                                end module
                                
                                real(8) function code(x, y, z, t)
                                use fmin_fmax_functions
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    real(8), intent (in) :: z
                                    real(8), intent (in) :: t
                                    code = -2.0d0
                                end function
                                
                                public static double code(double x, double y, double z, double t) {
                                	return -2.0;
                                }
                                
                                def code(x, y, z, t):
                                	return -2.0
                                
                                function code(x, y, z, t)
                                	return -2.0
                                end
                                
                                function tmp = code(x, y, z, t)
                                	tmp = -2.0;
                                end
                                
                                code[x_, y_, z_, t_] := -2.0
                                
                                \begin{array}{l}
                                
                                \\
                                -2
                                \end{array}
                                
                                Derivation
                                1. Initial program 87.7%

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

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

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

                                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, 2 \cdot \frac{1}{t \cdot z}\right) \]
                                  4. lift--.f64N/A

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

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

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

                                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
                                  8. lift-*.f6464.0

                                    \[\leadsto \mathsf{fma}\left(\frac{1 - t}{t}, 2, \frac{2}{t \cdot z}\right) \]
                                5. Applied rewrites64.0%

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

                                  \[\leadsto -2 \]
                                7. Step-by-step derivation
                                  1. Applied rewrites21.1%

                                    \[\leadsto -2 \]
                                  2. Final simplification21.1%

                                    \[\leadsto -2 \]
                                  3. 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));
                                  }
                                  
                                  module fmin_fmax_functions
                                      implicit none
                                      private
                                      public fmax
                                      public fmin
                                  
                                      interface fmax
                                          module procedure fmax88
                                          module procedure fmax44
                                          module procedure fmax84
                                          module procedure fmax48
                                      end interface
                                      interface fmin
                                          module procedure fmin88
                                          module procedure fmin44
                                          module procedure fmin84
                                          module procedure fmin48
                                      end interface
                                  contains
                                      real(8) function fmax88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmax44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmax84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmax48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmin44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmin48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                      end function
                                  end module
                                  
                                  real(8) function code(x, y, z, t)
                                  use fmin_fmax_functions
                                      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 2025038 
                                  (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))))