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

Percentage Accurate: 59.7% → 93.9%
Time: 7.8s
Alternatives: 21
Speedup: 1.2×

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 21 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.7% 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.9% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\
t_2 := \left(t + y\right) \cdot \left(t + y\right)\\
t_3 := \frac{z}{t + y}\\
t_4 := t + \left(x + y\right)\\
t_5 := \frac{y}{y + x}\\
\mathbf{if}\;y \leq -1.02 \cdot 10^{+145}:\\
\;\;\;\;z + \left(\mathsf{fma}\left(\mathsf{fma}\left(b, t\_1, \frac{a}{y + x}\right) - \mathsf{fma}\left(a, t\_1, \frac{z}{y + x}\right), t, a \cdot t\_5\right) - b \cdot t\_5\right)\\

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

\mathbf{else}:\\
\;\;\;\;\left(a + \mathsf{fma}\left(\mathsf{fma}\left(b, \frac{y}{t\_2}, t\_3\right) - \mathsf{fma}\left(y, \frac{z}{t\_2}, \frac{a}{t + y}\right), x, y \cdot t\_3\right)\right) - b \cdot \frac{y}{t + y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.02e145

    1. Initial program 59.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 t around 0

      \[\leadsto \color{blue}{\left(z + \left(t \cdot \left(\left(\frac{a}{x + y} + \frac{b \cdot y}{{\left(x + y\right)}^{2}}\right) - \left(\frac{z}{x + y} + \frac{a \cdot y}{{\left(x + y\right)}^{2}}\right)\right) + \frac{a \cdot y}{x + y}\right)\right) - \frac{b \cdot y}{x + y}} \]
    3. Step-by-step derivation
      1. associate--l+N/A

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

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

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

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

    if -1.02e145 < y < 1.80000000000000001e199

    1. Initial program 59.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 rewrites71.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-+.f6487.3

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

      \[\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) \]

    if 1.80000000000000001e199 < y

    1. Initial program 59.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 x around 0

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

        \[\leadsto \left(a + \left(x \cdot \left(\left(\frac{z}{t + y} + \frac{b \cdot y}{{\left(t + y\right)}^{2}}\right) - \left(\frac{a}{t + y} + \frac{y \cdot z}{{\left(t + y\right)}^{2}}\right)\right) + \frac{y \cdot z}{t + y}\right)\right) - \color{blue}{\frac{b \cdot y}{t + y}} \]
    4. Applied rewrites64.9%

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

Alternative 2: 93.1% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;y \leq 7.5 \cdot 10^{+159}:\\
\;\;\;\;\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\_4\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.02e145 or 7.4999999999999997e159 < y

    1. Initial program 59.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 t around 0

      \[\leadsto \color{blue}{\left(z + \left(t \cdot \left(\left(\frac{a}{x + y} + \frac{b \cdot y}{{\left(x + y\right)}^{2}}\right) - \left(\frac{z}{x + y} + \frac{a \cdot y}{{\left(x + y\right)}^{2}}\right)\right) + \frac{a \cdot y}{x + y}\right)\right) - \frac{b \cdot y}{x + y}} \]
    3. Step-by-step derivation
      1. associate--l+N/A

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

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

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

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

    if -1.02e145 < y < 7.4999999999999997e159

    1. Initial program 59.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 rewrites71.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-+.f6487.3

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

      \[\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: 91.2% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 10^{+300}:\\
\;\;\;\;\mathsf{fma}\left(t\_4, z, \frac{t\_1 - b \cdot y}{t\_3}\right)\\

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


\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 1.0000000000000001e300 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 59.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 rewrites71.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-+.f6487.3

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

      \[\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-*.f6478.1

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

      \[\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)) < 1.0000000000000001e300

    1. Initial program 59.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 rewrites71.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. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 4: 91.0% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \left(t + y\right) \cdot a\\
t_2 := \left(x + t\right) + y\\
t_3 := \frac{\left(\left(x + y\right) \cdot z + t\_1\right) - y \cdot b}{t\_2}\\
t_4 := \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\_3 \leq -\infty:\\
\;\;\;\;t\_4\\

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

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


\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 1.0000000000000001e300 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 59.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 rewrites71.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-+.f6487.3

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

      \[\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-*.f6478.1

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

      \[\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)) < 1.0000000000000001e300

    1. Initial program 59.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. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 89.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \left(x + y\right)\\ \mathbf{if}\;y \leq -4.9 \cdot 10^{+219}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, \mathsf{fma}\left(-1, \frac{b \cdot y}{t\_1}, a \cdot \frac{t + y}{t\_1}\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ t (+ x y))))
   (if (<= y -4.9e+219)
     (- (+ a z) b)
     (fma
      (/ (+ y x) (+ (+ y x) t))
      z
      (fma -1.0 (/ (* b y) t_1) (* a (/ (+ t y) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t + (x + y);
	double tmp;
	if (y <= -4.9e+219) {
		tmp = (a + z) - b;
	} else {
		tmp = fma(((y + x) / ((y + x) + t)), z, fma(-1.0, ((b * y) / t_1), (a * ((t + y) / t_1))));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(t + Float64(x + y))
	tmp = 0.0
	if (y <= -4.9e+219)
		tmp = Float64(Float64(a + z) - b);
	else
		tmp = fma(Float64(Float64(y + x) / Float64(Float64(y + x) + t)), z, fma(-1.0, Float64(Float64(b * y) / t_1), Float64(a * Float64(Float64(t + y) / t_1))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.9e+219], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], 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$1), $MachinePrecision] + N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, \mathsf{fma}\left(-1, \frac{b \cdot y}{t\_1}, a \cdot \frac{t + y}{t\_1}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.90000000000000003e219

    1. Initial program 59.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-+.f6456.2

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

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

    if -4.90000000000000003e219 < y

    1. Initial program 59.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 rewrites71.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-+.f6487.3

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

      \[\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 6: 87.8% accurate, 0.3× speedup?

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

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

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

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


\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 1.0000000000000001e300 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 59.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 rewrites71.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-+.f6487.3

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

      \[\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-*.f6478.1

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

      \[\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) \]
    9. Taylor expanded in x around inf

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{1}, z, a \cdot \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)) < 1.0000000000000001e300

      1. Initial program 59.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. Step-by-step derivation
        1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 7: 87.7% 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(1, z, a \cdot \frac{t + y}{t + \left(x + y\right)}\right)\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+296}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 10^{+300}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, \mathsf{fma}\left(\left(a + z\right) - b, 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 1.0 z (* a (/ (+ t y) (+ t (+ x y)))))))
       (if (<= t_2 -1e+296)
         t_3
         (if (<= t_2 1e+300)
           (/ (fma a t (fma (- (+ a z) 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(1.0, z, (a * ((t + y) / (t + (x + y)))));
    	double tmp;
    	if (t_2 <= -1e+296) {
    		tmp = t_3;
    	} else if (t_2 <= 1e+300) {
    		tmp = fma(a, t, fma(((a + z) - 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(1.0, z, Float64(a * Float64(Float64(t + y) / Float64(t + Float64(x + y)))))
    	tmp = 0.0
    	if (t_2 <= -1e+296)
    		tmp = t_3;
    	elseif (t_2 <= 1e+300)
    		tmp = Float64(fma(a, t, fma(Float64(Float64(a + z) - 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[(1.0 * z + N[(a * N[(N[(t + y), $MachinePrecision] / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+296], t$95$3, If[LessEqual[t$95$2, 1e+300], N[(N[(a * t + N[(N[(N[(a + z), $MachinePrecision] - b), $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(1, z, a \cdot \frac{t + y}{t + \left(x + y\right)}\right)\\
    \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+296}:\\
    \;\;\;\;t\_3\\
    
    \mathbf{elif}\;t\_2 \leq 10^{+300}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(a, t, \mathsf{fma}\left(\left(a + z\right) - b, 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)) < -9.99999999999999981e295 or 1.0000000000000001e300 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

      1. Initial program 59.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 rewrites71.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-+.f6487.3

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

        \[\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-*.f6478.1

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

        \[\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) \]
      9. Taylor expanded in x around inf

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

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

        if -9.99999999999999981e295 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.0000000000000001e300

        1. Initial program 59.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 \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-*.f6459.9

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

          \[\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} \]
      11. Recombined 2 regimes into one program.
      12. Add Preprocessing

      Alternative 8: 75.2% accurate, 0.2× 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 -1 \cdot 10^{+229}:\\ \;\;\;\;\mathsf{fma}\left(1, z, a \cdot \frac{t + y}{t + \left(x + y\right)}\right)\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{+52}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t + y, a, z \cdot y\right) - b \cdot y}{t + y}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+194}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t + y, a, \left(y + x\right) \cdot z\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 -1e+229)
           (fma 1.0 z (* a (/ (+ t y) (+ t (+ x y)))))
           (if (<= t_2 -1e+52)
             (/ (- (fma (+ t y) a (* z y)) (* b y)) (+ t y))
             (if (<= t_2 2e+194)
               (/ (fma (+ t y) a (* (+ y x) z)) 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 <= -1e+229) {
      		tmp = fma(1.0, z, (a * ((t + y) / (t + (x + y)))));
      	} else if (t_2 <= -1e+52) {
      		tmp = (fma((t + y), a, (z * y)) - (b * y)) / (t + y);
      	} else if (t_2 <= 2e+194) {
      		tmp = fma((t + y), a, ((y + x) * z)) / 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 <= -1e+229)
      		tmp = fma(1.0, z, Float64(a * Float64(Float64(t + y) / Float64(t + Float64(x + y)))));
      	elseif (t_2 <= -1e+52)
      		tmp = Float64(Float64(fma(Float64(t + y), a, Float64(z * y)) - Float64(b * y)) / Float64(t + y));
      	elseif (t_2 <= 2e+194)
      		tmp = Float64(fma(Float64(t + y), a, Float64(Float64(y + x) * z)) / 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, -1e+229], N[(1.0 * z + N[(a * N[(N[(t + y), $MachinePrecision] / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e+52], N[(N[(N[(N[(t + y), $MachinePrecision] * a + N[(z * y), $MachinePrecision]), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+194], N[(N[(N[(t + y), $MachinePrecision] * a + N[(N[(y + x), $MachinePrecision] * z), $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 -1 \cdot 10^{+229}:\\
      \;\;\;\;\mathsf{fma}\left(1, z, a \cdot \frac{t + y}{t + \left(x + y\right)}\right)\\
      
      \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{+52}:\\
      \;\;\;\;\frac{\mathsf{fma}\left(t + y, a, z \cdot y\right) - b \cdot y}{t + y}\\
      
      \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+194}:\\
      \;\;\;\;\frac{\mathsf{fma}\left(t + y, a, \left(y + x\right) \cdot z\right)}{t\_1}\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(a + z\right) - b\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -9.9999999999999999e228

        1. Initial program 59.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 rewrites71.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-+.f6487.3

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

          \[\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-*.f6478.1

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

          \[\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) \]
        9. Taylor expanded in x around inf

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

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

          if -9.9999999999999999e228 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -9.9999999999999999e51

          1. Initial program 59.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 x around 0

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\mathsf{fma}\left(t + y, a, z \cdot y\right) - b \cdot y}{t + y} \]
            9. lift-+.f6439.7

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

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

          if -9.9999999999999999e51 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.99999999999999989e194

          1. Initial program 59.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 b around 0

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

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

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

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

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

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

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

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

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

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

          1. Initial program 59.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-+.f6456.2

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

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

        Alternative 9: 73.9% 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(1, z, a \cdot \frac{t + y}{t + \left(x + y\right)}\right)\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+194}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t + y, a, \left(y + x\right) \cdot z\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 1.0 z (* a (/ (+ t y) (+ t (+ x y)))))
             (if (<= t_2 2e+194)
               (/ (fma (+ t y) a (* (+ y x) z)) 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(1.0, z, (a * ((t + y) / (t + (x + y)))));
        	} else if (t_2 <= 2e+194) {
        		tmp = fma((t + y), a, ((y + x) * z)) / 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(1.0, z, Float64(a * Float64(Float64(t + y) / Float64(t + Float64(x + y)))));
        	elseif (t_2 <= 2e+194)
        		tmp = Float64(fma(Float64(t + y), a, Float64(Float64(y + x) * z)) / 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[(1.0 * z + N[(a * N[(N[(t + y), $MachinePrecision] / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+194], N[(N[(N[(t + y), $MachinePrecision] * a + N[(N[(y + x), $MachinePrecision] * z), $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(1, z, a \cdot \frac{t + y}{t + \left(x + y\right)}\right)\\
        
        \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+194}:\\
        \;\;\;\;\frac{\mathsf{fma}\left(t + y, a, \left(y + x\right) \cdot z\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 59.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 rewrites71.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-+.f6487.3

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

            \[\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-*.f6478.1

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

            \[\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) \]
          9. Taylor expanded in x around inf

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

              \[\leadsto \mathsf{fma}\left(\color{blue}{1}, z, a \cdot \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)) < 1.99999999999999989e194

            1. Initial program 59.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 b around 0

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

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

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

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

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

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

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

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

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

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

            1. Initial program 59.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-+.f6456.2

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

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

          Alternative 10: 71.8% accurate, 1.1× speedup?

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

            1. Initial program 59.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 rewrites71.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-+.f6487.3

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

              \[\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-*.f6478.1

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

              \[\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) \]
            9. Taylor expanded in x around inf

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

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

              if -6.5000000000000001e39 < a < 6.1999999999999996e96

              1. Initial program 59.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 rewrites71.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 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 rewrites65.5%

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

              Alternative 11: 70.8% accurate, 1.1× speedup?

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

                1. Initial program 59.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 x around 0

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{\mathsf{fma}\left(t + y, a, z \cdot y\right) - b \cdot y}{t + y} \]
                  9. lift-+.f6439.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto b \cdot \mathsf{fma}\left(-1, \frac{y}{t + y}, \frac{a}{b}\right) \]
                9. Step-by-step derivation
                  1. lift-/.f6440.5

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

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

                if -9.9999999999999996e216 < b < 1.49999999999999993e80

                1. Initial program 59.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 rewrites71.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 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 rewrites65.5%

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

                Alternative 12: 68.8% accurate, 1.2× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a + z\right) - b\\ \mathbf{if}\;y \leq -6.2 \cdot 10^{+30}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{+20}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, a\right)\\ \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 -6.2e+30)
                     t_1
                     (if (<= y 4.8e+20) (fma (/ (+ y x) (+ (+ y x) t)) z a) 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 <= -6.2e+30) {
                		tmp = t_1;
                	} else if (y <= 4.8e+20) {
                		tmp = fma(((y + x) / ((y + x) + t)), z, a);
                	} 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 <= -6.2e+30)
                		tmp = t_1;
                	elseif (y <= 4.8e+20)
                		tmp = fma(Float64(Float64(y + x) / Float64(Float64(y + x) + t)), z, a);
                	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, -6.2e+30], t$95$1, If[LessEqual[y, 4.8e+20], N[(N[(N[(y + x), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] * z + a), $MachinePrecision], t$95$1]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \left(a + z\right) - b\\
                \mathbf{if}\;y \leq -6.2 \cdot 10^{+30}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;y \leq 4.8 \cdot 10^{+20}:\\
                \;\;\;\;\mathsf{fma}\left(\frac{y + x}{\left(y + x\right) + t}, z, a\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if y < -6.1999999999999995e30 or 4.8e20 < y

                  1. Initial program 59.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-+.f6456.2

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

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

                  if -6.1999999999999995e30 < y < 4.8e20

                  1. Initial program 59.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 rewrites71.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 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 rewrites65.5%

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

                  Alternative 13: 66.6% accurate, 0.4× 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(a + z\right) - b\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+52}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{+164}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \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 (- (+ a z) b)))
                     (if (<= t_1 -1e+52)
                       t_2
                       (if (<= t_1 1e+164) (/ (fma a t (* z x)) (+ t x)) t_2))))
                  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 = (a + z) - b;
                  	double tmp;
                  	if (t_1 <= -1e+52) {
                  		tmp = t_2;
                  	} else if (t_1 <= 1e+164) {
                  		tmp = fma(a, t, (z * x)) / (t + x);
                  	} else {
                  		tmp = t_2;
                  	}
                  	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(a + z) - b)
                  	tmp = 0.0
                  	if (t_1 <= -1e+52)
                  		tmp = t_2;
                  	elseif (t_1 <= 1e+164)
                  		tmp = Float64(fma(a, t, Float64(z * x)) / Float64(t + x));
                  	else
                  		tmp = t_2;
                  	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[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+52], t$95$2, If[LessEqual[t$95$1, 1e+164], N[(N[(a * t + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
                  
                  \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(a + z\right) - b\\
                  \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+52}:\\
                  \;\;\;\;t\_2\\
                  
                  \mathbf{elif}\;t\_1 \leq 10^{+164}:\\
                  \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_2\\
                  
                  
                  \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)) < -9.9999999999999999e51 or 1e164 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

                    1. Initial program 59.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-+.f6456.2

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

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

                    if -9.9999999999999999e51 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1e164

                    1. Initial program 59.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-+.f6440.3

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

                      \[\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 14: 59.3% accurate, 1.5× speedup?

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

                    1. Initial program 59.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 rewrites71.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 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-+.f6439.9

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

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

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

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

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

                          \[\leadsto z \cdot \frac{x}{t + x} \]

                        if -1.59999999999999999e90 < x < 4.20000000000000009e36

                        1. Initial program 59.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-+.f6456.2

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

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

                        if 4.20000000000000009e36 < x

                        1. Initial program 59.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-+.f6440.3

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

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

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

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

                            \[\leadsto z + t \cdot \left(\frac{a}{x} - \color{blue}{\frac{z}{x}}\right) \]
                          3. sub-divN/A

                            \[\leadsto z + t \cdot \frac{a - z}{x} \]
                          4. lower-/.f64N/A

                            \[\leadsto z + t \cdot \frac{a - z}{x} \]
                          5. lower--.f6429.2

                            \[\leadsto z + t \cdot \frac{a - z}{x} \]
                        7. Applied rewrites29.2%

                          \[\leadsto z + \color{blue}{t \cdot \frac{a - z}{x}} \]
                      4. Recombined 3 regimes into one program.
                      5. Add Preprocessing

                      Alternative 15: 59.2% accurate, 1.7× speedup?

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

                        1. Initial program 59.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 rewrites71.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 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-+.f6439.9

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

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

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

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

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

                              \[\leadsto z \cdot \frac{x}{t + x} \]

                            if -1.59999999999999999e90 < x < 3.79999999999999978e86

                            1. Initial program 59.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-+.f6456.2

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

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

                          Alternative 16: 59.0% accurate, 2.1× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4.5 \cdot 10^{+122}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 9 \cdot 10^{+213}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \end{array} \]
                          (FPCore (x y z t a b)
                           :precision binary64
                           (if (<= x -4.5e+122) z (if (<= x 9e+213) (- (+ a z) b) z)))
                          double code(double x, double y, double z, double t, double a, double b) {
                          	double tmp;
                          	if (x <= -4.5e+122) {
                          		tmp = z;
                          	} else if (x <= 9e+213) {
                          		tmp = (a + z) - b;
                          	} else {
                          		tmp = z;
                          	}
                          	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 (x <= (-4.5d+122)) then
                                  tmp = z
                              else if (x <= 9d+213) then
                                  tmp = (a + z) - b
                              else
                                  tmp = z
                              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 (x <= -4.5e+122) {
                          		tmp = z;
                          	} else if (x <= 9e+213) {
                          		tmp = (a + z) - b;
                          	} else {
                          		tmp = z;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a, b):
                          	tmp = 0
                          	if x <= -4.5e+122:
                          		tmp = z
                          	elif x <= 9e+213:
                          		tmp = (a + z) - b
                          	else:
                          		tmp = z
                          	return tmp
                          
                          function code(x, y, z, t, a, b)
                          	tmp = 0.0
                          	if (x <= -4.5e+122)
                          		tmp = z;
                          	elseif (x <= 9e+213)
                          		tmp = Float64(Float64(a + z) - b);
                          	else
                          		tmp = z;
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t, a, b)
                          	tmp = 0.0;
                          	if (x <= -4.5e+122)
                          		tmp = z;
                          	elseif (x <= 9e+213)
                          		tmp = (a + z) - b;
                          	else
                          		tmp = z;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -4.5e+122], z, If[LessEqual[x, 9e+213], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], z]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;x \leq -4.5 \cdot 10^{+122}:\\
                          \;\;\;\;z\\
                          
                          \mathbf{elif}\;x \leq 9 \cdot 10^{+213}:\\
                          \;\;\;\;\left(a + z\right) - b\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;z\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if x < -4.49999999999999997e122 or 9.0000000000000003e213 < x

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

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

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

                              if -4.49999999999999997e122 < x < 9.0000000000000003e213

                              1. Initial program 59.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-+.f6456.2

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

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

                            Alternative 17: 51.5% accurate, 2.6× speedup?

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

                              1. Initial program 59.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-+.f6456.2

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

                                \[\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.3

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

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

                              if -3.1e125 < a < 1.45e19

                              1. Initial program 59.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-+.f6456.2

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

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

                                  \[\leadsto z - b \]
                              7. Recombined 2 regimes into one program.
                              8. Add Preprocessing

                              Alternative 18: 48.4% accurate, 2.6× speedup?

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

                                1. Initial program 59.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-+.f6456.2

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

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

                                    \[\leadsto a - b \]

                                  if -2.95e169 < a < 1.7e20

                                  1. Initial program 59.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-+.f6456.2

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

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

                                      \[\leadsto z - b \]

                                    if 1.7e20 < a

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

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

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

                                    Alternative 19: 48.1% accurate, 2.6× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{+69}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 0.0052:\\ \;\;\;\;a - b\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \end{array} \]
                                    (FPCore (x y z t a b)
                                     :precision binary64
                                     (if (<= x -9.5e+69) z (if (<= x 0.0052) (- a b) z)))
                                    double code(double x, double y, double z, double t, double a, double b) {
                                    	double tmp;
                                    	if (x <= -9.5e+69) {
                                    		tmp = z;
                                    	} else if (x <= 0.0052) {
                                    		tmp = a - b;
                                    	} else {
                                    		tmp = z;
                                    	}
                                    	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 (x <= (-9.5d+69)) then
                                            tmp = z
                                        else if (x <= 0.0052d0) then
                                            tmp = a - b
                                        else
                                            tmp = z
                                        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 (x <= -9.5e+69) {
                                    		tmp = z;
                                    	} else if (x <= 0.0052) {
                                    		tmp = a - b;
                                    	} else {
                                    		tmp = z;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(x, y, z, t, a, b):
                                    	tmp = 0
                                    	if x <= -9.5e+69:
                                    		tmp = z
                                    	elif x <= 0.0052:
                                    		tmp = a - b
                                    	else:
                                    		tmp = z
                                    	return tmp
                                    
                                    function code(x, y, z, t, a, b)
                                    	tmp = 0.0
                                    	if (x <= -9.5e+69)
                                    		tmp = z;
                                    	elseif (x <= 0.0052)
                                    		tmp = Float64(a - b);
                                    	else
                                    		tmp = z;
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(x, y, z, t, a, b)
                                    	tmp = 0.0;
                                    	if (x <= -9.5e+69)
                                    		tmp = z;
                                    	elseif (x <= 0.0052)
                                    		tmp = a - b;
                                    	else
                                    		tmp = z;
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -9.5e+69], z, If[LessEqual[x, 0.0052], N[(a - b), $MachinePrecision], z]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;x \leq -9.5 \cdot 10^{+69}:\\
                                    \;\;\;\;z\\
                                    
                                    \mathbf{elif}\;x \leq 0.0052:\\
                                    \;\;\;\;a - b\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;z\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if x < -9.4999999999999995e69 or 0.0051999999999999998 < x

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

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

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

                                        if -9.4999999999999995e69 < x < 0.0051999999999999998

                                        1. Initial program 59.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-+.f6456.2

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

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

                                            \[\leadsto a - b \]
                                        7. Recombined 2 regimes into one program.
                                        8. Add Preprocessing

                                        Alternative 20: 43.9% accurate, 3.4× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.4 \cdot 10^{+167}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 8.7 \cdot 10^{+14}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
                                        (FPCore (x y z t a b)
                                         :precision binary64
                                         (if (<= a -2.4e+167) a (if (<= a 8.7e+14) z a)))
                                        double code(double x, double y, double z, double t, double a, double b) {
                                        	double tmp;
                                        	if (a <= -2.4e+167) {
                                        		tmp = a;
                                        	} else if (a <= 8.7e+14) {
                                        		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 <= (-2.4d+167)) then
                                                tmp = a
                                            else if (a <= 8.7d+14) 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 <= -2.4e+167) {
                                        		tmp = a;
                                        	} else if (a <= 8.7e+14) {
                                        		tmp = z;
                                        	} else {
                                        		tmp = a;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        def code(x, y, z, t, a, b):
                                        	tmp = 0
                                        	if a <= -2.4e+167:
                                        		tmp = a
                                        	elif a <= 8.7e+14:
                                        		tmp = z
                                        	else:
                                        		tmp = a
                                        	return tmp
                                        
                                        function code(x, y, z, t, a, b)
                                        	tmp = 0.0
                                        	if (a <= -2.4e+167)
                                        		tmp = a;
                                        	elseif (a <= 8.7e+14)
                                        		tmp = z;
                                        	else
                                        		tmp = a;
                                        	end
                                        	return tmp
                                        end
                                        
                                        function tmp_2 = code(x, y, z, t, a, b)
                                        	tmp = 0.0;
                                        	if (a <= -2.4e+167)
                                        		tmp = a;
                                        	elseif (a <= 8.7e+14)
                                        		tmp = z;
                                        	else
                                        		tmp = a;
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -2.4e+167], a, If[LessEqual[a, 8.7e+14], z, a]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        \mathbf{if}\;a \leq -2.4 \cdot 10^{+167}:\\
                                        \;\;\;\;a\\
                                        
                                        \mathbf{elif}\;a \leq 8.7 \cdot 10^{+14}:\\
                                        \;\;\;\;z\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;a\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 2 regimes
                                        2. if a < -2.39999999999999999e167 or 8.7e14 < a

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

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

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

                                            if -2.39999999999999999e167 < a < 8.7e14

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

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

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

                                            Alternative 21: 33.1% 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.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 t around inf

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

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

                                              Reproduce

                                              ?
                                              herbie shell --seed 2025124 
                                              (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)))