AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1

Percentage Accurate: 59.9% → 93.6%
Time: 5.9s
Alternatives: 18
Speedup: 2.1×

Specification

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

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

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: 59.9% accurate, 1.0× speedup?

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

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

Alternative 1: 93.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \left(x + y\right)\\ t_2 := \frac{y + x}{\left(y + x\right) + t}\\ t_3 := \frac{t + y}{t\_1}\\ t_4 := \mathsf{fma}\left(t\_2, z, a \cdot \mathsf{fma}\left(-1, \frac{b}{a} \cdot \frac{y}{t\_1}, t\_3\right)\right)\\ \mathbf{if}\;a \leq -2.3 \cdot 10^{-32}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-30}:\\ \;\;\;\;\mathsf{fma}\left(t\_2, z, \mathsf{fma}\left(-1, \frac{b \cdot y}{t\_1}, a \cdot t\_3\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ t (+ x y)))
        (t_2 (/ (+ y x) (+ (+ y x) t)))
        (t_3 (/ (+ t y) t_1))
        (t_4 (fma t_2 z (* a (fma -1.0 (* (/ b a) (/ y t_1)) t_3)))))
   (if (<= a -2.3e-32)
     t_4
     (if (<= a 2.2e-30)
       (fma t_2 z (fma -1.0 (/ (* b y) t_1) (* a t_3)))
       t_4))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t + (x + y);
	double t_2 = (y + x) / ((y + x) + t);
	double t_3 = (t + y) / t_1;
	double t_4 = fma(t_2, z, (a * fma(-1.0, ((b / a) * (y / t_1)), t_3)));
	double tmp;
	if (a <= -2.3e-32) {
		tmp = t_4;
	} else if (a <= 2.2e-30) {
		tmp = fma(t_2, z, fma(-1.0, ((b * y) / t_1), (a * t_3)));
	} else {
		tmp = t_4;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(t + Float64(x + y))
	t_2 = Float64(Float64(y + x) / Float64(Float64(y + x) + t))
	t_3 = Float64(Float64(t + y) / t_1)
	t_4 = fma(t_2, z, Float64(a * fma(-1.0, Float64(Float64(b / a) * Float64(y / t_1)), t_3)))
	tmp = 0.0
	if (a <= -2.3e-32)
		tmp = t_4;
	elseif (a <= 2.2e-30)
		tmp = fma(t_2, z, fma(-1.0, Float64(Float64(b * y) / t_1), Float64(a * t_3)));
	else
		tmp = t_4;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y + x), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 * z + N[(a * N[(-1.0 * N[(N[(b / a), $MachinePrecision] * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.3e-32], t$95$4, If[LessEqual[a, 2.2e-30], N[(t$95$2 * z + N[(-1.0 * N[(N[(b * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(a * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t + \left(x + y\right)\\
t_2 := \frac{y + x}{\left(y + x\right) + t}\\
t_3 := \frac{t + y}{t\_1}\\
t_4 := \mathsf{fma}\left(t\_2, z, a \cdot \mathsf{fma}\left(-1, \frac{b}{a} \cdot \frac{y}{t\_1}, t\_3\right)\right)\\
\mathbf{if}\;a \leq -2.3 \cdot 10^{-32}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;a \leq 2.2 \cdot 10^{-30}:\\
\;\;\;\;\mathsf{fma}\left(t\_2, z, \mathsf{fma}\left(-1, \frac{b \cdot y}{t\_1}, a \cdot t\_3\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.3000000000000001e-32 or 2.19999999999999983e-30 < a

    1. Initial program 50.7%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Applied rewrites59.4%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, a \cdot \mathsf{fma}\left(-1, \frac{b \cdot y}{a \cdot \left(t + \left(x + \color{blue}{y}\right)\right)}, \frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right)\right) \]
      8. div-add-revN/A

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

        \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, a \cdot \mathsf{fma}\left(-1, \frac{b \cdot y}{a \cdot \left(t + \left(x + y\right)\right)}, \frac{t + y}{t + \left(x + y\right)}\right)\right) \]
      10. lift-+.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, a \cdot \mathsf{fma}\left(-1, \frac{b \cdot y}{a \cdot \left(t + \left(x + y\right)\right)}, \frac{t + y}{t + \left(x + y\right)}\right)\right) \]
      12. lower-+.f6486.7

        \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, a \cdot \mathsf{fma}\left(-1, \frac{b \cdot y}{a \cdot \left(t + \left(x + y\right)\right)}, \frac{t + y}{t + \left(x + y\right)}\right)\right) \]
    5. Applied rewrites86.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, a \cdot \mathsf{fma}\left(-1, \frac{b}{a} \cdot \frac{y}{t + \left(x + \color{blue}{y}\right)}, \frac{t + y}{t + \left(x + y\right)}\right)\right) \]
      11. lift-+.f6499.2

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

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

    if -2.3000000000000001e-32 < a < 2.19999999999999983e-30

    1. Initial program 70.9%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Applied rewrites86.7%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, \mathsf{fma}\left(-1, \frac{b \cdot y}{t + \left(x + y\right)}, a \cdot \left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right)\right)\right) \]
      7. div-add-revN/A

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

        \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, \mathsf{fma}\left(-1, \frac{b \cdot y}{t + \left(x + y\right)}, a \cdot \frac{t + y}{t + \left(x + y\right)}\right)\right) \]
      9. lift-+.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, \mathsf{fma}\left(-1, \frac{b \cdot y}{t + \left(x + y\right)}, a \cdot \frac{t + y}{t + \left(x + y\right)}\right)\right) \]
      11. lower-+.f6486.9

        \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, \mathsf{fma}\left(-1, \frac{b \cdot y}{t + \left(x + y\right)}, a \cdot \frac{t + y}{t + \left(x + y\right)}\right)\right) \]
    5. Applied rewrites86.9%

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

Alternative 2: 92.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a + z\right) - b\\ t_2 := t + \left(x + y\right)\\ \mathbf{if}\;y \leq -6.8 \cdot 10^{+127}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.05 \cdot 10^{+179}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, \mathsf{fma}\left(-1, \frac{b \cdot y}{t\_2}, a \cdot \frac{t + y}{t\_2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- (+ a z) b)) (t_2 (+ t (+ x y))))
   (if (<= y -6.8e+127)
     t_1
     (if (<= y 2.05e+179)
       (fma
        (/ (+ y x) (+ (+ y x) t))
        z
        (fma -1.0 (/ (* b y) t_2) (* a (/ (+ t y) t_2))))
       t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (a + z) - b;
	double t_2 = t + (x + y);
	double tmp;
	if (y <= -6.8e+127) {
		tmp = t_1;
	} else if (y <= 2.05e+179) {
		tmp = fma(((y + x) / ((y + x) + t)), z, fma(-1.0, ((b * y) / t_2), (a * ((t + y) / t_2))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(a + z) - b)
	t_2 = Float64(t + Float64(x + y))
	tmp = 0.0
	if (y <= -6.8e+127)
		tmp = t_1;
	elseif (y <= 2.05e+179)
		tmp = fma(Float64(Float64(y + x) / Float64(Float64(y + x) + t)), z, fma(-1.0, Float64(Float64(b * y) / t_2), Float64(a * Float64(Float64(t + y) / t_2))));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.8e+127], t$95$1, If[LessEqual[y, 2.05e+179], N[(N[(N[(y + x), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] * z + N[(-1.0 * N[(N[(b * y), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(a * N[(N[(t + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(a + z\right) - b\\
t_2 := t + \left(x + y\right)\\
\mathbf{if}\;y \leq -6.8 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 2.05 \cdot 10^{+179}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, \mathsf{fma}\left(-1, \frac{b \cdot y}{t\_2}, a \cdot \frac{t + y}{t\_2}\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.79999999999999955e127 or 2.05000000000000005e179 < y

    1. Initial program 28.6%

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

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    3. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto \left(a + z\right) - \color{blue}{b} \]
      2. lower-+.f6483.8

        \[\leadsto \left(a + z\right) - b \]
    4. Applied rewrites83.8%

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]

    if -6.79999999999999955e127 < y < 2.05000000000000005e179

    1. Initial program 70.7%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Applied rewrites82.0%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, \mathsf{fma}\left(-1, \frac{b \cdot y}{t + \left(x + y\right)}, a \cdot \left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right)\right)\right) \]
      7. div-add-revN/A

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

        \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, \mathsf{fma}\left(-1, \frac{b \cdot y}{t + \left(x + y\right)}, a \cdot \frac{t + y}{t + \left(x + y\right)}\right)\right) \]
      9. lift-+.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, \mathsf{fma}\left(-1, \frac{b \cdot y}{t + \left(x + y\right)}, a \cdot \frac{t + y}{t + \left(x + y\right)}\right)\right) \]
      11. lower-+.f6495.1

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

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

Alternative 3: 90.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\ t_2 := \left(y + x\right) + t\\ t_3 := \mathsf{fma}\left(\frac{y + x}{t\_2}, z, a \cdot \frac{t + y}{t + \left(x + y\right)}\right)\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+276}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t + y}{t\_2}, a, \frac{\left(y + x\right) \cdot z - b \cdot y}{t\_2}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
        (t_2 (+ (+ y x) t))
        (t_3 (fma (/ (+ y x) t_2) z (* a (/ (+ t y) (+ t (+ x y)))))))
   (if (<= t_1 (- INFINITY))
     t_3
     (if (<= t_1 2e+276)
       (fma (/ (+ t y) t_2) a (/ (- (* (+ y x) z) (* b y)) t_2))
       t_3))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
	double t_2 = (y + x) + t;
	double t_3 = fma(((y + x) / t_2), z, (a * ((t + y) / (t + (x + y)))));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = t_3;
	} else if (t_1 <= 2e+276) {
		tmp = fma(((t + y) / t_2), a, ((((y + x) * z) - (b * y)) / t_2));
	} else {
		tmp = t_3;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y))
	t_2 = Float64(Float64(y + x) + t)
	t_3 = fma(Float64(Float64(y + x) / t_2), z, Float64(a * Float64(Float64(t + y) / Float64(t + Float64(x + y)))))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = t_3;
	elseif (t_1 <= 2e+276)
		tmp = fma(Float64(Float64(t + y) / t_2), a, Float64(Float64(Float64(Float64(y + x) * z) - Float64(b * y)) / t_2));
	else
		tmp = t_3;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(y + x), $MachinePrecision] / t$95$2), $MachinePrecision] * z + N[(a * N[(N[(t + y), $MachinePrecision] / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$3, If[LessEqual[t$95$1, 2e+276], N[(N[(N[(t + y), $MachinePrecision] / t$95$2), $MachinePrecision] * a + N[(N[(N[(N[(y + x), $MachinePrecision] * z), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\
t_2 := \left(y + x\right) + t\\
t_3 := \mathsf{fma}\left(\frac{y + x}{t\_2}, z, a \cdot \frac{t + y}{t + \left(x + y\right)}\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+276}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t + y}{t\_2}, a, \frac{\left(y + x\right) \cdot z - b \cdot y}{t\_2}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 2.0000000000000001e276 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 6.5%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Applied rewrites34.7%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, \mathsf{fma}\left(-1, \frac{b \cdot y}{t + \left(x + y\right)}, a \cdot \left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right)\right)\right) \]
      7. div-add-revN/A

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

        \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, \mathsf{fma}\left(-1, \frac{b \cdot y}{t + \left(x + y\right)}, a \cdot \frac{t + y}{t + \left(x + y\right)}\right)\right) \]
      9. lift-+.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, \mathsf{fma}\left(-1, \frac{b \cdot y}{t + \left(x + y\right)}, a \cdot \frac{t + y}{t + \left(x + y\right)}\right)\right) \]
      11. lower-+.f6471.1

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

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

      \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, a \cdot \color{blue}{\left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right)}\right) \]
    7. Step-by-step derivation
      1. div-add-revN/A

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 2.0000000000000001e276

    1. Initial program 99.5%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Applied rewrites99.4%

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

Alternative 4: 90.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + t\right) + y\\ t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{t\_1}\\ t_3 := \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, a \cdot \frac{t + y}{t + \left(x + y\right)}\right)\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+276}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, \mathsf{fma}\left(a + \left(z + -1 \cdot b\right), y, z \cdot x\right)\right)}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (+ x t) y))
        (t_2 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) t_1))
        (t_3
         (fma (/ (+ y x) (+ (+ y x) t)) z (* a (/ (+ t y) (+ t (+ x y)))))))
   (if (<= t_2 (- INFINITY))
     t_3
     (if (<= t_2 2e+276)
       (/ (fma a t (fma (+ a (+ z (* -1.0 b))) y (* z x))) t_1)
       t_3))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + t) + y;
	double t_2 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / t_1;
	double t_3 = fma(((y + x) / ((y + x) + t)), z, (a * ((t + y) / (t + (x + y)))));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_3;
	} else if (t_2 <= 2e+276) {
		tmp = fma(a, t, fma((a + (z + (-1.0 * b))), y, (z * x))) / t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + t) + y)
	t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / t_1)
	t_3 = fma(Float64(Float64(y + x) / Float64(Float64(y + x) + t)), z, Float64(a * Float64(Float64(t + y) / Float64(t + Float64(x + y)))))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_3;
	elseif (t_2 <= 2e+276)
		tmp = Float64(fma(a, t, fma(Float64(a + Float64(z + Float64(-1.0 * b))), y, Float64(z * x))) / t_1);
	else
		tmp = t_3;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(y + x), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] * z + N[(a * N[(N[(t + y), $MachinePrecision] / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, 2e+276], N[(N[(a * t + N[(N[(a + N[(z + N[(-1.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y + N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$3]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{t\_1}\\
t_3 := \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, a \cdot \frac{t + y}{t + \left(x + y\right)}\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+276}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a, t, \mathsf{fma}\left(a + \left(z + -1 \cdot b\right), y, z \cdot x\right)\right)}{t\_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 2.0000000000000001e276 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 6.5%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Applied rewrites34.7%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, \mathsf{fma}\left(-1, \frac{b \cdot y}{t + \left(x + y\right)}, a \cdot \left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right)\right)\right) \]
      7. div-add-revN/A

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

        \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, \mathsf{fma}\left(-1, \frac{b \cdot y}{t + \left(x + y\right)}, a \cdot \frac{t + y}{t + \left(x + y\right)}\right)\right) \]
      9. lift-+.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, \mathsf{fma}\left(-1, \frac{b \cdot y}{t + \left(x + y\right)}, a \cdot \frac{t + y}{t + \left(x + y\right)}\right)\right) \]
      11. lower-+.f6471.1

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

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

      \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, a \cdot \color{blue}{\left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right)}\right) \]
    7. Step-by-step derivation
      1. div-add-revN/A

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 2.0000000000000001e276

    1. Initial program 99.5%

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(a, t, y \cdot \left(\left(a + z\right) - b\right) + x \cdot z\right)}{\left(x + t\right) + y} \]
      3. *-commutativeN/A

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(a, t, \mathsf{fma}\left(\left(a + z\right) - b, y, x \cdot z\right)\right)}{\left(x + t\right) + y} \]
      7. *-commutativeN/A

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(a, t, \mathsf{fma}\left(a + \left(z + -1 \cdot b\right), y, z \cdot x\right)\right)}{\left(x + t\right) + y} \]
      3. lower-*.f6499.5

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

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

Alternative 5: 88.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + t\right) + y\\ t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{t\_1}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, a\right)\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+276}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, \mathsf{fma}\left(a + \left(z + -1 \cdot b\right), y, z \cdot x\right)\right)}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (+ x t) y))
        (t_2 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) t_1)))
   (if (<= t_2 (- INFINITY))
     (fma (/ (+ y x) (+ (+ y x) t)) z a)
     (if (<= t_2 2e+276)
       (/ (fma a t (fma (+ a (+ z (* -1.0 b))) y (* z x))) t_1)
       (- (+ a z) b)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + t) + y;
	double t_2 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / t_1;
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = fma(((y + x) / ((y + x) + t)), z, a);
	} else if (t_2 <= 2e+276) {
		tmp = fma(a, t, fma((a + (z + (-1.0 * b))), y, (z * x))) / t_1;
	} else {
		tmp = (a + z) - b;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + t) + y)
	t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / t_1)
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = fma(Float64(Float64(y + x) / Float64(Float64(y + x) + t)), z, a);
	elseif (t_2 <= 2e+276)
		tmp = Float64(fma(a, t, fma(Float64(a + Float64(z + Float64(-1.0 * b))), y, Float64(z * x))) / t_1);
	else
		tmp = Float64(Float64(a + z) - b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(N[(y + x), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] * z + a), $MachinePrecision], If[LessEqual[t$95$2, 2e+276], N[(N[(a * t + N[(N[(a + N[(z + N[(-1.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y + N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{t\_1}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, a\right)\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+276}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a, t, \mathsf{fma}\left(a + \left(z + -1 \cdot b\right), y, z \cdot x\right)\right)}{t\_1}\\

\mathbf{else}:\\
\;\;\;\;\left(a + z\right) - b\\


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

    1. Initial program 6.2%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Applied rewrites38.8%

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

      \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, \color{blue}{a}\right) \]
    4. Step-by-step derivation
      1. Applied rewrites72.4%

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

      if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 2.0000000000000001e276

      1. Initial program 99.5%

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(a, t, y \cdot \left(\left(a + z\right) - b\right) + x \cdot z\right)}{\left(x + t\right) + y} \]
        3. *-commutativeN/A

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(a, t, \mathsf{fma}\left(\left(a + z\right) - b, y, x \cdot z\right)\right)}{\left(x + t\right) + y} \]
        7. *-commutativeN/A

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(a, t, \mathsf{fma}\left(a + \left(z + -1 \cdot b\right), y, z \cdot x\right)\right)}{\left(x + t\right) + y} \]
        3. lower-*.f6499.5

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

        \[\leadsto \frac{\mathsf{fma}\left(a, t, \mathsf{fma}\left(a + \left(z + -1 \cdot b\right), y, z \cdot x\right)\right)}{\left(x + t\right) + y} \]

      if 2.0000000000000001e276 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

      1. Initial program 6.8%

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

        \[\leadsto \color{blue}{\left(a + z\right) - b} \]
      3. Step-by-step derivation
        1. lower--.f64N/A

          \[\leadsto \left(a + z\right) - \color{blue}{b} \]
        2. lower-+.f6472.6

          \[\leadsto \left(a + z\right) - b \]
      4. Applied rewrites72.6%

        \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    5. Recombined 3 regimes into one program.
    6. Add Preprocessing

    Alternative 6: 88.0% accurate, 0.3× speedup?

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

      1. Initial program 6.2%

        \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
      2. Applied rewrites38.8%

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

        \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, \color{blue}{a}\right) \]
      4. Step-by-step derivation
        1. Applied rewrites72.4%

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

        if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 2.0000000000000001e276

        1. Initial program 99.5%

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(a, t, y \cdot \left(\left(a + z\right) - b\right) + x \cdot z\right)}{\left(x + t\right) + y} \]
          3. *-commutativeN/A

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(a, t, \mathsf{fma}\left(\left(a + z\right) - b, y, x \cdot z\right)\right)}{\left(x + t\right) + y} \]
          7. *-commutativeN/A

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

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

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

        if 2.0000000000000001e276 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

        1. Initial program 6.8%

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

          \[\leadsto \color{blue}{\left(a + z\right) - b} \]
        3. Step-by-step derivation
          1. lower--.f64N/A

            \[\leadsto \left(a + z\right) - \color{blue}{b} \]
          2. lower-+.f6472.6

            \[\leadsto \left(a + z\right) - b \]
        4. Applied rewrites72.6%

          \[\leadsto \color{blue}{\left(a + z\right) - b} \]
      5. Recombined 3 regimes into one program.
      6. Add Preprocessing

      Alternative 7: 77.2% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y + x\right) + t\\ t_2 := \left(a + z\right) - b\\ \mathbf{if}\;y \leq -1.35 \cdot 10^{+85}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-113}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y + x}{t\_1}, z, a \cdot \frac{t}{t + x}\right)\\ \mathbf{elif}\;y \leq 8.6 \cdot 10^{+31}:\\ \;\;\;\;\mathsf{fma}\left(1, z, \frac{\left(t + y\right) \cdot a - b \cdot y}{t\_1}\right)\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{+175}:\\ \;\;\;\;a - b \cdot \frac{y}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (+ (+ y x) t)) (t_2 (- (+ a z) b)))
         (if (<= y -1.35e+85)
           t_2
           (if (<= y 2e-113)
             (fma (/ (+ y x) t_1) z (* a (/ t (+ t x))))
             (if (<= y 8.6e+31)
               (fma 1.0 z (/ (- (* (+ t y) a) (* b y)) t_1))
               (if (<= y 6.6e+175) (- a (* b (/ y t_1))) t_2))))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = (y + x) + t;
      	double t_2 = (a + z) - b;
      	double tmp;
      	if (y <= -1.35e+85) {
      		tmp = t_2;
      	} else if (y <= 2e-113) {
      		tmp = fma(((y + x) / t_1), z, (a * (t / (t + x))));
      	} else if (y <= 8.6e+31) {
      		tmp = fma(1.0, z, ((((t + y) * a) - (b * y)) / t_1));
      	} else if (y <= 6.6e+175) {
      		tmp = a - (b * (y / t_1));
      	} else {
      		tmp = t_2;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(Float64(y + x) + t)
      	t_2 = Float64(Float64(a + z) - b)
      	tmp = 0.0
      	if (y <= -1.35e+85)
      		tmp = t_2;
      	elseif (y <= 2e-113)
      		tmp = fma(Float64(Float64(y + x) / t_1), z, Float64(a * Float64(t / Float64(t + x))));
      	elseif (y <= 8.6e+31)
      		tmp = fma(1.0, z, Float64(Float64(Float64(Float64(t + y) * a) - Float64(b * y)) / t_1));
      	elseif (y <= 6.6e+175)
      		tmp = Float64(a - Float64(b * Float64(y / t_1)));
      	else
      		tmp = t_2;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -1.35e+85], t$95$2, If[LessEqual[y, 2e-113], N[(N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision] * z + N[(a * N[(t / N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.6e+31], N[(1.0 * z + N[(N[(N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.6e+175], N[(a - N[(b * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \left(y + x\right) + t\\
      t_2 := \left(a + z\right) - b\\
      \mathbf{if}\;y \leq -1.35 \cdot 10^{+85}:\\
      \;\;\;\;t\_2\\
      
      \mathbf{elif}\;y \leq 2 \cdot 10^{-113}:\\
      \;\;\;\;\mathsf{fma}\left(\frac{y + x}{t\_1}, z, a \cdot \frac{t}{t + x}\right)\\
      
      \mathbf{elif}\;y \leq 8.6 \cdot 10^{+31}:\\
      \;\;\;\;\mathsf{fma}\left(1, z, \frac{\left(t + y\right) \cdot a - b \cdot y}{t\_1}\right)\\
      
      \mathbf{elif}\;y \leq 6.6 \cdot 10^{+175}:\\
      \;\;\;\;a - b \cdot \frac{y}{t\_1}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_2\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if y < -1.34999999999999992e85 or 6.6000000000000005e175 < y

        1. Initial program 31.3%

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

          \[\leadsto \color{blue}{\left(a + z\right) - b} \]
        3. Step-by-step derivation
          1. lower--.f64N/A

            \[\leadsto \left(a + z\right) - \color{blue}{b} \]
          2. lower-+.f6481.4

            \[\leadsto \left(a + z\right) - b \]
        4. Applied rewrites81.4%

          \[\leadsto \color{blue}{\left(a + z\right) - b} \]

        if -1.34999999999999992e85 < y < 1.99999999999999996e-113

        1. Initial program 75.7%

          \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
        2. Applied rewrites85.9%

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, a \cdot \mathsf{fma}\left(-1, \frac{b \cdot y}{a \cdot \left(t + \left(x + \color{blue}{y}\right)\right)}, \frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right)\right) \]
          8. div-add-revN/A

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

            \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, a \cdot \mathsf{fma}\left(-1, \frac{b \cdot y}{a \cdot \left(t + \left(x + y\right)\right)}, \frac{t + y}{t + \left(x + y\right)}\right)\right) \]
          10. lift-+.f64N/A

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

            \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, a \cdot \mathsf{fma}\left(-1, \frac{b \cdot y}{a \cdot \left(t + \left(x + y\right)\right)}, \frac{t + y}{t + \left(x + y\right)}\right)\right) \]
          12. lower-+.f6493.9

            \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, a \cdot \mathsf{fma}\left(-1, \frac{b \cdot y}{a \cdot \left(t + \left(x + y\right)\right)}, \frac{t + y}{t + \left(x + y\right)}\right)\right) \]
        5. Applied rewrites93.9%

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

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

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

            \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, a \cdot \frac{t}{t + x}\right) \]
        8. Applied rewrites81.5%

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

        if 1.99999999999999996e-113 < y < 8.59999999999999978e31

        1. Initial program 76.5%

          \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
        2. Applied rewrites86.8%

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{1}, z, \frac{\left(t + y\right) \cdot a - b \cdot y}{\left(y + x\right) + t}\right) \]
        4. Step-by-step derivation
          1. Applied rewrites70.8%

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

          if 8.59999999999999978e31 < y < 6.6000000000000005e175

          1. Initial program 50.4%

            \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
          2. Applied rewrites61.0%

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

            \[\leadsto \color{blue}{a} - b \cdot \frac{y}{\left(y + x\right) + t} \]
          4. Step-by-step derivation
            1. Applied rewrites55.1%

              \[\leadsto \color{blue}{a} - b \cdot \frac{y}{\left(y + x\right) + t} \]
          5. Recombined 4 regimes into one program.
          6. Add Preprocessing

          Alternative 8: 73.0% accurate, 0.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y + x\right) + t\\ t_2 := \left(a + z\right) - b\\ \mathbf{if}\;y \leq -5.5 \cdot 10^{+90}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 6.1 \cdot 10^{-114}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y + x}{t\_1}, z, a\right)\\ \mathbf{elif}\;y \leq 8.6 \cdot 10^{+31}:\\ \;\;\;\;\mathsf{fma}\left(1, z, \frac{\left(t + y\right) \cdot a - b \cdot y}{t\_1}\right)\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{+175}:\\ \;\;\;\;a - b \cdot \frac{y}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (let* ((t_1 (+ (+ y x) t)) (t_2 (- (+ a z) b)))
             (if (<= y -5.5e+90)
               t_2
               (if (<= y 6.1e-114)
                 (fma (/ (+ y x) t_1) z a)
                 (if (<= y 8.6e+31)
                   (fma 1.0 z (/ (- (* (+ t y) a) (* b y)) t_1))
                   (if (<= y 6.6e+175) (- a (* b (/ y t_1))) t_2))))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = (y + x) + t;
          	double t_2 = (a + z) - b;
          	double tmp;
          	if (y <= -5.5e+90) {
          		tmp = t_2;
          	} else if (y <= 6.1e-114) {
          		tmp = fma(((y + x) / t_1), z, a);
          	} else if (y <= 8.6e+31) {
          		tmp = fma(1.0, z, ((((t + y) * a) - (b * y)) / t_1));
          	} else if (y <= 6.6e+175) {
          		tmp = a - (b * (y / t_1));
          	} else {
          		tmp = t_2;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b)
          	t_1 = Float64(Float64(y + x) + t)
          	t_2 = Float64(Float64(a + z) - b)
          	tmp = 0.0
          	if (y <= -5.5e+90)
          		tmp = t_2;
          	elseif (y <= 6.1e-114)
          		tmp = fma(Float64(Float64(y + x) / t_1), z, a);
          	elseif (y <= 8.6e+31)
          		tmp = fma(1.0, z, Float64(Float64(Float64(Float64(t + y) * a) - Float64(b * y)) / t_1));
          	elseif (y <= 6.6e+175)
          		tmp = Float64(a - Float64(b * Float64(y / t_1)));
          	else
          		tmp = t_2;
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -5.5e+90], t$95$2, If[LessEqual[y, 6.1e-114], N[(N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision] * z + a), $MachinePrecision], If[LessEqual[y, 8.6e+31], N[(1.0 * z + N[(N[(N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.6e+175], N[(a - N[(b * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left(y + x\right) + t\\
          t_2 := \left(a + z\right) - b\\
          \mathbf{if}\;y \leq -5.5 \cdot 10^{+90}:\\
          \;\;\;\;t\_2\\
          
          \mathbf{elif}\;y \leq 6.1 \cdot 10^{-114}:\\
          \;\;\;\;\mathsf{fma}\left(\frac{y + x}{t\_1}, z, a\right)\\
          
          \mathbf{elif}\;y \leq 8.6 \cdot 10^{+31}:\\
          \;\;\;\;\mathsf{fma}\left(1, z, \frac{\left(t + y\right) \cdot a - b \cdot y}{t\_1}\right)\\
          
          \mathbf{elif}\;y \leq 6.6 \cdot 10^{+175}:\\
          \;\;\;\;a - b \cdot \frac{y}{t\_1}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_2\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if y < -5.49999999999999999e90 or 6.6000000000000005e175 < y

            1. Initial program 30.8%

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

              \[\leadsto \color{blue}{\left(a + z\right) - b} \]
            3. Step-by-step derivation
              1. lower--.f64N/A

                \[\leadsto \left(a + z\right) - \color{blue}{b} \]
              2. lower-+.f6481.7

                \[\leadsto \left(a + z\right) - b \]
            4. Applied rewrites81.7%

              \[\leadsto \color{blue}{\left(a + z\right) - b} \]

            if -5.49999999999999999e90 < y < 6.09999999999999977e-114

            1. Initial program 75.6%

              \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
            2. Applied rewrites85.8%

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

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

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

              if 6.09999999999999977e-114 < y < 8.59999999999999978e31

              1. Initial program 76.5%

                \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
              2. Applied rewrites86.8%

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

                \[\leadsto \mathsf{fma}\left(\color{blue}{1}, z, \frac{\left(t + y\right) \cdot a - b \cdot y}{\left(y + x\right) + t}\right) \]
              4. Step-by-step derivation
                1. Applied rewrites70.8%

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

                if 8.59999999999999978e31 < y < 6.6000000000000005e175

                1. Initial program 50.4%

                  \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
                2. Applied rewrites61.0%

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

                  \[\leadsto \color{blue}{a} - b \cdot \frac{y}{\left(y + x\right) + t} \]
                4. Step-by-step derivation
                  1. Applied rewrites55.1%

                    \[\leadsto \color{blue}{a} - b \cdot \frac{y}{\left(y + x\right) + t} \]
                5. Recombined 4 regimes into one program.
                6. Add Preprocessing

                Alternative 9: 70.3% accurate, 1.2× speedup?

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

                  1. Initial program 46.5%

                    \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
                  2. Applied rewrites71.9%

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

                    \[\leadsto \mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, \color{blue}{a}\right) \]
                  4. Step-by-step derivation
                    1. Applied rewrites81.1%

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

                    if -1.10000000000000005e55 < z < 4400

                    1. Initial program 71.1%

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

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

                      \[\leadsto \color{blue}{a} - b \cdot \frac{y}{\left(y + x\right) + t} \]
                    4. Step-by-step derivation
                      1. Applied rewrites66.2%

                        \[\leadsto \color{blue}{a} - b \cdot \frac{y}{\left(y + x\right) + t} \]
                    5. Recombined 2 regimes into one program.
                    6. Add Preprocessing

                    Alternative 10: 65.3% accurate, 1.3× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{if}\;z \leq -7.8 \cdot 10^{+157}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+56}:\\ \;\;\;\;a - b \cdot \frac{y}{\left(y + x\right) + t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b)
                     :precision binary64
                     (let* ((t_1 (* z (/ (+ x y) (+ t (+ x y))))))
                       (if (<= z -7.8e+157)
                         t_1
                         (if (<= z 6.2e+56) (- a (* b (/ y (+ (+ y x) t)))) t_1))))
                    double code(double x, double y, double z, double t, double a, double b) {
                    	double t_1 = z * ((x + y) / (t + (x + y)));
                    	double tmp;
                    	if (z <= -7.8e+157) {
                    		tmp = t_1;
                    	} else if (z <= 6.2e+56) {
                    		tmp = a - (b * (y / ((y + x) + t)));
                    	} else {
                    		tmp = t_1;
                    	}
                    	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, a, b)
                    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), intent (in) :: a
                        real(8), intent (in) :: b
                        real(8) :: t_1
                        real(8) :: tmp
                        t_1 = z * ((x + y) / (t + (x + y)))
                        if (z <= (-7.8d+157)) then
                            tmp = t_1
                        else if (z <= 6.2d+56) then
                            tmp = a - (b * (y / ((y + x) + t)))
                        else
                            tmp = t_1
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t, double a, double b) {
                    	double t_1 = z * ((x + y) / (t + (x + y)));
                    	double tmp;
                    	if (z <= -7.8e+157) {
                    		tmp = t_1;
                    	} else if (z <= 6.2e+56) {
                    		tmp = a - (b * (y / ((y + x) + t)));
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a, b):
                    	t_1 = z * ((x + y) / (t + (x + y)))
                    	tmp = 0
                    	if z <= -7.8e+157:
                    		tmp = t_1
                    	elif z <= 6.2e+56:
                    		tmp = a - (b * (y / ((y + x) + t)))
                    	else:
                    		tmp = t_1
                    	return tmp
                    
                    function code(x, y, z, t, a, b)
                    	t_1 = Float64(z * Float64(Float64(x + y) / Float64(t + Float64(x + y))))
                    	tmp = 0.0
                    	if (z <= -7.8e+157)
                    		tmp = t_1;
                    	elseif (z <= 6.2e+56)
                    		tmp = Float64(a - Float64(b * Float64(y / Float64(Float64(y + x) + t))));
                    	else
                    		tmp = t_1;
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a, b)
                    	t_1 = z * ((x + y) / (t + (x + y)));
                    	tmp = 0.0;
                    	if (z <= -7.8e+157)
                    		tmp = t_1;
                    	elseif (z <= 6.2e+56)
                    		tmp = a - (b * (y / ((y + x) + t)));
                    	else
                    		tmp = t_1;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(N[(x + y), $MachinePrecision] / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.8e+157], t$95$1, If[LessEqual[z, 6.2e+56], N[(a - N[(b * N[(y / N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := z \cdot \frac{x + y}{t + \left(x + y\right)}\\
                    \mathbf{if}\;z \leq -7.8 \cdot 10^{+157}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;z \leq 6.2 \cdot 10^{+56}:\\
                    \;\;\;\;a - b \cdot \frac{y}{\left(y + x\right) + t}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if z < -7.79999999999999941e157 or 6.20000000000000009e56 < z

                      1. Initial program 41.9%

                        \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
                      2. Applied rewrites43.5%

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

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

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

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

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

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

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

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

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

                      if -7.79999999999999941e157 < z < 6.20000000000000009e56

                      1. Initial program 68.8%

                        \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
                      2. Applied rewrites75.2%

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

                        \[\leadsto \color{blue}{a} - b \cdot \frac{y}{\left(y + x\right) + t} \]
                      4. Step-by-step derivation
                        1. Applied rewrites62.4%

                          \[\leadsto \color{blue}{a} - b \cdot \frac{y}{\left(y + x\right) + t} \]
                      5. Recombined 2 regimes into one program.
                      6. Add Preprocessing

                      Alternative 11: 64.6% accurate, 1.1× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a + z\right) - b\\ \mathbf{if}\;y \leq -1.5 \cdot 10^{-36}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.05 \cdot 10^{-46}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{+175}:\\ \;\;\;\;a - b \cdot \frac{y}{\left(y + x\right) + t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b)
                       :precision binary64
                       (let* ((t_1 (- (+ a z) b)))
                         (if (<= y -1.5e-36)
                           t_1
                           (if (<= y 2.05e-46)
                             (/ (fma a t (* z x)) (+ t x))
                             (if (<= y 6.6e+175) (- a (* b (/ y (+ (+ y x) t)))) t_1)))))
                      double code(double x, double y, double z, double t, double a, double b) {
                      	double t_1 = (a + z) - b;
                      	double tmp;
                      	if (y <= -1.5e-36) {
                      		tmp = t_1;
                      	} else if (y <= 2.05e-46) {
                      		tmp = fma(a, t, (z * x)) / (t + x);
                      	} else if (y <= 6.6e+175) {
                      		tmp = a - (b * (y / ((y + x) + t)));
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a, b)
                      	t_1 = Float64(Float64(a + z) - b)
                      	tmp = 0.0
                      	if (y <= -1.5e-36)
                      		tmp = t_1;
                      	elseif (y <= 2.05e-46)
                      		tmp = Float64(fma(a, t, Float64(z * x)) / Float64(t + x));
                      	elseif (y <= 6.6e+175)
                      		tmp = Float64(a - Float64(b * Float64(y / Float64(Float64(y + x) + t))));
                      	else
                      		tmp = t_1;
                      	end
                      	return tmp
                      end
                      
                      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -1.5e-36], t$95$1, If[LessEqual[y, 2.05e-46], N[(N[(a * t + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.6e+175], N[(a - N[(b * N[(y / N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := \left(a + z\right) - b\\
                      \mathbf{if}\;y \leq -1.5 \cdot 10^{-36}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;y \leq 2.05 \cdot 10^{-46}:\\
                      \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\
                      
                      \mathbf{elif}\;y \leq 6.6 \cdot 10^{+175}:\\
                      \;\;\;\;a - b \cdot \frac{y}{\left(y + x\right) + t}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if y < -1.5000000000000001e-36 or 6.6000000000000005e175 < y

                        1. Initial program 41.0%

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

                          \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                        3. Step-by-step derivation
                          1. lower--.f64N/A

                            \[\leadsto \left(a + z\right) - \color{blue}{b} \]
                          2. lower-+.f6474.1

                            \[\leadsto \left(a + z\right) - b \]
                        4. Applied rewrites74.1%

                          \[\leadsto \color{blue}{\left(a + z\right) - b} \]

                        if -1.5000000000000001e-36 < y < 2.05e-46

                        1. Initial program 76.7%

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

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

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

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

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

                            \[\leadsto \frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x} \]
                          5. lower-+.f6458.3

                            \[\leadsto \frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + \color{blue}{x}} \]
                        4. Applied rewrites58.3%

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

                        if 2.05e-46 < y < 6.6000000000000005e175

                        1. Initial program 59.9%

                          \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
                        2. Applied rewrites67.0%

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

                          \[\leadsto \color{blue}{a} - b \cdot \frac{y}{\left(y + x\right) + t} \]
                        4. Step-by-step derivation
                          1. Applied rewrites52.5%

                            \[\leadsto \color{blue}{a} - b \cdot \frac{y}{\left(y + x\right) + t} \]
                        5. Recombined 3 regimes into one program.
                        6. Add Preprocessing

                        Alternative 12: 63.4% accurate, 1.3× speedup?

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

                          1. Initial program 48.8%

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

                            \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                          3. Step-by-step derivation
                            1. lower--.f64N/A

                              \[\leadsto \left(a + z\right) - \color{blue}{b} \]
                            2. lower-+.f6467.7

                              \[\leadsto \left(a + z\right) - b \]
                          4. Applied rewrites67.7%

                            \[\leadsto \color{blue}{\left(a + z\right) - b} \]

                          if -1.5000000000000001e-36 < y < 9.99999999999999939e-99

                          1. Initial program 76.9%

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

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

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

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

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

                              \[\leadsto \frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x} \]
                            5. lower-+.f6459.7

                              \[\leadsto \frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + \color{blue}{x}} \]
                          4. Applied rewrites59.7%

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

                        Alternative 13: 59.9% accurate, 2.1× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a + z\right) - b\\ \mathbf{if}\;y \leq -5 \cdot 10^{+90}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 4.1 \cdot 10^{-44}:\\ \;\;\;\;a + z\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                        (FPCore (x y z t a b)
                         :precision binary64
                         (let* ((t_1 (- (+ a z) b)))
                           (if (<= y -5e+90) t_1 (if (<= y 4.1e-44) (+ a z) t_1))))
                        double code(double x, double y, double z, double t, double a, double b) {
                        	double t_1 = (a + z) - b;
                        	double tmp;
                        	if (y <= -5e+90) {
                        		tmp = t_1;
                        	} else if (y <= 4.1e-44) {
                        		tmp = a + z;
                        	} else {
                        		tmp = t_1;
                        	}
                        	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, a, b)
                        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), intent (in) :: a
                            real(8), intent (in) :: b
                            real(8) :: t_1
                            real(8) :: tmp
                            t_1 = (a + z) - b
                            if (y <= (-5d+90)) then
                                tmp = t_1
                            else if (y <= 4.1d-44) then
                                tmp = a + z
                            else
                                tmp = t_1
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double x, double y, double z, double t, double a, double b) {
                        	double t_1 = (a + z) - b;
                        	double tmp;
                        	if (y <= -5e+90) {
                        		tmp = t_1;
                        	} else if (y <= 4.1e-44) {
                        		tmp = a + z;
                        	} else {
                        		tmp = t_1;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t, a, b):
                        	t_1 = (a + z) - b
                        	tmp = 0
                        	if y <= -5e+90:
                        		tmp = t_1
                        	elif y <= 4.1e-44:
                        		tmp = a + z
                        	else:
                        		tmp = t_1
                        	return tmp
                        
                        function code(x, y, z, t, a, b)
                        	t_1 = Float64(Float64(a + z) - b)
                        	tmp = 0.0
                        	if (y <= -5e+90)
                        		tmp = t_1;
                        	elseif (y <= 4.1e-44)
                        		tmp = Float64(a + z);
                        	else
                        		tmp = t_1;
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t, a, b)
                        	t_1 = (a + z) - b;
                        	tmp = 0.0;
                        	if (y <= -5e+90)
                        		tmp = t_1;
                        	elseif (y <= 4.1e-44)
                        		tmp = a + z;
                        	else
                        		tmp = t_1;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -5e+90], t$95$1, If[LessEqual[y, 4.1e-44], N[(a + z), $MachinePrecision], t$95$1]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_1 := \left(a + z\right) - b\\
                        \mathbf{if}\;y \leq -5 \cdot 10^{+90}:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{elif}\;y \leq 4.1 \cdot 10^{-44}:\\
                        \;\;\;\;a + z\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_1\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if y < -5.0000000000000004e90 or 4.09999999999999992e-44 < y

                          1. Initial program 41.7%

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

                            \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                          3. Step-by-step derivation
                            1. lower--.f64N/A

                              \[\leadsto \left(a + z\right) - \color{blue}{b} \]
                            2. lower-+.f6473.1

                              \[\leadsto \left(a + z\right) - b \]
                          4. Applied rewrites73.1%

                            \[\leadsto \color{blue}{\left(a + z\right) - b} \]

                          if -5.0000000000000004e90 < y < 4.09999999999999992e-44

                          1. Initial program 75.7%

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

                            \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                          3. Step-by-step derivation
                            1. lower--.f64N/A

                              \[\leadsto \left(a + z\right) - \color{blue}{b} \]
                            2. lower-+.f6440.3

                              \[\leadsto \left(a + z\right) - b \]
                          4. Applied rewrites40.3%

                            \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                          5. Taylor expanded in b around 0

                            \[\leadsto a + \color{blue}{z} \]
                          6. Step-by-step derivation
                            1. lift-+.f6448.4

                              \[\leadsto a + z \]
                          7. Applied rewrites48.4%

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

                        Alternative 14: 52.9% accurate, 3.9× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 2.3 \cdot 10^{+176}:\\ \;\;\;\;a + z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
                        (FPCore (x y z t a b) :precision binary64 (if (<= t 2.3e+176) (+ a z) a))
                        double code(double x, double y, double z, double t, double a, double b) {
                        	double tmp;
                        	if (t <= 2.3e+176) {
                        		tmp = a + z;
                        	} else {
                        		tmp = a;
                        	}
                        	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, a, b)
                        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), intent (in) :: a
                            real(8), intent (in) :: b
                            real(8) :: tmp
                            if (t <= 2.3d+176) then
                                tmp = a + z
                            else
                                tmp = a
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double x, double y, double z, double t, double a, double b) {
                        	double tmp;
                        	if (t <= 2.3e+176) {
                        		tmp = a + z;
                        	} else {
                        		tmp = a;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t, a, b):
                        	tmp = 0
                        	if t <= 2.3e+176:
                        		tmp = a + z
                        	else:
                        		tmp = a
                        	return tmp
                        
                        function code(x, y, z, t, a, b)
                        	tmp = 0.0
                        	if (t <= 2.3e+176)
                        		tmp = Float64(a + z);
                        	else
                        		tmp = a;
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t, a, b)
                        	tmp = 0.0;
                        	if (t <= 2.3e+176)
                        		tmp = a + z;
                        	else
                        		tmp = a;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 2.3e+176], N[(a + z), $MachinePrecision], a]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;t \leq 2.3 \cdot 10^{+176}:\\
                        \;\;\;\;a + z\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;a\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if t < 2.29999999999999996e176

                          1. Initial program 61.8%

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

                            \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                          3. Step-by-step derivation
                            1. lower--.f64N/A

                              \[\leadsto \left(a + z\right) - \color{blue}{b} \]
                            2. lower-+.f6457.7

                              \[\leadsto \left(a + z\right) - b \]
                          4. Applied rewrites57.7%

                            \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                          5. Taylor expanded in b around 0

                            \[\leadsto a + \color{blue}{z} \]
                          6. Step-by-step derivation
                            1. lift-+.f6452.7

                              \[\leadsto a + z \]
                          7. Applied rewrites52.7%

                            \[\leadsto a + \color{blue}{z} \]

                          if 2.29999999999999996e176 < t

                          1. Initial program 44.2%

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

                            \[\leadsto \color{blue}{a} \]
                          3. Step-by-step derivation
                            1. Applied rewrites54.9%

                              \[\leadsto \color{blue}{a} \]
                          4. Recombined 2 regimes into one program.
                          5. Add Preprocessing

                          Alternative 15: 48.0% accurate, 2.6× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.3 \cdot 10^{-75}:\\ \;\;\;\;a - b\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{+55}:\\ \;\;\;\;z - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
                          (FPCore (x y z t a b)
                           :precision binary64
                           (if (<= a -1.3e-75) (- a b) (if (<= a 4.2e+55) (- z b) a)))
                          double code(double x, double y, double z, double t, double a, double b) {
                          	double tmp;
                          	if (a <= -1.3e-75) {
                          		tmp = a - b;
                          	} else if (a <= 4.2e+55) {
                          		tmp = z - b;
                          	} else {
                          		tmp = a;
                          	}
                          	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, a, b)
                          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), intent (in) :: a
                              real(8), intent (in) :: b
                              real(8) :: tmp
                              if (a <= (-1.3d-75)) then
                                  tmp = a - b
                              else if (a <= 4.2d+55) then
                                  tmp = z - b
                              else
                                  tmp = a
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z, double t, double a, double b) {
                          	double tmp;
                          	if (a <= -1.3e-75) {
                          		tmp = a - b;
                          	} else if (a <= 4.2e+55) {
                          		tmp = z - b;
                          	} else {
                          		tmp = a;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a, b):
                          	tmp = 0
                          	if a <= -1.3e-75:
                          		tmp = a - b
                          	elif a <= 4.2e+55:
                          		tmp = z - b
                          	else:
                          		tmp = a
                          	return tmp
                          
                          function code(x, y, z, t, a, b)
                          	tmp = 0.0
                          	if (a <= -1.3e-75)
                          		tmp = Float64(a - b);
                          	elseif (a <= 4.2e+55)
                          		tmp = Float64(z - b);
                          	else
                          		tmp = a;
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t, a, b)
                          	tmp = 0.0;
                          	if (a <= -1.3e-75)
                          		tmp = a - b;
                          	elseif (a <= 4.2e+55)
                          		tmp = z - b;
                          	else
                          		tmp = a;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.3e-75], N[(a - b), $MachinePrecision], If[LessEqual[a, 4.2e+55], N[(z - b), $MachinePrecision], a]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;a \leq -1.3 \cdot 10^{-75}:\\
                          \;\;\;\;a - b\\
                          
                          \mathbf{elif}\;a \leq 4.2 \cdot 10^{+55}:\\
                          \;\;\;\;z - b\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;a\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if a < -1.3e-75

                            1. Initial program 53.0%

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

                              \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                            3. Step-by-step derivation
                              1. lower--.f64N/A

                                \[\leadsto \left(a + z\right) - \color{blue}{b} \]
                              2. lower-+.f6457.8

                                \[\leadsto \left(a + z\right) - b \]
                            4. Applied rewrites57.8%

                              \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                            5. Taylor expanded in z around 0

                              \[\leadsto a - b \]
                            6. Step-by-step derivation
                              1. Applied rewrites46.0%

                                \[\leadsto a - b \]

                              if -1.3e-75 < a < 4.2000000000000001e55

                              1. Initial program 70.5%

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

                                \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                              3. Step-by-step derivation
                                1. lower--.f64N/A

                                  \[\leadsto \left(a + z\right) - \color{blue}{b} \]
                                2. lower-+.f6453.0

                                  \[\leadsto \left(a + z\right) - b \]
                              4. Applied rewrites53.0%

                                \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                              5. Taylor expanded in z around inf

                                \[\leadsto z - b \]
                              6. Step-by-step derivation
                                1. Applied rewrites48.1%

                                  \[\leadsto z - b \]

                                if 4.2000000000000001e55 < a

                                1. Initial program 44.9%

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

                                  \[\leadsto \color{blue}{a} \]
                                3. Step-by-step derivation
                                  1. Applied rewrites50.6%

                                    \[\leadsto \color{blue}{a} \]
                                4. Recombined 3 regimes into one program.
                                5. Add Preprocessing

                                Alternative 16: 44.8% accurate, 3.4× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.45 \cdot 10^{-100}:\\ \;\;\;\;a - b\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+56}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
                                (FPCore (x y z t a b)
                                 :precision binary64
                                 (if (<= a -1.45e-100) (- a b) (if (<= a 2.6e+56) z a)))
                                double code(double x, double y, double z, double t, double a, double b) {
                                	double tmp;
                                	if (a <= -1.45e-100) {
                                		tmp = a - b;
                                	} else if (a <= 2.6e+56) {
                                		tmp = z;
                                	} else {
                                		tmp = a;
                                	}
                                	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, a, b)
                                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), intent (in) :: a
                                    real(8), intent (in) :: b
                                    real(8) :: tmp
                                    if (a <= (-1.45d-100)) then
                                        tmp = a - b
                                    else if (a <= 2.6d+56) then
                                        tmp = z
                                    else
                                        tmp = a
                                    end if
                                    code = tmp
                                end function
                                
                                public static double code(double x, double y, double z, double t, double a, double b) {
                                	double tmp;
                                	if (a <= -1.45e-100) {
                                		tmp = a - b;
                                	} else if (a <= 2.6e+56) {
                                		tmp = z;
                                	} else {
                                		tmp = a;
                                	}
                                	return tmp;
                                }
                                
                                def code(x, y, z, t, a, b):
                                	tmp = 0
                                	if a <= -1.45e-100:
                                		tmp = a - b
                                	elif a <= 2.6e+56:
                                		tmp = z
                                	else:
                                		tmp = a
                                	return tmp
                                
                                function code(x, y, z, t, a, b)
                                	tmp = 0.0
                                	if (a <= -1.45e-100)
                                		tmp = Float64(a - b);
                                	elseif (a <= 2.6e+56)
                                		tmp = z;
                                	else
                                		tmp = a;
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(x, y, z, t, a, b)
                                	tmp = 0.0;
                                	if (a <= -1.45e-100)
                                		tmp = a - b;
                                	elseif (a <= 2.6e+56)
                                		tmp = z;
                                	else
                                		tmp = a;
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.45e-100], N[(a - b), $MachinePrecision], If[LessEqual[a, 2.6e+56], z, a]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;a \leq -1.45 \cdot 10^{-100}:\\
                                \;\;\;\;a - b\\
                                
                                \mathbf{elif}\;a \leq 2.6 \cdot 10^{+56}:\\
                                \;\;\;\;z\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;a\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 3 regimes
                                2. if a < -1.44999999999999988e-100

                                  1. Initial program 53.9%

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

                                    \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                                  3. Step-by-step derivation
                                    1. lower--.f64N/A

                                      \[\leadsto \left(a + z\right) - \color{blue}{b} \]
                                    2. lower-+.f6457.1

                                      \[\leadsto \left(a + z\right) - b \]
                                  4. Applied rewrites57.1%

                                    \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                                  5. Taylor expanded in z around 0

                                    \[\leadsto a - b \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites44.7%

                                      \[\leadsto a - b \]

                                    if -1.44999999999999988e-100 < a < 2.60000000000000011e56

                                    1. Initial program 70.6%

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

                                      \[\leadsto \color{blue}{z} \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites42.3%

                                        \[\leadsto \color{blue}{z} \]

                                      if 2.60000000000000011e56 < a

                                      1. Initial program 44.9%

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

                                        \[\leadsto \color{blue}{a} \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites50.7%

                                          \[\leadsto \color{blue}{a} \]
                                      4. Recombined 3 regimes into one program.
                                      5. Add Preprocessing

                                      Alternative 17: 44.7% accurate, 3.4× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.2 \cdot 10^{-75}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+56}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
                                      (FPCore (x y z t a b)
                                       :precision binary64
                                       (if (<= a -1.2e-75) a (if (<= a 2.6e+56) z a)))
                                      double code(double x, double y, double z, double t, double a, double b) {
                                      	double tmp;
                                      	if (a <= -1.2e-75) {
                                      		tmp = a;
                                      	} else if (a <= 2.6e+56) {
                                      		tmp = z;
                                      	} else {
                                      		tmp = a;
                                      	}
                                      	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, a, b)
                                      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), intent (in) :: a
                                          real(8), intent (in) :: b
                                          real(8) :: tmp
                                          if (a <= (-1.2d-75)) then
                                              tmp = a
                                          else if (a <= 2.6d+56) then
                                              tmp = z
                                          else
                                              tmp = a
                                          end if
                                          code = tmp
                                      end function
                                      
                                      public static double code(double x, double y, double z, double t, double a, double b) {
                                      	double tmp;
                                      	if (a <= -1.2e-75) {
                                      		tmp = a;
                                      	} else if (a <= 2.6e+56) {
                                      		tmp = z;
                                      	} else {
                                      		tmp = a;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      def code(x, y, z, t, a, b):
                                      	tmp = 0
                                      	if a <= -1.2e-75:
                                      		tmp = a
                                      	elif a <= 2.6e+56:
                                      		tmp = z
                                      	else:
                                      		tmp = a
                                      	return tmp
                                      
                                      function code(x, y, z, t, a, b)
                                      	tmp = 0.0
                                      	if (a <= -1.2e-75)
                                      		tmp = a;
                                      	elseif (a <= 2.6e+56)
                                      		tmp = z;
                                      	else
                                      		tmp = a;
                                      	end
                                      	return tmp
                                      end
                                      
                                      function tmp_2 = code(x, y, z, t, a, b)
                                      	tmp = 0.0;
                                      	if (a <= -1.2e-75)
                                      		tmp = a;
                                      	elseif (a <= 2.6e+56)
                                      		tmp = z;
                                      	else
                                      		tmp = a;
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.2e-75], a, If[LessEqual[a, 2.6e+56], z, a]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      \mathbf{if}\;a \leq -1.2 \cdot 10^{-75}:\\
                                      \;\;\;\;a\\
                                      
                                      \mathbf{elif}\;a \leq 2.6 \cdot 10^{+56}:\\
                                      \;\;\;\;z\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;a\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if a < -1.2000000000000001e-75 or 2.60000000000000011e56 < a

                                        1. Initial program 49.8%

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

                                          \[\leadsto \color{blue}{a} \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites47.0%

                                            \[\leadsto \color{blue}{a} \]

                                          if -1.2000000000000001e-75 < a < 2.60000000000000011e56

                                          1. Initial program 70.5%

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

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

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

                                          Alternative 18: 32.0% accurate, 29.5× speedup?

                                          \[\begin{array}{l} \\ a \end{array} \]
                                          (FPCore (x y z t a b) :precision binary64 a)
                                          double code(double x, double y, double z, double t, double a, double b) {
                                          	return a;
                                          }
                                          
                                          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, a, b)
                                          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), intent (in) :: a
                                              real(8), intent (in) :: b
                                              code = a
                                          end function
                                          
                                          public static double code(double x, double y, double z, double t, double a, double b) {
                                          	return a;
                                          }
                                          
                                          def code(x, y, z, t, a, b):
                                          	return a
                                          
                                          function code(x, y, z, t, a, b)
                                          	return a
                                          end
                                          
                                          function tmp = code(x, y, z, t, a, b)
                                          	tmp = a;
                                          end
                                          
                                          code[x_, y_, z_, t_, a_, b_] := a
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          a
                                          \end{array}
                                          
                                          Derivation
                                          1. Initial program 59.9%

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

                                            \[\leadsto \color{blue}{a} \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites32.0%

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

                                            Reproduce

                                            ?
                                            herbie shell --seed 2025114 
                                            (FPCore (x y z t a b)
                                              :name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
                                              :precision binary64
                                              (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))