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

Percentage Accurate: 60.1% → 90.6%
Time: 9.2s
Alternatives: 14
Speedup: 1.4×

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);
}
real(8) function code(x, y, z, t, a, b)
    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}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 60.1% 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);
}
real(8) function code(x, y, z, t, a, b)
    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: 90.6% 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 -1 \cdot 10^{+175} \lor \neg \left(t\_1 \leq 10^{+307}\right):\\ \;\;\;\;\left(a + z\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \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 (or (<= t_1 -1e+175) (not (<= t_1 1e+307)))
     (- (+ a z) (* y (/ b (+ (+ t x) y))))
     t_1)))
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 <= -1e+175) || !(t_1 <= 1e+307)) {
		tmp = (a + z) - (y * (b / ((t + x) + y)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
    if ((t_1 <= (-1d+175)) .or. (.not. (t_1 <= 1d+307))) then
        tmp = (a + z) - (y * (b / ((t + x) + y)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
	double tmp;
	if ((t_1 <= -1e+175) || !(t_1 <= 1e+307)) {
		tmp = (a + z) - (y * (b / ((t + x) + y)));
	} else {
		tmp = t_1;
	}
	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 <= -1e+175) or not (t_1 <= 1e+307):
		tmp = (a + z) - (y * (b / ((t + x) + y)))
	else:
		tmp = t_1
	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 <= -1e+175) || !(t_1 <= 1e+307))
		tmp = Float64(Float64(a + z) - Float64(y * Float64(b / Float64(Float64(t + x) + y))));
	else
		tmp = t_1;
	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 <= -1e+175) || ~((t_1 <= 1e+307)))
		tmp = (a + z) - (y * (b / ((t + x) + y)));
	else
		tmp = t_1;
	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[Or[LessEqual[t$95$1, -1e+175], N[Not[LessEqual[t$95$1, 1e+307]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - N[(y * N[(b / N[(N[(t + x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]
\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 -1 \cdot 10^{+175} \lor \neg \left(t\_1 \leq 10^{+307}\right):\\
\;\;\;\;\left(a + z\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -9.9999999999999994e174 or 9.99999999999999986e306 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 12.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

        \[\leadsto \frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \color{blue}{y \cdot \frac{b}{\left(x + t\right) + y}} \]
      6. cancel-sign-sub-invN/A

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

        \[\leadsto \color{blue}{\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} + \left(\mathsf{neg}\left(y\right)\right) \cdot \frac{b}{\left(x + t\right) + y}} \]
    4. Applied rewrites26.9%

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

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

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

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

    if -9.9999999999999994e174 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.99999999999999986e306

    1. Initial program 99.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. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification93.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \leq -1 \cdot 10^{+175} \lor \neg \left(\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \leq 10^{+307}\right):\\ \;\;\;\;\left(a + z\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\ \mathbf{else}:\\ \;\;\;\;\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} \]
  5. Add Preprocessing

Alternative 2: 90.6% accurate, 0.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -9.9999999999999994e174 or 9.99999999999999986e306 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 12.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

        \[\leadsto \frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \color{blue}{y \cdot \frac{b}{\left(x + t\right) + y}} \]
      6. cancel-sign-sub-invN/A

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

        \[\leadsto \color{blue}{\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} + \left(\mathsf{neg}\left(y\right)\right) \cdot \frac{b}{\left(x + t\right) + y}} \]
    4. Applied rewrites26.9%

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

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

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

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

    if -9.9999999999999994e174 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.99999999999999986e306

    1. Initial program 99.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. Add Preprocessing
    3. Taylor expanded in y around 0

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 78.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}\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+162} \lor \neg \left(t\_2 \leq 10^{+107}\right):\\ \;\;\;\;\left(a + z\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y + x, z, t\_1\right)}{\left(y + x\right) + t}\\ \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))))
   (if (or (<= t_2 -2e+162) (not (<= t_2 1e+107)))
     (- (+ a z) (* y (/ b (+ (+ t x) y))))
     (/ (fma (+ y x) z t_1) (+ (+ y x) t)))))
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 tmp;
	if ((t_2 <= -2e+162) || !(t_2 <= 1e+107)) {
		tmp = (a + z) - (y * (b / ((t + x) + y)));
	} else {
		tmp = fma((y + x), z, t_1) / ((y + x) + t);
	}
	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))
	tmp = 0.0
	if ((t_2 <= -2e+162) || !(t_2 <= 1e+107))
		tmp = Float64(Float64(a + z) - Float64(y * Float64(b / Float64(Float64(t + x) + y))));
	else
		tmp = Float64(fma(Float64(y + x), z, t_1) / Float64(Float64(y + x) + t));
	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]}, If[Or[LessEqual[t$95$2, -2e+162], N[Not[LessEqual[t$95$2, 1e+107]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - N[(y * N[(b / N[(N[(t + x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y + x), $MachinePrecision] * z + t$95$1), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]), $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}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+162} \lor \neg \left(t\_2 \leq 10^{+107}\right):\\
\;\;\;\;\left(a + z\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\

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


\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)) < -1.9999999999999999e162 or 9.9999999999999997e106 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 28.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

        \[\leadsto \frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \color{blue}{y \cdot \frac{b}{\left(x + t\right) + y}} \]
      6. cancel-sign-sub-invN/A

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

        \[\leadsto \color{blue}{\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} + \left(\mathsf{neg}\left(y\right)\right) \cdot \frac{b}{\left(x + t\right) + y}} \]
    4. Applied rewrites37.2%

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

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

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

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

    if -1.9999999999999999e162 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.9999999999999997e106

    1. Initial program 99.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. Add Preprocessing
    3. Taylor expanded in b around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 72.7% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;x \leq 2.3 \cdot 10^{+235}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.27999999999999994e-42 or 4.2999999999999997e32 < x < 2.3e235

    1. Initial program 54.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

        \[\leadsto \frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \color{blue}{y \cdot \frac{b}{\left(x + t\right) + y}} \]
      6. cancel-sign-sub-invN/A

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

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

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

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

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

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

    if -1.27999999999999994e-42 < x < 4.2999999999999997e32

    1. Initial program 72.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(t + y, a, y \cdot z - \color{blue}{y \cdot b}\right)}{t + y} \]
      7. distribute-lft-out--N/A

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

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

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

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

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

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

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

      if 2.3e235 < x

      1. Initial program 73.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. Add Preprocessing
      3. Taylor expanded in b around inf

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

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

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

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

          \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \cdot b}{\left(x + t\right) + y} \]
        5. lower-neg.f6410.4

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

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

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

          \[\leadsto \frac{\left(-y\right) \cdot b}{\color{blue}{y + x}} \]
        2. lower-+.f6410.4

          \[\leadsto \frac{\left(-y\right) \cdot b}{\color{blue}{y + x}} \]
      8. Applied rewrites10.4%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.28 \cdot 10^{-42}:\\ \;\;\;\;\left(a + z\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\ \mathbf{elif}\;x \leq 4.3 \cdot 10^{+32}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{+235}:\\ \;\;\;\;\left(a + z\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x + y, z, \left(y + t\right) \cdot a\right)}{y + x}\\ \end{array} \]
    10. Add Preprocessing

    Alternative 5: 73.8% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.28 \cdot 10^{-42} \lor \neg \left(x \leq 4.3 \cdot 10^{+32}\right):\\ \;\;\;\;\left(a + z\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (or (<= x -1.28e-42) (not (<= x 4.3e+32)))
       (- (+ a z) (* y (/ b (+ (+ t x) y))))
       (fma y (/ (- z b) (+ t y)) a)))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if ((x <= -1.28e-42) || !(x <= 4.3e+32)) {
    		tmp = (a + z) - (y * (b / ((t + x) + y)));
    	} else {
    		tmp = fma(y, ((z - b) / (t + y)), a);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if ((x <= -1.28e-42) || !(x <= 4.3e+32))
    		tmp = Float64(Float64(a + z) - Float64(y * Float64(b / Float64(Float64(t + x) + y))));
    	else
    		tmp = fma(y, Float64(Float64(z - b) / Float64(t + y)), a);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -1.28e-42], N[Not[LessEqual[x, 4.3e+32]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - N[(y * N[(b / N[(N[(t + x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z - b), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;x \leq -1.28 \cdot 10^{-42} \lor \neg \left(x \leq 4.3 \cdot 10^{+32}\right):\\
    \;\;\;\;\left(a + z\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < -1.27999999999999994e-42 or 4.2999999999999997e32 < x

      1. Initial program 56.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. Add Preprocessing
      3. Step-by-step derivation
        1. lift-/.f64N/A

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

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

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

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

          \[\leadsto \frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \color{blue}{y \cdot \frac{b}{\left(x + t\right) + y}} \]
        6. cancel-sign-sub-invN/A

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

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

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

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

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

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

      if -1.27999999999999994e-42 < x < 4.2999999999999997e32

      1. Initial program 72.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. Add Preprocessing
      3. Taylor expanded in x around 0

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(t + y, a, y \cdot z - \color{blue}{y \cdot b}\right)}{t + y} \]
        7. distribute-lft-out--N/A

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{z - b}{t + y}}, a\right) \]
      8. Recombined 2 regimes into one program.
      9. Final simplification75.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.28 \cdot 10^{-42} \lor \neg \left(x \leq 4.3 \cdot 10^{+32}\right):\\ \;\;\;\;\left(a + z\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\ \end{array} \]
      10. Add Preprocessing

      Alternative 6: 69.8% accurate, 1.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.7 \cdot 10^{-42}:\\ \;\;\;\;\left(a + z\right) - y \cdot \frac{b}{x + y}\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+54}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y + x\right) \cdot \frac{z}{\left(y + x\right) + t}\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= x -3.7e-42)
         (- (+ a z) (* y (/ b (+ x y))))
         (if (<= x 1.05e+54)
           (fma y (/ (- z b) (+ t y)) a)
           (* (+ y x) (/ z (+ (+ y x) t))))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (x <= -3.7e-42) {
      		tmp = (a + z) - (y * (b / (x + y)));
      	} else if (x <= 1.05e+54) {
      		tmp = fma(y, ((z - b) / (t + y)), a);
      	} else {
      		tmp = (y + x) * (z / ((y + x) + t));
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (x <= -3.7e-42)
      		tmp = Float64(Float64(a + z) - Float64(y * Float64(b / Float64(x + y))));
      	elseif (x <= 1.05e+54)
      		tmp = fma(y, Float64(Float64(z - b) / Float64(t + y)), a);
      	else
      		tmp = Float64(Float64(y + x) * Float64(z / Float64(Float64(y + x) + t)));
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -3.7e-42], N[(N[(a + z), $MachinePrecision] - N[(y * N[(b / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e+54], N[(y * N[(N[(z - b), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(N[(y + x), $MachinePrecision] * N[(z / N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq -3.7 \cdot 10^{-42}:\\
      \;\;\;\;\left(a + z\right) - y \cdot \frac{b}{x + y}\\
      
      \mathbf{elif}\;x \leq 1.05 \cdot 10^{+54}:\\
      \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(y + x\right) \cdot \frac{z}{\left(y + x\right) + t}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if x < -3.7000000000000002e-42

        1. Initial program 50.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. Add Preprocessing
        3. Step-by-step derivation
          1. lift-/.f64N/A

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

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

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

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

            \[\leadsto \frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \color{blue}{y \cdot \frac{b}{\left(x + t\right) + y}} \]
          6. cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

            \[\leadsto \left(a + z\right) + \left(-y\right) \cdot \frac{b}{\color{blue}{x + y}} \]
        10. Applied rewrites71.2%

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

        if -3.7000000000000002e-42 < x < 1.04999999999999993e54

        1. Initial program 71.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. Add Preprocessing
        3. Taylor expanded in x around 0

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

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

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(t + y, a, y \cdot z - \color{blue}{y \cdot b}\right)}{t + y} \]
          7. distribute-lft-out--N/A

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

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

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

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

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

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

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

          if 1.04999999999999993e54 < x

          1. Initial program 65.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. Add Preprocessing
          3. Taylor expanded in z around inf

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\left(y + x\right) \cdot \frac{z}{\left(y + x\right) + t}} \]
        8. Recombined 3 regimes into one program.
        9. Final simplification74.9%

          \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.7 \cdot 10^{-42}:\\ \;\;\;\;\left(a + z\right) - y \cdot \frac{b}{x + y}\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+54}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y + x\right) \cdot \frac{z}{\left(y + x\right) + t}\\ \end{array} \]
        10. Add Preprocessing

        Alternative 7: 68.5% accurate, 1.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{+159}:\\ \;\;\;\;\left(-z\right) \cdot -1\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+54}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y + x\right) \cdot \frac{z}{\left(y + x\right) + t}\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (if (<= x -9.5e+159)
           (* (- z) -1.0)
           (if (<= x 1.05e+54)
             (fma y (/ (- z b) (+ t y)) a)
             (* (+ y x) (/ z (+ (+ y x) t))))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double tmp;
        	if (x <= -9.5e+159) {
        		tmp = -z * -1.0;
        	} else if (x <= 1.05e+54) {
        		tmp = fma(y, ((z - b) / (t + y)), a);
        	} else {
        		tmp = (y + x) * (z / ((y + x) + t));
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	tmp = 0.0
        	if (x <= -9.5e+159)
        		tmp = Float64(Float64(-z) * -1.0);
        	elseif (x <= 1.05e+54)
        		tmp = fma(y, Float64(Float64(z - b) / Float64(t + y)), a);
        	else
        		tmp = Float64(Float64(y + x) * Float64(z / Float64(Float64(y + x) + t)));
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -9.5e+159], N[((-z) * -1.0), $MachinePrecision], If[LessEqual[x, 1.05e+54], N[(y * N[(N[(z - b), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(N[(y + x), $MachinePrecision] * N[(z / N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq -9.5 \cdot 10^{+159}:\\
        \;\;\;\;\left(-z\right) \cdot -1\\
        
        \mathbf{elif}\;x \leq 1.05 \cdot 10^{+54}:\\
        \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(y + x\right) \cdot \frac{z}{\left(y + x\right) + t}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if x < -9.5000000000000003e159

          1. Initial program 34.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. Add Preprocessing
          3. Taylor expanded in a around -inf

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

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

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

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

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

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

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

              \[\leadsto \left(-z\right) \cdot -1 \]
            3. Step-by-step derivation
              1. Applied rewrites67.8%

                \[\leadsto \left(-z\right) \cdot -1 \]

              if -9.5000000000000003e159 < x < 1.04999999999999993e54

              1. Initial program 68.8%

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

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

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

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

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

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

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

                  \[\leadsto \frac{\mathsf{fma}\left(t + y, a, y \cdot z - \color{blue}{y \cdot b}\right)}{t + y} \]
                7. distribute-lft-out--N/A

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

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

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

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

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

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

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

                if 1.04999999999999993e54 < x

                1. Initial program 65.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. Add Preprocessing
                3. Taylor expanded in z around inf

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\left(y + x\right) \cdot \frac{z}{\left(y + x\right) + t}} \]
              8. Recombined 3 regimes into one program.
              9. Add Preprocessing

              Alternative 8: 69.8% accurate, 1.2× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{+159} \lor \neg \left(x \leq 3.2 \cdot 10^{+183}\right):\\ \;\;\;\;\left(-z\right) \cdot -1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\ \end{array} \end{array} \]
              (FPCore (x y z t a b)
               :precision binary64
               (if (or (<= x -9.5e+159) (not (<= x 3.2e+183)))
                 (* (- z) -1.0)
                 (fma y (/ (- z b) (+ t y)) a)))
              double code(double x, double y, double z, double t, double a, double b) {
              	double tmp;
              	if ((x <= -9.5e+159) || !(x <= 3.2e+183)) {
              		tmp = -z * -1.0;
              	} else {
              		tmp = fma(y, ((z - b) / (t + y)), a);
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a, b)
              	tmp = 0.0
              	if ((x <= -9.5e+159) || !(x <= 3.2e+183))
              		tmp = Float64(Float64(-z) * -1.0);
              	else
              		tmp = fma(y, Float64(Float64(z - b) / Float64(t + y)), a);
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -9.5e+159], N[Not[LessEqual[x, 3.2e+183]], $MachinePrecision]], N[((-z) * -1.0), $MachinePrecision], N[(y * N[(N[(z - b), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;x \leq -9.5 \cdot 10^{+159} \lor \neg \left(x \leq 3.2 \cdot 10^{+183}\right):\\
              \;\;\;\;\left(-z\right) \cdot -1\\
              
              \mathbf{else}:\\
              \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if x < -9.5000000000000003e159 or 3.2000000000000002e183 < x

                1. Initial program 50.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. Add Preprocessing
                3. Taylor expanded in a around -inf

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

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

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

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

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

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

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

                    \[\leadsto \left(-z\right) \cdot -1 \]
                  3. Step-by-step derivation
                    1. Applied rewrites58.8%

                      \[\leadsto \left(-z\right) \cdot -1 \]

                    if -9.5000000000000003e159 < x < 3.2000000000000002e183

                    1. Initial program 68.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. Add Preprocessing
                    3. Taylor expanded in x around 0

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

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

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

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

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

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

                        \[\leadsto \frac{\mathsf{fma}\left(t + y, a, y \cdot z - \color{blue}{y \cdot b}\right)}{t + y} \]
                      7. distribute-lft-out--N/A

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{z - b}{t + y}}, a\right) \]
                    8. Recombined 2 regimes into one program.
                    9. Final simplification73.2%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{+159} \lor \neg \left(x \leq 3.2 \cdot 10^{+183}\right):\\ \;\;\;\;\left(-z\right) \cdot -1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\ \end{array} \]
                    10. Add Preprocessing

                    Alternative 9: 61.7% accurate, 1.4× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{+157} \lor \neg \left(t \leq 1.45 \cdot 10^{+23}\right):\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t}, a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b)
                     :precision binary64
                     (if (or (<= t -4e+157) (not (<= t 1.45e+23)))
                       (fma y (/ (- z b) t) a)
                       (- (+ a z) b)))
                    double code(double x, double y, double z, double t, double a, double b) {
                    	double tmp;
                    	if ((t <= -4e+157) || !(t <= 1.45e+23)) {
                    		tmp = fma(y, ((z - b) / t), a);
                    	} else {
                    		tmp = (a + z) - b;
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a, b)
                    	tmp = 0.0
                    	if ((t <= -4e+157) || !(t <= 1.45e+23))
                    		tmp = fma(y, Float64(Float64(z - b) / t), a);
                    	else
                    		tmp = Float64(Float64(a + z) - b);
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -4e+157], N[Not[LessEqual[t, 1.45e+23]], $MachinePrecision]], N[(y * N[(N[(z - b), $MachinePrecision] / t), $MachinePrecision] + a), $MachinePrecision], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;t \leq -4 \cdot 10^{+157} \lor \neg \left(t \leq 1.45 \cdot 10^{+23}\right):\\
                    \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t}, a\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\left(a + z\right) - b\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if t < -3.99999999999999993e157 or 1.45000000000000006e23 < t

                      1. Initial program 63.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. Add Preprocessing
                      3. Taylor expanded in x around 0

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

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

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

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

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

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

                          \[\leadsto \frac{\mathsf{fma}\left(t + y, a, y \cdot z - \color{blue}{y \cdot b}\right)}{t + y} \]
                        7. distribute-lft-out--N/A

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

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

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

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

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

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

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

                        if -3.99999999999999993e157 < t < 1.45000000000000006e23

                        1. Initial program 64.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. Add Preprocessing
                        3. Taylor expanded in y around inf

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

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

                            \[\leadsto \color{blue}{\left(a + z\right)} - b \]
                        5. Applied rewrites65.5%

                          \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                      8. Recombined 2 regimes into one program.
                      9. Final simplification64.9%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{+157} \lor \neg \left(t \leq 1.45 \cdot 10^{+23}\right):\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t}, a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]
                      10. Add Preprocessing

                      Alternative 10: 58.1% accurate, 2.2× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.35 \cdot 10^{+161} \lor \neg \left(x \leq 8.6 \cdot 10^{+95}\right):\\ \;\;\;\;\left(-z\right) \cdot -1\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b)
                       :precision binary64
                       (if (or (<= x -3.35e+161) (not (<= x 8.6e+95))) (* (- z) -1.0) (- (+ a z) b)))
                      double code(double x, double y, double z, double t, double a, double b) {
                      	double tmp;
                      	if ((x <= -3.35e+161) || !(x <= 8.6e+95)) {
                      		tmp = -z * -1.0;
                      	} else {
                      		tmp = (a + z) - b;
                      	}
                      	return tmp;
                      }
                      
                      real(8) function code(x, y, z, t, a, b)
                          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 <= (-3.35d+161)) .or. (.not. (x <= 8.6d+95))) then
                              tmp = -z * (-1.0d0)
                          else
                              tmp = (a + 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 ((x <= -3.35e+161) || !(x <= 8.6e+95)) {
                      		tmp = -z * -1.0;
                      	} else {
                      		tmp = (a + z) - b;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t, a, b):
                      	tmp = 0
                      	if (x <= -3.35e+161) or not (x <= 8.6e+95):
                      		tmp = -z * -1.0
                      	else:
                      		tmp = (a + z) - b
                      	return tmp
                      
                      function code(x, y, z, t, a, b)
                      	tmp = 0.0
                      	if ((x <= -3.35e+161) || !(x <= 8.6e+95))
                      		tmp = Float64(Float64(-z) * -1.0);
                      	else
                      		tmp = Float64(Float64(a + z) - b);
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y, z, t, a, b)
                      	tmp = 0.0;
                      	if ((x <= -3.35e+161) || ~((x <= 8.6e+95)))
                      		tmp = -z * -1.0;
                      	else
                      		tmp = (a + z) - b;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -3.35e+161], N[Not[LessEqual[x, 8.6e+95]], $MachinePrecision]], N[((-z) * -1.0), $MachinePrecision], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;x \leq -3.35 \cdot 10^{+161} \lor \neg \left(x \leq 8.6 \cdot 10^{+95}\right):\\
                      \;\;\;\;\left(-z\right) \cdot -1\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\left(a + z\right) - b\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if x < -3.35e161 or 8.6e95 < x

                        1. Initial program 52.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. Add Preprocessing
                        3. Taylor expanded in a around -inf

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

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

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

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

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

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

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

                            \[\leadsto \left(-z\right) \cdot -1 \]
                          3. Step-by-step derivation
                            1. Applied rewrites56.8%

                              \[\leadsto \left(-z\right) \cdot -1 \]

                            if -3.35e161 < x < 8.6e95

                            1. Initial program 68.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. Add Preprocessing
                            3. Taylor expanded in y around inf

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

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

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

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.35 \cdot 10^{+161} \lor \neg \left(x \leq 8.6 \cdot 10^{+95}\right):\\ \;\;\;\;\left(-z\right) \cdot -1\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]
                          6. Add Preprocessing

                          Alternative 11: 59.4% accurate, 2.4× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6500000000000 \lor \neg \left(y \leq 0.0074\right):\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;z + a\\ \end{array} \end{array} \]
                          (FPCore (x y z t a b)
                           :precision binary64
                           (if (or (<= y -6500000000000.0) (not (<= y 0.0074))) (- (+ a z) b) (+ z a)))
                          double code(double x, double y, double z, double t, double a, double b) {
                          	double tmp;
                          	if ((y <= -6500000000000.0) || !(y <= 0.0074)) {
                          		tmp = (a + z) - b;
                          	} else {
                          		tmp = z + a;
                          	}
                          	return tmp;
                          }
                          
                          real(8) function code(x, y, z, t, a, b)
                              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 ((y <= (-6500000000000.0d0)) .or. (.not. (y <= 0.0074d0))) then
                                  tmp = (a + z) - b
                              else
                                  tmp = z + 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 ((y <= -6500000000000.0) || !(y <= 0.0074)) {
                          		tmp = (a + z) - b;
                          	} else {
                          		tmp = z + a;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a, b):
                          	tmp = 0
                          	if (y <= -6500000000000.0) or not (y <= 0.0074):
                          		tmp = (a + z) - b
                          	else:
                          		tmp = z + a
                          	return tmp
                          
                          function code(x, y, z, t, a, b)
                          	tmp = 0.0
                          	if ((y <= -6500000000000.0) || !(y <= 0.0074))
                          		tmp = Float64(Float64(a + z) - b);
                          	else
                          		tmp = Float64(z + a);
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t, a, b)
                          	tmp = 0.0;
                          	if ((y <= -6500000000000.0) || ~((y <= 0.0074)))
                          		tmp = (a + z) - b;
                          	else
                          		tmp = z + a;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -6500000000000.0], N[Not[LessEqual[y, 0.0074]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(z + a), $MachinePrecision]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;y \leq -6500000000000 \lor \neg \left(y \leq 0.0074\right):\\
                          \;\;\;\;\left(a + z\right) - b\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;z + a\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if y < -6.5e12 or 0.0074000000000000003 < y

                            1. Initial program 44.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. Add Preprocessing
                            3. Taylor expanded in y around inf

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

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

                                \[\leadsto \color{blue}{\left(a + z\right)} - b \]
                            5. Applied rewrites78.7%

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

                            if -6.5e12 < y < 0.0074000000000000003

                            1. Initial program 83.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. Add Preprocessing
                            3. Taylor expanded in y around inf

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

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

                                \[\leadsto \color{blue}{\left(a + z\right)} - b \]
                            5. Applied rewrites33.4%

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

                              \[\leadsto a - \color{blue}{b} \]
                            7. Step-by-step derivation
                              1. Applied rewrites25.6%

                                \[\leadsto a - \color{blue}{b} \]
                              2. Taylor expanded in b around 0

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

                                  \[\leadsto z + \color{blue}{a} \]
                              4. Recombined 2 regimes into one program.
                              5. Final simplification60.8%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6500000000000 \lor \neg \left(y \leq 0.0074\right):\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;z + a\\ \end{array} \]
                              6. Add Preprocessing

                              Alternative 12: 49.8% accurate, 2.8× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.08 \cdot 10^{-24} \lor \neg \left(x \leq 1.7 \cdot 10^{-7}\right):\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;a - b\\ \end{array} \end{array} \]
                              (FPCore (x y z t a b)
                               :precision binary64
                               (if (or (<= x -1.08e-24) (not (<= x 1.7e-7))) (+ z a) (- a b)))
                              double code(double x, double y, double z, double t, double a, double b) {
                              	double tmp;
                              	if ((x <= -1.08e-24) || !(x <= 1.7e-7)) {
                              		tmp = z + a;
                              	} else {
                              		tmp = a - b;
                              	}
                              	return tmp;
                              }
                              
                              real(8) function code(x, y, z, t, a, b)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  real(8), intent (in) :: z
                                  real(8), intent (in) :: t
                                  real(8), intent (in) :: a
                                  real(8), intent (in) :: b
                                  real(8) :: tmp
                                  if ((x <= (-1.08d-24)) .or. (.not. (x <= 1.7d-7))) then
                                      tmp = z + a
                                  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 ((x <= -1.08e-24) || !(x <= 1.7e-7)) {
                              		tmp = z + a;
                              	} else {
                              		tmp = a - b;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t, a, b):
                              	tmp = 0
                              	if (x <= -1.08e-24) or not (x <= 1.7e-7):
                              		tmp = z + a
                              	else:
                              		tmp = a - b
                              	return tmp
                              
                              function code(x, y, z, t, a, b)
                              	tmp = 0.0
                              	if ((x <= -1.08e-24) || !(x <= 1.7e-7))
                              		tmp = Float64(z + a);
                              	else
                              		tmp = Float64(a - b);
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z, t, a, b)
                              	tmp = 0.0;
                              	if ((x <= -1.08e-24) || ~((x <= 1.7e-7)))
                              		tmp = z + a;
                              	else
                              		tmp = a - b;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -1.08e-24], N[Not[LessEqual[x, 1.7e-7]], $MachinePrecision]], N[(z + a), $MachinePrecision], N[(a - b), $MachinePrecision]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;x \leq -1.08 \cdot 10^{-24} \lor \neg \left(x \leq 1.7 \cdot 10^{-7}\right):\\
                              \;\;\;\;z + a\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;a - b\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if x < -1.08000000000000006e-24 or 1.69999999999999987e-7 < x

                                1. Initial program 58.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. Add Preprocessing
                                3. Taylor expanded in y around inf

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

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

                                    \[\leadsto \color{blue}{\left(a + z\right)} - b \]
                                5. Applied rewrites48.1%

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

                                  \[\leadsto a - \color{blue}{b} \]
                                7. Step-by-step derivation
                                  1. Applied rewrites23.5%

                                    \[\leadsto a - \color{blue}{b} \]
                                  2. Taylor expanded in b around 0

                                    \[\leadsto a + \color{blue}{z} \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites52.5%

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

                                    if -1.08000000000000006e-24 < x < 1.69999999999999987e-7

                                    1. Initial program 71.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. Add Preprocessing
                                    3. Taylor expanded in y around inf

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

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

                                        \[\leadsto \color{blue}{\left(a + z\right)} - b \]
                                    5. Applied rewrites64.7%

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

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

                                        \[\leadsto a - \color{blue}{b} \]
                                    8. Recombined 2 regimes into one program.
                                    9. Final simplification54.9%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.08 \cdot 10^{-24} \lor \neg \left(x \leq 1.7 \cdot 10^{-7}\right):\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;a - b\\ \end{array} \]
                                    10. Add Preprocessing

                                    Alternative 13: 49.9% accurate, 4.5× speedup?

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

                                      1. Initial program 45.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. Add Preprocessing
                                      3. Taylor expanded in y around inf

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

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

                                          \[\leadsto \color{blue}{\left(a + z\right)} - b \]
                                      5. Applied rewrites51.9%

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

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

                                          \[\leadsto a - \color{blue}{b} \]
                                        2. Taylor expanded in a around 0

                                          \[\leadsto -1 \cdot b \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites36.7%

                                            \[\leadsto -b \]

                                          if -1.40000000000000005e126 < b

                                          1. Initial program 67.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. Add Preprocessing
                                          3. Taylor expanded in y around inf

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

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

                                              \[\leadsto \color{blue}{\left(a + z\right)} - b \]
                                          5. Applied rewrites56.4%

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

                                            \[\leadsto a - \color{blue}{b} \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites38.8%

                                              \[\leadsto a - \color{blue}{b} \]
                                            2. Taylor expanded in b around 0

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

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

                                            Alternative 14: 13.4% accurate, 15.0× speedup?

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

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

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

                                                \[\leadsto \color{blue}{\left(a + z\right)} - b \]
                                            5. Applied rewrites55.7%

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

                                              \[\leadsto a - \color{blue}{b} \]
                                            7. Step-by-step derivation
                                              1. Applied rewrites39.2%

                                                \[\leadsto a - \color{blue}{b} \]
                                              2. Taylor expanded in a around 0

                                                \[\leadsto -1 \cdot b \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites16.7%

                                                  \[\leadsto -b \]
                                                2. Add Preprocessing

                                                Developer Target 1: 82.2% accurate, 0.3× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + t\right) + y\\ t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\ t_3 := \frac{t\_2}{t\_1}\\ t_4 := \left(z + a\right) - b\\ \mathbf{if}\;t\_3 < -3.5813117084150564 \cdot 10^{+153}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_3 < 1.2285964308315609 \cdot 10^{+82}:\\ \;\;\;\;\frac{1}{\frac{t\_1}{t\_2}}\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \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_3 (/ t_2 t_1))
                                                        (t_4 (- (+ z a) b)))
                                                   (if (< t_3 -3.5813117084150564e+153)
                                                     t_4
                                                     (if (< t_3 1.2285964308315609e+82) (/ 1.0 (/ t_1 t_2)) t_4))))
                                                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);
                                                	double t_3 = t_2 / t_1;
                                                	double t_4 = (z + a) - b;
                                                	double tmp;
                                                	if (t_3 < -3.5813117084150564e+153) {
                                                		tmp = t_4;
                                                	} else if (t_3 < 1.2285964308315609e+82) {
                                                		tmp = 1.0 / (t_1 / t_2);
                                                	} else {
                                                		tmp = t_4;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                real(8) function code(x, y, z, t, a, b)
                                                    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) :: t_2
                                                    real(8) :: t_3
                                                    real(8) :: t_4
                                                    real(8) :: tmp
                                                    t_1 = (x + t) + y
                                                    t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
                                                    t_3 = t_2 / t_1
                                                    t_4 = (z + a) - b
                                                    if (t_3 < (-3.5813117084150564d+153)) then
                                                        tmp = t_4
                                                    else if (t_3 < 1.2285964308315609d+82) then
                                                        tmp = 1.0d0 / (t_1 / t_2)
                                                    else
                                                        tmp = t_4
                                                    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 = (x + t) + y;
                                                	double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
                                                	double t_3 = t_2 / t_1;
                                                	double t_4 = (z + a) - b;
                                                	double tmp;
                                                	if (t_3 < -3.5813117084150564e+153) {
                                                		tmp = t_4;
                                                	} else if (t_3 < 1.2285964308315609e+82) {
                                                		tmp = 1.0 / (t_1 / t_2);
                                                	} else {
                                                		tmp = t_4;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                def code(x, y, z, t, a, b):
                                                	t_1 = (x + t) + y
                                                	t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
                                                	t_3 = t_2 / t_1
                                                	t_4 = (z + a) - b
                                                	tmp = 0
                                                	if t_3 < -3.5813117084150564e+153:
                                                		tmp = t_4
                                                	elif t_3 < 1.2285964308315609e+82:
                                                		tmp = 1.0 / (t_1 / t_2)
                                                	else:
                                                		tmp = t_4
                                                	return tmp
                                                
                                                function code(x, y, z, t, a, b)
                                                	t_1 = Float64(Float64(x + t) + y)
                                                	t_2 = Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b))
                                                	t_3 = Float64(t_2 / t_1)
                                                	t_4 = Float64(Float64(z + a) - b)
                                                	tmp = 0.0
                                                	if (t_3 < -3.5813117084150564e+153)
                                                		tmp = t_4;
                                                	elseif (t_3 < 1.2285964308315609e+82)
                                                		tmp = Float64(1.0 / Float64(t_1 / t_2));
                                                	else
                                                		tmp = t_4;
                                                	end
                                                	return tmp
                                                end
                                                
                                                function tmp_2 = code(x, y, z, t, a, b)
                                                	t_1 = (x + t) + y;
                                                	t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
                                                	t_3 = t_2 / t_1;
                                                	t_4 = (z + a) - b;
                                                	tmp = 0.0;
                                                	if (t_3 < -3.5813117084150564e+153)
                                                		tmp = t_4;
                                                	elseif (t_3 < 1.2285964308315609e+82)
                                                		tmp = 1.0 / (t_1 / t_2);
                                                	else
                                                		tmp = t_4;
                                                	end
                                                	tmp_2 = 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[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[Less[t$95$3, -3.5813117084150564e+153], t$95$4, If[Less[t$95$3, 1.2285964308315609e+82], N[(1.0 / N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                t_1 := \left(x + t\right) + y\\
                                                t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\
                                                t_3 := \frac{t\_2}{t\_1}\\
                                                t_4 := \left(z + a\right) - b\\
                                                \mathbf{if}\;t\_3 < -3.5813117084150564 \cdot 10^{+153}:\\
                                                \;\;\;\;t\_4\\
                                                
                                                \mathbf{elif}\;t\_3 < 1.2285964308315609 \cdot 10^{+82}:\\
                                                \;\;\;\;\frac{1}{\frac{t\_1}{t\_2}}\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;t\_4\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                

                                                Reproduce

                                                ?
                                                herbie shell --seed 2024323 
                                                (FPCore (x y z t a b)
                                                  :name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
                                                  :precision binary64
                                                
                                                  :alt
                                                  (! :herbie-platform default (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3581311708415056400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 12285964308315609000000000000000000000000000000000000000000000000000000000000000000) (/ 1 (/ (+ (+ x t) y) (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))) (- (+ z a) b))))
                                                
                                                  (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))