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

Percentage Accurate: 61.2% → 88.5%
Time: 9.3s
Alternatives: 22
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 22 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: 61.2% 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: 88.5% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t \leq 2.15 \cdot 10^{-64}:\\
\;\;\;\;z + \left(\mathsf{fma}\left(\mathsf{fma}\left(b, t\_6, \frac{a}{y + x}\right) - \mathsf{fma}\left(a, t\_6, \frac{z}{y + x}\right), t, a \cdot t\_5\right) - b \cdot t\_5\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.4999999999999999e82

    1. Initial program 49.3%

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

      \[\leadsto \color{blue}{\left(a + \left(x \cdot \left(\left(x \cdot \left(\left(\frac{a}{{\left(t + y\right)}^{2}} + \frac{y \cdot z}{{\left(t + y\right)}^{3}}\right) - \left(\frac{z}{{\left(t + y\right)}^{2}} + \frac{b \cdot y}{{\left(t + y\right)}^{3}}\right)\right) + \left(\frac{z}{t + y} + \frac{b \cdot y}{{\left(t + y\right)}^{2}}\right)\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. Applied rewrites82.6%

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

    if -7.4999999999999999e82 < t < 2.14999999999999987e-64

    1. Initial program 68.3%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Taylor expanded in 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 rewrites82.9%

      \[\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 2.14999999999999987e-64 < t

    1. Initial program 56.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 85.6% accurate, 0.3× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.4999999999999999e82

    1. Initial program 49.3%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Taylor expanded in 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 rewrites82.8%

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

    if -7.4999999999999999e82 < t < 2.14999999999999987e-64

    1. Initial program 68.3%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Taylor expanded in 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 rewrites82.9%

      \[\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 2.14999999999999987e-64 < t

    1. Initial program 56.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 83.9% accurate, 0.2× speedup?

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

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

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

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


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

    1. Initial program 5.9%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Taylor expanded in t around 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 rewrites73.1%

      \[\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 -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.99999999999999981e295

    1. Initial program 99.6%

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

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

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

\\
\begin{array}{l}
t_1 := t + \left(x + y\right)\\
t_2 := z \cdot \frac{x + y}{t\_1}\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{+146}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.49999999999999983e146 or 3.7000000000000002e83 < z

    1. Initial program 40.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 rewrites47.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t + y}{\left(y + x\right) + t}, a, \frac{\left(y + x\right) \cdot z - b \cdot y}{\left(y + x\right) + t}\right)} \]
    3. 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. lift-+.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. lift-+.f6470.3

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

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

    if -7.49999999999999983e146 < z < 3.7000000000000002e83

    1. Initial program 70.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 83.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := t + \left(x + y\right)\\
t_2 := z \cdot \frac{x + y}{t\_1}\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{+146}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.49999999999999983e146 or 3.7000000000000002e83 < z

    1. Initial program 40.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 rewrites47.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t + y}{\left(y + x\right) + t}, a, \frac{\left(y + x\right) \cdot z - b \cdot y}{\left(y + x\right) + t}\right)} \]
    3. 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. lift-+.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. lift-+.f6470.3

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

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

    if -7.49999999999999983e146 < z < 3.7000000000000002e83

    1. Initial program 70.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 83.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\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;\frac{t + y}{t\_3} \cdot a + b \cdot \left(-1 \cdot \frac{y}{t + \left(x + y\right)}\right)\\ \mathbf{elif}\;t\_2 \leq 10^{+140}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y + x}{t\_3}, z, \frac{t\_1 - b \cdot y}{t\_3}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \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)))
   (if (<= t_2 (- INFINITY))
     (+ (* (/ (+ t y) t_3) a) (* b (* -1.0 (/ y (+ t (+ x y))))))
     (if (<= t_2 1e+140)
       (fma (/ (+ y x) t_3) z (/ (- t_1 (* b y)) t_3))
       (- (+ a z) b)))))
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 tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = (((t + y) / t_3) * a) + (b * (-1.0 * (y / (t + (x + y)))));
	} else if (t_2 <= 1e+140) {
		tmp = fma(((y + x) / t_3), z, ((t_1 - (b * y)) / t_3));
	} else {
		tmp = (a + z) - b;
	}
	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)
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = Float64(Float64(Float64(Float64(t + y) / t_3) * a) + Float64(b * Float64(-1.0 * Float64(y / Float64(t + Float64(x + y))))));
	elseif (t_2 <= 1e+140)
		tmp = fma(Float64(Float64(y + x) / t_3), z, Float64(Float64(t_1 - Float64(b * y)) / t_3));
	else
		tmp = Float64(Float64(a + z) - b);
	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]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(N[(N[(t + y), $MachinePrecision] / t$95$3), $MachinePrecision] * a), $MachinePrecision] + N[(b * N[(-1.0 * N[(y / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+140], N[(N[(N[(y + x), $MachinePrecision] / t$95$3), $MachinePrecision] * z + N[(N[(t$95$1 - N[(b * y), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]]]]]]
\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\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\frac{t + y}{t\_3} \cdot a + b \cdot \left(-1 \cdot \frac{y}{t + \left(x + y\right)}\right)\\

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

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


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

    1. Initial program 6.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t + y}{\left(y + x\right) + t} \cdot a + b \cdot \left(-1 \cdot \frac{y}{t + \color{blue}{\left(x + y\right)}}\right) \]
    10. Applied rewrites59.5%

      \[\leadsto \frac{t + y}{\left(y + x\right) + t} \cdot a + b \cdot \left(-1 \cdot \color{blue}{\frac{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.00000000000000006e140

    1. Initial program 99.5%

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

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

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

    1. Initial program 25.6%

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

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

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

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

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

Alternative 7: 82.3% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 6.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t + y}{\left(y + x\right) + t} \cdot a + b \cdot \left(-1 \cdot \frac{y}{t + \color{blue}{\left(x + y\right)}}\right) \]
    10. Applied rewrites59.5%

      \[\leadsto \frac{t + y}{\left(y + x\right) + t} \cdot a + b \cdot \left(-1 \cdot \color{blue}{\frac{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.00000000000000006e140

    1. Initial program 99.5%

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

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

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

    1. Initial program 25.6%

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

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

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

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

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

Alternative 8: 82.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{t + y}{\left(y + x\right) + t} \cdot a + b \cdot \left(-1 \cdot \frac{y}{t + \left(x + y\right)}\right)\\ \mathbf{elif}\;t\_1 \leq 10^{+140}:\\ \;\;\;\;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 y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y))))
   (if (<= t_1 (- INFINITY))
     (+ (* (/ (+ t y) (+ (+ y x) t)) a) (* b (* -1.0 (/ y (+ t (+ x y))))))
     (if (<= t_1 1e+140) t_1 (- (+ a z) b)))))
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 tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = (((t + y) / ((y + x) + t)) * a) + (b * (-1.0 * (y / (t + (x + y)))));
	} else if (t_1 <= 1e+140) {
		tmp = t_1;
	} else {
		tmp = (a + z) - b;
	}
	return tmp;
}
public static 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 tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = (((t + y) / ((y + x) + t)) * a) + (b * (-1.0 * (y / (t + (x + y)))));
	} else if (t_1 <= 1e+140) {
		tmp = t_1;
	} else {
		tmp = (a + z) - b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = (((t + y) / ((y + x) + t)) * a) + (b * (-1.0 * (y / (t + (x + y)))))
	elif t_1 <= 1e+140:
		tmp = t_1
	else:
		tmp = (a + z) - b
	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))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(Float64(Float64(t + y) / Float64(Float64(y + x) + t)) * a) + Float64(b * Float64(-1.0 * Float64(y / Float64(t + Float64(x + y))))));
	elseif (t_1 <= 1e+140)
		tmp = t_1;
	else
		tmp = Float64(Float64(a + z) - b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = (((t + y) / ((y + x) + t)) * a) + (b * (-1.0 * (y / (t + (x + y)))));
	elseif (t_1 <= 1e+140)
		tmp = t_1;
	else
		tmp = (a + z) - b;
	end
	tmp_2 = 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]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(N[(t + y), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision] + N[(b * N[(-1.0 * N[(y / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+140], t$95$1, N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]]]]
\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}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{t + y}{\left(y + x\right) + t} \cdot a + b \cdot \left(-1 \cdot \frac{y}{t + \left(x + y\right)}\right)\\

\mathbf{elif}\;t\_1 \leq 10^{+140}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 6.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t + y}{\left(y + x\right) + t} \cdot a + b \cdot \left(-1 \cdot \frac{y}{t + \color{blue}{\left(x + y\right)}}\right) \]
    10. Applied rewrites59.5%

      \[\leadsto \frac{t + y}{\left(y + x\right) + t} \cdot a + b \cdot \left(-1 \cdot \color{blue}{\frac{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.00000000000000006e140

    1. Initial program 99.5%

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

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

    1. Initial program 25.6%

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

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

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

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

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

Alternative 9: 80.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(\frac{t + y}{\left(y + x\right) + t}, a, b \cdot \left(-1 \cdot \frac{y}{t + \left(x + y\right)}\right)\right)\\ \mathbf{elif}\;t\_1 \leq 10^{+140}:\\ \;\;\;\;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 y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y))))
   (if (<= t_1 (- INFINITY))
     (fma (/ (+ t y) (+ (+ y x) t)) a (* b (* -1.0 (/ y (+ t (+ x y))))))
     (if (<= t_1 1e+140) t_1 (- (+ a z) b)))))
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 tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = fma(((t + y) / ((y + x) + t)), a, (b * (-1.0 * (y / (t + (x + y))))));
	} else if (t_1 <= 1e+140) {
		tmp = t_1;
	} else {
		tmp = (a + z) - b;
	}
	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))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = fma(Float64(Float64(t + y) / Float64(Float64(y + x) + t)), a, Float64(b * Float64(-1.0 * Float64(y / Float64(t + Float64(x + y))))));
	elseif (t_1 <= 1e+140)
		tmp = 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[(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]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(t + y), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] * a + N[(b * N[(-1.0 * N[(y / N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+140], t$95$1, N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]]]]
\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}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(\frac{t + y}{\left(y + x\right) + t}, a, b \cdot \left(-1 \cdot \frac{y}{t + \left(x + y\right)}\right)\right)\\

\mathbf{elif}\;t\_1 \leq 10^{+140}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 6.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(\frac{t + y}{\left(y + x\right) + t}, a, b \cdot \left(-1 \cdot \color{blue}{\frac{y}{t + \left(x + y\right)}}\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.00000000000000006e140

    1. Initial program 99.5%

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

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

    1. Initial program 25.6%

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

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

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

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

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

Alternative 10: 80.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\ t_2 := \left(a + z\right) - b\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{+140}:\\ \;\;\;\;t\_1\\ \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 (- INFINITY)) t_2 (if (<= t_1 1e+140) t_1 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 <= -((double) INFINITY)) {
		tmp = t_2;
	} else if (t_1 <= 1e+140) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
public static 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 <= -Double.POSITIVE_INFINITY) {
		tmp = t_2;
	} else if (t_1 <= 1e+140) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
	t_2 = (a + z) - b
	tmp = 0
	if t_1 <= -math.inf:
		tmp = t_2
	elif t_1 <= 1e+140:
		tmp = t_1
	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 <= Float64(-Inf))
		tmp = t_2;
	elseif (t_1 <= 1e+140)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
	t_2 = (a + z) - b;
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = t_2;
	elseif (t_1 <= 1e+140)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = 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, (-Infinity)], t$95$2, If[LessEqual[t$95$1, 1e+140], t$95$1, 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 -\infty:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 10^{+140}:\\
\;\;\;\;t\_1\\

\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)) < -inf.0 or 1.00000000000000006e140 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 18.6%

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

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

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

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

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

    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.00000000000000006e140

    1. Initial program 99.5%

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

Alternative 11: 72.8% accurate, 0.3× speedup?

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

\mathbf{elif}\;t\_2 \leq 10^{+140}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t + y, a, \left(y + x\right) \cdot z\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)) < -2.0000000000000001e117 or 1.00000000000000006e140 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 30.5%

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

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

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

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

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

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

    1. Initial program 99.5%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Taylor expanded in 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-+.f6477.7

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

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

Alternative 12: 69.5% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a + z\right) - b\\ \mathbf{if}\;y \leq -4.2 \cdot 10^{+60}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{+117}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t + y}{\left(y + x\right) + t}, a, z\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 -4.2e+60)
     t_1
     (if (<= y 3.6e+117) (fma (/ (+ t y) (+ (+ y x) t)) a z) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (a + z) - b;
	double tmp;
	if (y <= -4.2e+60) {
		tmp = t_1;
	} else if (y <= 3.6e+117) {
		tmp = fma(((t + y) / ((y + x) + t)), a, z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(a + z) - b)
	tmp = 0.0
	if (y <= -4.2e+60)
		tmp = t_1;
	elseif (y <= 3.6e+117)
		tmp = fma(Float64(Float64(t + y) / Float64(Float64(y + x) + t)), a, z);
	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, -4.2e+60], t$95$1, If[LessEqual[y, 3.6e+117], N[(N[(N[(t + y), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] * a + z), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 3.6 \cdot 10^{+117}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t + y}{\left(y + x\right) + t}, a, z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.2000000000000002e60 or 3.60000000000000013e117 < y

    1. Initial program 34.0%

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

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

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

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

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

    if -4.2000000000000002e60 < y < 3.60000000000000013e117

    1. Initial program 76.2%

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

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

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

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

    Alternative 13: 65.2% 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 -5 \cdot 10^{+110}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{+140}:\\ \;\;\;\;\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 -5e+110)
         t_2
         (if (<= t_1 1e+140) (/ (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 <= -5e+110) {
    		tmp = t_2;
    	} else if (t_1 <= 1e+140) {
    		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 <= -5e+110)
    		tmp = t_2;
    	elseif (t_1 <= 1e+140)
    		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, -5e+110], t$95$2, If[LessEqual[t$95$1, 1e+140], 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 -5 \cdot 10^{+110}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;t\_1 \leq 10^{+140}:\\
    \;\;\;\;\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)) < -4.99999999999999978e110 or 1.00000000000000006e140 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

      1. Initial program 31.1%

        \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
      2. 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-+.f6468.7

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

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

      if -4.99999999999999978e110 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.00000000000000006e140

      1. Initial program 99.5%

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

        \[\leadsto \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-+.f6460.7

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

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

    Alternative 14: 59.3% accurate, 1.7× speedup?

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

      1. Initial program 46.6%

        \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
      2. Taylor expanded in y around 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-+.f6434.2

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

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

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

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

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

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

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

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

        \[\leadsto a + \color{blue}{x \cdot \frac{z - a}{t}} \]

      if -1.25000000000000005e153 < t < 5.7999999999999998e230

      1. Initial program 65.1%

        \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
      2. 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-+.f6458.5

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

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

      if 5.7999999999999998e230 < t

      1. Initial program 41.0%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto a \cdot \left(b \cdot \frac{t + y}{b \cdot \left(t + \left(x + \color{blue}{y}\right)\right)}\right) \]
        8. lift-+.f6437.9

          \[\leadsto a \cdot \left(b \cdot \frac{t + y}{b \cdot \left(t + \left(x + y\right)\right)}\right) \]
      7. Applied rewrites37.9%

        \[\leadsto a \cdot \color{blue}{\left(b \cdot \frac{t + y}{b \cdot \left(t + \left(x + y\right)\right)}\right)} \]
      8. Taylor expanded in y around 0

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

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

          \[\leadsto a \cdot \frac{t}{t + x} \]
      10. Applied rewrites64.2%

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

    Alternative 15: 58.6% accurate, 1.7× speedup?

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

      1. Initial program 44.8%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto a \cdot \left(b \cdot \frac{t + y}{b \cdot \left(t + \left(x + \color{blue}{y}\right)\right)}\right) \]
        8. lift-+.f6438.8

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

        \[\leadsto a \cdot \color{blue}{\left(b \cdot \frac{t + y}{b \cdot \left(t + \left(x + y\right)\right)}\right)} \]
      8. Taylor expanded in y around 0

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

          \[\leadsto a \cdot \frac{t}{t + x} \]
        2. lower-+.f6459.0

          \[\leadsto a \cdot \frac{t}{t + x} \]
      10. Applied rewrites59.0%

        \[\leadsto a \cdot \frac{t}{t + \color{blue}{x}} \]

      if -1.25000000000000005e153 < t < 5.7999999999999998e230

      1. Initial program 65.1%

        \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
      2. 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-+.f6458.5

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

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

    Alternative 16: 58.1% accurate, 1.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \frac{x}{t + x}\\ \mathbf{if}\;x \leq -2.45 \cdot 10^{+114}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 8 \cdot 10^{+217}:\\ \;\;\;\;\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 -2.45e+114) t_1 (if (<= x 8e+217) (- (+ 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 <= -2.45e+114) {
    		tmp = t_1;
    	} else if (x <= 8e+217) {
    		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 <= (-2.45d+114)) then
            tmp = t_1
        else if (x <= 8d+217) 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 <= -2.45e+114) {
    		tmp = t_1;
    	} else if (x <= 8e+217) {
    		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 <= -2.45e+114:
    		tmp = t_1
    	elif x <= 8e+217:
    		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 <= -2.45e+114)
    		tmp = t_1;
    	elseif (x <= 8e+217)
    		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 <= -2.45e+114)
    		tmp = t_1;
    	elseif (x <= 8e+217)
    		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, -2.45e+114], t$95$1, If[LessEqual[x, 8e+217], 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 -2.45 \cdot 10^{+114}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;x \leq 8 \cdot 10^{+217}:\\
    \;\;\;\;\left(a + z\right) - b\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < -2.45e114 or 7.99999999999999968e217 < x

      1. Initial program 46.6%

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t + y}{\left(y + x\right) + t}, a, \frac{\left(y + x\right) \cdot z - b \cdot y}{\left(y + x\right) + t}\right)} \]
      3. 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. lift-+.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. lift-+.f6457.4

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

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

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

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

          if -2.45e114 < x < 7.99999999999999968e217

          1. Initial program 65.6%

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

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

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

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

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

        Alternative 17: 57.1% accurate, 2.1× speedup?

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

          1. Initial program 46.6%

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

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

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

            if -1.35e153 < t < 6.0000000000000002e224

            1. Initial program 65.3%

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

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

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

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

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

            if 6.0000000000000002e224 < t

            1. Initial program 40.9%

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

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

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

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

              \[\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-+.f6447.1

                \[\leadsto a + z \]
            7. Applied rewrites47.1%

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

          Alternative 18: 51.0% accurate, 2.6× speedup?

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

            1. Initial program 46.8%

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

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

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

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

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

                \[\leadsto a - b \]

              if -5.00000000000000049e198 < b < 1.8e90

              1. Initial program 64.6%

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

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

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

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

                \[\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-+.f6457.8

                  \[\leadsto a + z \]
              7. Applied rewrites57.8%

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

              if 1.8e90 < b

              1. Initial program 54.5%

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

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

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

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

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

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

              Alternative 19: 47.8% accurate, 2.6× speedup?

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

                1. Initial program 46.9%

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

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

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

                  if -3.8000000000000001e30 < a < 3.7e9

                  1. Initial program 73.2%

                    \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
                  2. Taylor expanded in 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-+.f6450.8

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

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

                      \[\leadsto z - b \]

                    if 3.7e9 < a

                    1. Initial program 49.1%

                      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
                    2. 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-+.f6459.0

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

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

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

                    Alternative 20: 46.4% accurate, 2.6× speedup?

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

                      1. Initial program 52.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 rewrites46.5%

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

                        if -7.2000000000000002e-19 < x < 3.69999999999999987e170

                        1. Initial program 66.5%

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

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

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

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

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

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

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

                        Alternative 21: 44.3% accurate, 3.4× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.1 \cdot 10^{-50}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 2100:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
                        (FPCore (x y z t a b)
                         :precision binary64
                         (if (<= a -1.1e-50) a (if (<= a 2100.0) z a)))
                        double code(double x, double y, double z, double t, double a, double b) {
                        	double tmp;
                        	if (a <= -1.1e-50) {
                        		tmp = a;
                        	} else if (a <= 2100.0) {
                        		tmp = z;
                        	} else {
                        		tmp = a;
                        	}
                        	return tmp;
                        }
                        
                        module fmin_fmax_functions
                            implicit none
                            private
                            public fmax
                            public fmin
                        
                            interface fmax
                                module procedure fmax88
                                module procedure fmax44
                                module procedure fmax84
                                module procedure fmax48
                            end interface
                            interface fmin
                                module procedure fmin88
                                module procedure fmin44
                                module procedure fmin84
                                module procedure fmin48
                            end interface
                        contains
                            real(8) function fmax88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmax44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmax84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmax48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                            end function
                            real(8) function fmin88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmin44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmin84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmin48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                            end function
                        end module
                        
                        real(8) function code(x, y, z, t, a, b)
                        use fmin_fmax_functions
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            real(8), intent (in) :: z
                            real(8), intent (in) :: t
                            real(8), intent (in) :: a
                            real(8), intent (in) :: b
                            real(8) :: tmp
                            if (a <= (-1.1d-50)) then
                                tmp = a
                            else if (a <= 2100.0d0) then
                                tmp = z
                            else
                                tmp = a
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double x, double y, double z, double t, double a, double b) {
                        	double tmp;
                        	if (a <= -1.1e-50) {
                        		tmp = a;
                        	} else if (a <= 2100.0) {
                        		tmp = z;
                        	} else {
                        		tmp = a;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t, a, b):
                        	tmp = 0
                        	if a <= -1.1e-50:
                        		tmp = a
                        	elif a <= 2100.0:
                        		tmp = z
                        	else:
                        		tmp = a
                        	return tmp
                        
                        function code(x, y, z, t, a, b)
                        	tmp = 0.0
                        	if (a <= -1.1e-50)
                        		tmp = a;
                        	elseif (a <= 2100.0)
                        		tmp = z;
                        	else
                        		tmp = a;
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t, a, b)
                        	tmp = 0.0;
                        	if (a <= -1.1e-50)
                        		tmp = a;
                        	elseif (a <= 2100.0)
                        		tmp = z;
                        	else
                        		tmp = a;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.1e-50], a, If[LessEqual[a, 2100.0], z, a]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;a \leq -1.1 \cdot 10^{-50}:\\
                        \;\;\;\;a\\
                        
                        \mathbf{elif}\;a \leq 2100:\\
                        \;\;\;\;z\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;a\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if a < -1.0999999999999999e-50 or 2100 < a

                          1. Initial program 51.1%

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

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

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

                            if -1.0999999999999999e-50 < a < 2100

                            1. Initial program 73.4%

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

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

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

                            Alternative 22: 32.6% 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 61.2%

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

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

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

                              Reproduce

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